First commit 🎉
This commit is contained in:
commit
43ea213f9b
728 changed files with 37080 additions and 0 deletions
|
@ -0,0 +1,4 @@
|
|||
extends Button
|
||||
|
||||
@export_multiline var description := ""
|
||||
@export var reference: Texture
|
|
@ -0,0 +1 @@
|
|||
uid://jipsgr06wtsu
|
322
addons/popochiu/editor/popups/setup/setup.gd
Normal file
322
addons/popochiu/editor/popups/setup/setup.gd
Normal file
|
@ -0,0 +1,322 @@
|
|||
@tool
|
||||
extends Control
|
||||
|
||||
signal template_copy_completed
|
||||
signal size_calculated
|
||||
|
||||
enum GameTypes {
|
||||
CUSTOM,
|
||||
HD,
|
||||
RETRO_PIXEL,
|
||||
}
|
||||
|
||||
const SCALE_MESSAGE =\
|
||||
"[center]▶ Base size = 356x200 | [b]scale = ( %.2f, %.2f )[/b] ◀[/center]\n\
|
||||
By default the GUI will match your native game resolution. You can change this with the\
|
||||
[code]Project Settings > Popochiu > GUI > Experimental Scale Gui[/code] checkbox."
|
||||
const COPY_ALPHA = 0.1
|
||||
const GUITemplateButton = preload(
|
||||
"res://addons/popochiu/editor/popups/setup/gui_template_button.gd"
|
||||
)
|
||||
const PopochiuGuiTemplatesHelper = preload(
|
||||
"res://addons/popochiu/editor/helpers/popochiu_gui_templates_helper.gd"
|
||||
)
|
||||
|
||||
var _selected_template: GUITemplateButton
|
||||
var _is_closing := false
|
||||
var _es := EditorInterface.get_editor_settings()
|
||||
|
||||
@onready var welcome: RichTextLabel = %Welcome
|
||||
@onready var game_width: SpinBox = %GameWidth
|
||||
@onready var game_height: SpinBox = %GameHeight
|
||||
@onready var scale_message: RichTextLabel = %ScaleMessage
|
||||
@onready var test_width: SpinBox = %TestWidth
|
||||
@onready var test_height: SpinBox = %TestHeight
|
||||
@onready var game_type: OptionButton = %GameType
|
||||
# ---- GUI templates section -----------------------------------------------------------------------
|
||||
@onready var gui_templates: HBoxContainer = %GUITemplates
|
||||
@onready var gui_templates_title: Label = %GUITemplatesTitle
|
||||
@onready var gui_templates_description: Label = %GUITemplatesDescription
|
||||
@onready var template_description_container: PanelContainer = %TemplateDescriptionContainer
|
||||
@onready var template_description: RichTextLabel = %TemplateDescription
|
||||
@onready var btn_change_template: Button = %BtnChangeTemplate
|
||||
@onready var copy_process_container: MarginContainer = %CopyProcessContainer
|
||||
@onready var copy_process_panel: PanelContainer = %CopyProcessPanel
|
||||
@onready var copy_process_label: Label = %CopyProcessLabel
|
||||
@onready var copy_process_bar: ProgressBar = %CopyProcessBar
|
||||
|
||||
|
||||
#region Godot ######################################################################################
|
||||
func _ready() -> void:
|
||||
# Connect to child signals
|
||||
game_width.value_changed.connect(_update_scale)
|
||||
game_height.value_changed.connect(_update_scale)
|
||||
btn_change_template.pressed.connect(_show_template_change_confirmation)
|
||||
|
||||
# Set default state
|
||||
template_description_container.hide()
|
||||
template_description.text = ""
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public #####################################################################################
|
||||
func on_about_to_popup() -> void:
|
||||
welcome.add_theme_font_override("bold_font", get_theme_font("bold", "EditorFonts"))
|
||||
scale_message.add_theme_font_override("normal_font", get_theme_font("main", "EditorFonts"))
|
||||
scale_message.add_theme_font_override("bold_font", get_theme_font("bold", "EditorFonts"))
|
||||
scale_message.add_theme_font_override("mono_font", get_theme_font("doc_source", "EditorFonts"))
|
||||
gui_templates_title.add_theme_font_override("font", get_theme_font("bold", "EditorFonts"))
|
||||
gui_templates_description.add_theme_font_override(
|
||||
"font", get_theme_font("doc_source", "EditorFonts")
|
||||
)
|
||||
template_description.add_theme_font_override("bold_font", get_theme_font("bold", "EditorFonts"))
|
||||
|
||||
|
||||
func on_close() -> void:
|
||||
if _is_closing:
|
||||
return
|
||||
|
||||
_is_closing = true
|
||||
|
||||
ProjectSettings.set_setting(PopochiuResources.DISPLAY_WIDTH, int(game_width.value))
|
||||
ProjectSettings.set_setting(PopochiuResources.DISPLAY_HEIGHT, int(game_height.value))
|
||||
ProjectSettings.set_setting(PopochiuResources.TEST_WIDTH, int(test_width.value))
|
||||
ProjectSettings.set_setting(PopochiuResources.TEST_HEIGHT, int(test_height.value))
|
||||
|
||||
match game_type.selected:
|
||||
GameTypes.HD:
|
||||
ProjectSettings.set_setting(PopochiuResources.STRETCH_MODE, "canvas_items")
|
||||
ProjectSettings.set_setting(PopochiuResources.STRETCH_ASPECT, "expand")
|
||||
|
||||
PopochiuConfig.set_pixel_art_textures(false)
|
||||
GameTypes.RETRO_PIXEL:
|
||||
ProjectSettings.set_setting(PopochiuResources.STRETCH_MODE, "canvas_items")
|
||||
ProjectSettings.set_setting(PopochiuResources.STRETCH_ASPECT, "keep")
|
||||
|
||||
PopochiuConfig.set_pixel_art_textures(true)
|
||||
|
||||
if not PopochiuResources.is_setup_done() or not PopochiuResources.is_gui_set():
|
||||
PopochiuResources.set_data_value("setup", "done", true)
|
||||
await _copy_template(true)
|
||||
|
||||
get_parent().queue_free()
|
||||
|
||||
|
||||
func define_content(show_welcome := false) -> void:
|
||||
_is_closing = false
|
||||
_selected_template = null
|
||||
btn_change_template.hide()
|
||||
copy_process_container.hide()
|
||||
|
||||
scale_message.modulate = Color(
|
||||
"#000" if "Light3D" in _es.get_setting("interface/theme/preset") else "#fff"
|
||||
)
|
||||
scale_message.modulate.a = 0.8
|
||||
|
||||
copy_process_panel.add_theme_stylebox_override(
|
||||
"panel", get_theme_stylebox("panel", "PopupPanel")
|
||||
)
|
||||
|
||||
if not show_welcome:
|
||||
welcome.text = "[center][b]POPOCHIU [shake]\\( u )3(u)/[/shake][/b][/center]"
|
||||
btn_change_template.disabled = true
|
||||
btn_change_template.show()
|
||||
|
||||
# ---- Set initial values for fields ---------------------------------------
|
||||
game_width.value = ProjectSettings.get_setting(PopochiuResources.DISPLAY_WIDTH)
|
||||
game_height.value = ProjectSettings.get_setting(PopochiuResources.DISPLAY_HEIGHT)
|
||||
test_width.value = ProjectSettings.get_setting(PopochiuResources.TEST_WIDTH)
|
||||
test_height.value = ProjectSettings.get_setting(PopochiuResources.TEST_HEIGHT)
|
||||
scale_message.text = _get_scale_message()
|
||||
|
||||
game_type.selected = GameTypes.CUSTOM
|
||||
|
||||
if ProjectSettings.get_setting(PopochiuResources.STRETCH_MODE) == "canvas_items":
|
||||
match ProjectSettings.get_setting(PopochiuResources.STRETCH_ASPECT):
|
||||
"expand":
|
||||
game_type.selected = GameTypes.HD
|
||||
"keep":
|
||||
game_type.selected = GameTypes.RETRO_PIXEL
|
||||
|
||||
# Load the list of templates
|
||||
await _load_templates()
|
||||
|
||||
_select_config_template()
|
||||
|
||||
if show_welcome:
|
||||
# Make Pixel the default game type checked during first run
|
||||
game_type.selected = GameTypes.RETRO_PIXEL
|
||||
|
||||
if PopochiuResources.GUI_GAME_SCENE in EditorInterface.get_open_scenes():
|
||||
_show_gui_warning()
|
||||
|
||||
for btn: Button in gui_templates.get_children():
|
||||
btn.disabled = true
|
||||
|
||||
template_description_container.hide()
|
||||
|
||||
_update_size()
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private ####################################################################################
|
||||
func _update_scale(_value: float) -> void:
|
||||
scale_message.text = _get_scale_message()
|
||||
|
||||
|
||||
func _get_scale_message() -> String:
|
||||
var scale := Vector2(game_width.value, game_height.value) / PopochiuResources.RETRO_RESOLUTION
|
||||
return SCALE_MESSAGE % [scale.x, scale.y]
|
||||
|
||||
|
||||
func _on_gui_template_selected(button: GUITemplateButton) -> void:
|
||||
for btn in gui_templates.get_children():
|
||||
if not btn is GUITemplateButton: continue
|
||||
|
||||
(btn as GUITemplateButton).set_pressed_no_signal(false)
|
||||
|
||||
button.set_pressed_no_signal(true)
|
||||
_selected_template = button
|
||||
|
||||
template_description.text = button.description
|
||||
template_description_container.show()
|
||||
|
||||
if PopochiuResources.get_data_value("setup", "done", false) == true:
|
||||
btn_change_template.disabled = (
|
||||
_selected_template.name == PopochiuResources.get_data_value("ui", "template", "")
|
||||
)
|
||||
|
||||
_update_size()
|
||||
|
||||
|
||||
func _select_config_template() -> void:
|
||||
var current_template: String = PopochiuResources.get_data_value("ui", "template", "")
|
||||
|
||||
for btn: Button in gui_templates.get_children():
|
||||
if not btn is GUITemplateButton: continue
|
||||
|
||||
btn.disabled = false
|
||||
|
||||
if not btn.pressed.is_connected(_on_gui_template_selected):
|
||||
btn.pressed.connect(_on_gui_template_selected.bind(btn))
|
||||
|
||||
if current_template == btn.name:
|
||||
_on_gui_template_selected(btn)
|
||||
|
||||
if not _selected_template:
|
||||
_on_gui_template_selected(gui_templates.get_child(3))
|
||||
|
||||
|
||||
func _show_gui_warning() -> void:
|
||||
var warning_dialog := AcceptDialog.new()
|
||||
_setup_inner_dialog(
|
||||
warning_dialog,
|
||||
"GUI template warning",
|
||||
"The GUI scene (gui.tscn) is currently opened in the Editor.\n\n" +\
|
||||
"In order to change the GUI template please close that scene first."
|
||||
)
|
||||
|
||||
add_child(warning_dialog)
|
||||
warning_dialog.popup_centered()
|
||||
|
||||
|
||||
func _show_template_change_confirmation() -> void:
|
||||
var confirmation_dialog := ConfirmationDialog.new()
|
||||
_setup_inner_dialog(
|
||||
confirmation_dialog,
|
||||
"Confirm GUI template change",
|
||||
"You changed the GUI template, making this will override any changes you made to the files\
|
||||
in res://game/gui/.\n\nAre you sure you want to make the change?"
|
||||
)
|
||||
|
||||
confirmation_dialog.confirmed.connect(
|
||||
func():
|
||||
confirmation_dialog.queue_free()
|
||||
_copy_template()
|
||||
)
|
||||
|
||||
add_child(confirmation_dialog)
|
||||
confirmation_dialog.popup_centered()
|
||||
|
||||
|
||||
func _setup_inner_dialog(dialog: Window, ttl: String, txt: String) -> void:
|
||||
dialog.title = ttl
|
||||
dialog.dialog_text = txt
|
||||
dialog.dialog_autowrap = true
|
||||
dialog.min_size.x = size.x - 64
|
||||
|
||||
|
||||
func _load_templates() -> void:
|
||||
for idx in range(1, gui_templates.get_child_count()):
|
||||
gui_templates.get_child(idx).free()
|
||||
|
||||
# This is better than awating for SceneTree.process_frame
|
||||
await get_tree().process_frame
|
||||
|
||||
for dir_name: String in DirAccess.get_directories_at(PopochiuResources.GUI_TEMPLATES_FOLDER):
|
||||
var template_info: PopochiuGUIInfo = load(PopochiuResources.GUI_TEMPLATES_FOLDER.path_join(
|
||||
"%s/%s_gui_info.tres" % [dir_name, dir_name]
|
||||
))
|
||||
|
||||
var button := GUITemplateButton.new()
|
||||
button.toggle_mode = true
|
||||
button.custom_minimum_size = Vector2.ONE * 128.0
|
||||
button.name = dir_name.to_pascal_case()
|
||||
button.text = (
|
||||
dir_name.capitalize() if template_info.title.is_empty() else template_info.title
|
||||
)
|
||||
button.description = template_info.description
|
||||
button.icon = template_info.icon
|
||||
button.icon_alignment = HORIZONTAL_ALIGNMENT_CENTER
|
||||
button.vertical_icon_alignment = VERTICAL_ALIGNMENT_TOP
|
||||
button.expand_icon = true
|
||||
button.texture_filter = CanvasItem.TEXTURE_FILTER_NEAREST
|
||||
button.mouse_default_cursor_shape = Control.CURSOR_POINTING_HAND
|
||||
|
||||
gui_templates.add_child(button)
|
||||
|
||||
|
||||
func _copy_template(is_first_copy := false) -> void:
|
||||
get_parent().get_ok_button().disabled = true
|
||||
|
||||
$PanelContainer/VBoxContainer.modulate.a = COPY_ALPHA
|
||||
copy_process_label.text = ""
|
||||
copy_process_bar.value = 0
|
||||
|
||||
PopochiuGuiTemplatesHelper.copy_gui_template(
|
||||
_selected_template.name, _template_copy_progressed, _template_copy_completed
|
||||
)
|
||||
|
||||
copy_process_container.show()
|
||||
|
||||
# if true, make the popup visible so devs can see the copy process feedback
|
||||
if is_first_copy:
|
||||
get_parent().visible = true
|
||||
await template_copy_completed
|
||||
|
||||
|
||||
func _template_copy_progressed(value: int, message: String) -> void:
|
||||
copy_process_label.text = message
|
||||
copy_process_bar.value = value
|
||||
|
||||
|
||||
func _template_copy_completed() -> void:
|
||||
get_parent().get_ok_button().disabled = false
|
||||
btn_change_template.disabled = true
|
||||
$PanelContainer/VBoxContainer.modulate.a = 1
|
||||
|
||||
copy_process_container.hide()
|
||||
template_copy_completed.emit()
|
||||
|
||||
|
||||
func _update_size() -> void:
|
||||
# Wait for the popup content to be rendered in order to get its size
|
||||
await get_tree().create_timer(0.05).timeout
|
||||
|
||||
custom_minimum_size = get_child(0).size
|
||||
size_calculated.emit()
|
||||
|
||||
|
||||
#endregion
|
1
addons/popochiu/editor/popups/setup/setup.gd.uid
Normal file
1
addons/popochiu/editor/popups/setup/setup.gd.uid
Normal file
|
@ -0,0 +1 @@
|
|||
uid://bnrugyidqycwj
|
307
addons/popochiu/editor/popups/setup/setup.tscn
Normal file
307
addons/popochiu/editor/popups/setup/setup.tscn
Normal file
|
@ -0,0 +1,307 @@
|
|||
[gd_scene load_steps=5 format=3 uid="uid://c3r8juwutb1gr"]
|
||||
|
||||
[ext_resource type="Script" path="res://addons/popochiu/editor/popups/setup/setup.gd" id="1_vjboj"]
|
||||
[ext_resource type="Script" path="res://addons/popochiu/editor/popups/setup/gui_template_button.gd" id="3_jf6nd"]
|
||||
[ext_resource type="Texture2D" uid="uid://c00kw8v34vtsb" path="res://addons/popochiu/icons/ico_custom.png" id="5_joicf"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ntnwv"]
|
||||
content_margin_left = 8.0
|
||||
content_margin_top = 8.0
|
||||
content_margin_right = 8.0
|
||||
content_margin_bottom = 8.0
|
||||
bg_color = Color(0.698039, 0.698039, 0.698039, 1)
|
||||
draw_center = false
|
||||
border_width_left = 2
|
||||
border_width_top = 2
|
||||
border_width_right = 2
|
||||
border_width_bottom = 2
|
||||
corner_radius_top_left = 4
|
||||
corner_radius_top_right = 4
|
||||
corner_radius_bottom_right = 4
|
||||
corner_radius_bottom_left = 4
|
||||
|
||||
[node name="Setup" type="Control"]
|
||||
custom_minimum_size = Vector2(560, 608)
|
||||
layout_mode = 3
|
||||
anchors_preset = 0
|
||||
offset_right = 560.0
|
||||
offset_bottom = 608.0
|
||||
script = ExtResource("1_vjboj")
|
||||
|
||||
[node name="PanelContainer" type="PanelContainer" parent="."]
|
||||
custom_minimum_size = Vector2(560, 608)
|
||||
layout_mode = 1
|
||||
anchors_preset = 10
|
||||
anchor_right = 1.0
|
||||
offset_bottom = 607.0
|
||||
grow_horizontal = 2
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/separation = 12
|
||||
|
||||
[node name="Welcome" type="RichTextLabel" parent="PanelContainer/VBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
bbcode_enabled = true
|
||||
text = "[center]Welcome to [shake]Popochiu \\( o )3(o)/[/shake][/center]
|
||||
|
||||
This popup will appear automatically just this time. You can open it later with the Setup button at the bottom of Popochiu's dock."
|
||||
fit_content = true
|
||||
scroll_active = false
|
||||
meta_underlined = false
|
||||
hint_underlined = false
|
||||
|
||||
[node name="WelcomeSeparator" type="HSeparator" parent="PanelContainer/VBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
|
||||
[node name="SizeContainer" type="HBoxContainer" parent="PanelContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="GameSize" type="Label" parent="PanelContainer/VBoxContainer/SizeContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 0
|
||||
tooltip_text = "The width and height of the game's window. Changing this will update display/window/size/width and display/window/size/height."
|
||||
mouse_filter = 0
|
||||
text = "Native game resolution"
|
||||
|
||||
[node name="VBoxContainer" type="HBoxContainer" parent="PanelContainer/VBoxContainer/SizeContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="WidthContainer" type="VBoxContainer" parent="PanelContainer/VBoxContainer/SizeContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="GameWidth" type="SpinBox" parent="PanelContainer/VBoxContainer/SizeContainer/VBoxContainer/WidthContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
min_value = 64.0
|
||||
max_value = 1440.0
|
||||
value = 320.0
|
||||
rounded = true
|
||||
allow_greater = true
|
||||
|
||||
[node name="Width" type="Label" parent="PanelContainer/VBoxContainer/SizeContainer/VBoxContainer/WidthContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "width"
|
||||
|
||||
[node name="HeightContainer" type="VBoxContainer" parent="PanelContainer/VBoxContainer/SizeContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="GameHeight" type="SpinBox" parent="PanelContainer/VBoxContainer/SizeContainer/VBoxContainer/HeightContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
min_value = 64.0
|
||||
max_value = 1440.0
|
||||
value = 180.0
|
||||
rounded = true
|
||||
allow_greater = true
|
||||
|
||||
[node name="Height" type="Label" parent="PanelContainer/VBoxContainer/SizeContainer/VBoxContainer/HeightContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "height"
|
||||
|
||||
[node name="ScaleMessage" type="RichTextLabel" parent="PanelContainer/VBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
bbcode_enabled = true
|
||||
fit_content = true
|
||||
scroll_active = false
|
||||
|
||||
[node name="TestContainer" type="HBoxContainer" parent="PanelContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="TestSize" type="Label" parent="PanelContainer/VBoxContainer/TestContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 0
|
||||
tooltip_text = "The width and height of the game's test window. Changing this will update display/window/size/test_width and display/window/size/test_height."
|
||||
mouse_filter = 0
|
||||
text = "Playing window resolution"
|
||||
|
||||
[node name="VBoxContainer" type="HBoxContainer" parent="PanelContainer/VBoxContainer/TestContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="WidthContainer" type="VBoxContainer" parent="PanelContainer/VBoxContainer/TestContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="TestWidth" type="SpinBox" parent="PanelContainer/VBoxContainer/TestContainer/VBoxContainer/WidthContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
max_value = 1440.0
|
||||
value = 640.0
|
||||
rounded = true
|
||||
allow_greater = true
|
||||
|
||||
[node name="Width" type="Label" parent="PanelContainer/VBoxContainer/TestContainer/VBoxContainer/WidthContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "width"
|
||||
|
||||
[node name="HeightContainer" type="VBoxContainer" parent="PanelContainer/VBoxContainer/TestContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="TestHeight" type="SpinBox" parent="PanelContainer/VBoxContainer/TestContainer/VBoxContainer/HeightContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
max_value = 1440.0
|
||||
value = 360.0
|
||||
rounded = true
|
||||
allow_greater = true
|
||||
|
||||
[node name="Height" type="Label" parent="PanelContainer/VBoxContainer/TestContainer/VBoxContainer/HeightContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "height"
|
||||
|
||||
[node name="TypeContainer" type="HBoxContainer" parent="PanelContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Type" type="Label" parent="PanelContainer/VBoxContainer/TypeContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
tooltip_text = "The type of game modifies the stretch mode and the default preset for importing 2D images.
|
||||
|
||||
Default: No stretch. Texture2D import preset set to: 2D.
|
||||
2D: Stretch mode set to 2D and stretch aspect set to keep. Texture2D import preset set to: 2D.
|
||||
Pixel: Stretch mode set to 2D and stretch aspect set to keep. Texture2D import preset set to: 2D Pixel."
|
||||
mouse_filter = 0
|
||||
text = "Game type"
|
||||
|
||||
[node name="GameType" type="OptionButton" parent="PanelContainer/VBoxContainer/TypeContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
item_count = 3
|
||||
popup/item_0/text = "Custom"
|
||||
popup/item_1/text = "2D"
|
||||
popup/item_1/id = 1
|
||||
popup/item_2/text = "Pixel"
|
||||
popup/item_2/id = 2
|
||||
|
||||
[node name="TemplateSeparator" type="HSeparator" parent="PanelContainer/VBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
|
||||
[node name="GUITemplatesPanel" type="PanelContainer" parent="PanelContainer/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="GUITemplatesContainer" type="VBoxContainer" parent="PanelContainer/VBoxContainer/GUITemplatesPanel"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="GUITemplatesTitle" type="Label" parent="PanelContainer/VBoxContainer/GUITemplatesPanel/GUITemplatesContainer"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(544, 0)
|
||||
layout_mode = 2
|
||||
text = "GUI Template"
|
||||
horizontal_alignment = 1
|
||||
autowrap_mode = 3
|
||||
|
||||
[node name="GUITemplatesDescription" type="Label" parent="PanelContainer/VBoxContainer/GUITemplatesPanel/GUITemplatesContainer"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(544, 0)
|
||||
layout_mode = 2
|
||||
text = "Select a template to define the look and feel of your game. Click each button to see a short description."
|
||||
horizontal_alignment = 1
|
||||
autowrap_mode = 3
|
||||
|
||||
[node name="PanelContainer" type="PanelContainer" parent="PanelContainer/VBoxContainer/GUITemplatesPanel/GUITemplatesContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_ntnwv")
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer/VBoxContainer/GUITemplatesPanel/GUITemplatesContainer/PanelContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="GUITemplates" type="HBoxContainer" parent="PanelContainer/VBoxContainer/GUITemplatesPanel/GUITemplatesContainer/PanelContainer/VBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
alignment = 1
|
||||
|
||||
[node name="Custom" type="Button" parent="PanelContainer/VBoxContainer/GUITemplatesPanel/GUITemplatesContainer/PanelContainer/VBoxContainer/GUITemplates"]
|
||||
visible = false
|
||||
texture_filter = 1
|
||||
custom_minimum_size = Vector2(128, 128)
|
||||
layout_mode = 2
|
||||
mouse_default_cursor_shape = 2
|
||||
toggle_mode = true
|
||||
text = "Custom"
|
||||
icon = ExtResource("5_joicf")
|
||||
icon_alignment = 1
|
||||
vertical_icon_alignment = 0
|
||||
expand_icon = true
|
||||
script = ExtResource("3_jf6nd")
|
||||
description = "You are an adventorous developer who wants to implement each own Graphic Interface. [shake]You rock!!![/shake]"
|
||||
|
||||
[node name="TemplateDescriptionContainer" type="PanelContainer" parent="PanelContainer/VBoxContainer/GUITemplatesPanel/GUITemplatesContainer/PanelContainer/VBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="PanelContainer/VBoxContainer/GUITemplatesPanel/GUITemplatesContainer/PanelContainer/VBoxContainer/TemplateDescriptionContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/margin_left = 4
|
||||
theme_override_constants/margin_top = 4
|
||||
theme_override_constants/margin_right = 4
|
||||
theme_override_constants/margin_bottom = 4
|
||||
|
||||
[node name="TemplateDescription" type="RichTextLabel" parent="PanelContainer/VBoxContainer/GUITemplatesPanel/GUITemplatesContainer/PanelContainer/VBoxContainer/TemplateDescriptionContainer/MarginContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
bbcode_enabled = true
|
||||
fit_content = true
|
||||
scroll_active = false
|
||||
|
||||
[node name="BtnChangeTemplate" type="Button" parent="PanelContainer/VBoxContainer/GUITemplatesPanel/GUITemplatesContainer/PanelContainer/VBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
custom_minimum_size = Vector2(0, 48)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
mouse_default_cursor_shape = 2
|
||||
text = "Use this GUI Template"
|
||||
|
||||
[node name="CopyProcessContainer" type="MarginContainer" parent="PanelContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme_override_constants/margin_left = 0
|
||||
theme_override_constants/margin_top = 0
|
||||
theme_override_constants/margin_right = 0
|
||||
theme_override_constants/margin_bottom = 0
|
||||
|
||||
[node name="Overlay" type="ColorRect" parent="PanelContainer/CopyProcessContainer"]
|
||||
layout_mode = 2
|
||||
color = Color(0, 0, 0, 0)
|
||||
|
||||
[node name="CopyProcessPanel" type="PanelContainer" parent="PanelContainer/CopyProcessContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 4
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer/CopyProcessContainer/CopyProcessPanel"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 4
|
||||
|
||||
[node name="CopyProcessBar" type="ProgressBar" parent="PanelContainer/CopyProcessContainer/CopyProcessPanel/VBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 4
|
||||
value = 50.0
|
||||
|
||||
[node name="CopyProcessLabel" type="Label" parent="PanelContainer/CopyProcessContainer/CopyProcessPanel/VBoxContainer"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "Starting GUI template application"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
uppercase = true
|
Loading…
Add table
Add a link
Reference in a new issue