From 74a5c3ac69d29c2cfa022bc96b0cdb31d57c890d Mon Sep 17 00:00:00 2001 From: stilobique-surface Date: Fri, 14 May 2021 22:27:40 +0200 Subject: [PATCH] Reordering scene, and setup basic scene instance on main view --- assets/ui/summary/UI_footer_summary.tscn | 54 ----------- assets/ui/summary/UI_header_summary.tscn | 97 -------------------- project.godot | 2 +- scenes/UI/ChooseScene.tscn | 61 ------------ scenes/UI/Loading.gd | 4 - scenes/UI/Loading.tscn | 51 ---------- scenes/UI/Settings.tscn | 70 -------------- {assets/ui => scenes/UI}/UI_summary.tscn | 6 +- scenes/UI/{ => choose_scenes}/ChooseScene.gd | 0 scenes/UI/choose_scenes/ChooseScene.tscn | 55 +++++++++++ scenes/UI/loading/Loading.gd | 4 + scenes/UI/loading/Loading.tscn | 54 +++++++++++ scenes/UI/{ => settings}/Settings.gd | 4 +- scenes/UI/settings/Settings.tscn | 64 +++++++++++++ scenes/UI/title/UI_title.tscn | 18 ++++ scenes/main.gd | 6 +- scenes/main.tscn | 56 ++++++----- 17 files changed, 238 insertions(+), 368 deletions(-) delete mode 100644 assets/ui/summary/UI_footer_summary.tscn delete mode 100644 assets/ui/summary/UI_header_summary.tscn delete mode 100644 scenes/UI/ChooseScene.tscn delete mode 100644 scenes/UI/Loading.gd delete mode 100644 scenes/UI/Loading.tscn delete mode 100644 scenes/UI/Settings.tscn rename {assets/ui => scenes/UI}/UI_summary.tscn (99%) rename scenes/UI/{ => choose_scenes}/ChooseScene.gd (100%) create mode 100644 scenes/UI/choose_scenes/ChooseScene.tscn create mode 100644 scenes/UI/loading/Loading.gd create mode 100644 scenes/UI/loading/Loading.tscn rename scenes/UI/{ => settings}/Settings.gd (87%) create mode 100644 scenes/UI/settings/Settings.tscn create mode 100644 scenes/UI/title/UI_title.tscn diff --git a/assets/ui/summary/UI_footer_summary.tscn b/assets/ui/summary/UI_footer_summary.tscn deleted file mode 100644 index 1ccc1b9..0000000 --- a/assets/ui/summary/UI_footer_summary.tscn +++ /dev/null @@ -1,54 +0,0 @@ -[gd_scene load_steps=3 format=2] - -[ext_resource path="res://assets/ui/themes/button-summary.jpg" type="Texture" id=1] -[ext_resource path="res://assets/ui/themes/button-summary-hover.jpg" type="Texture" id=2] - -[node name="VBoxContainer" type="VBoxContainer"] -anchor_top = 1.0 -anchor_right = 1.0 -anchor_bottom = 1.0 -margin_top = -188.0 -size_flags_horizontal = 11 -size_flags_vertical = 11 -custom_constants/separation = 20 -alignment = 2 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="ButtonQuit" type="TextureButton" parent="."] -margin_top = 154.0 -margin_right = 1440.0 -margin_bottom = 154.0 -size_flags_vertical = 10 -texture_normal = ExtResource( 1 ) -texture_hover = ExtResource( 2 ) -expand = true -__meta__ = { -"_editor_description_": "" -} - -[node name="Label" type="Label" parent="ButtonQuit"] -anchor_left = 0.5 -anchor_top = 0.5 -anchor_right = 0.5 -anchor_bottom = 0.5 -margin_left = -23.0 -margin_top = -7.0 -margin_right = 23.0 -margin_bottom = 7.0 -size_flags_horizontal = 7 -size_flags_vertical = 3 -text = "Quitter" -align = 1 -valign = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="LabelVersion" type="Label" parent="."] -margin_top = 174.0 -margin_right = 1440.0 -margin_bottom = 188.0 -text = "v XX.XX" -align = 2 diff --git a/assets/ui/summary/UI_header_summary.tscn b/assets/ui/summary/UI_header_summary.tscn deleted file mode 100644 index 3292b2f..0000000 --- a/assets/ui/summary/UI_header_summary.tscn +++ /dev/null @@ -1,97 +0,0 @@ -[gd_scene load_steps=4 format=2] - -[ext_resource path="res://assets/ui/icones/treasure.png" type="Texture" id=1] -[ext_resource path="res://assets/ui/themes/button-summary.jpg" type="Texture" id=2] -[ext_resource path="res://assets/ui/themes/button-summary-hover.jpg" type="Texture" id=3] - -[node name="VBoxContainer" type="VBoxContainer"] -anchor_right = 1.0 -margin_bottom = 565.0 -rect_clip_content = true -size_flags_horizontal = 11 -size_flags_vertical = 11 -custom_constants/separation = 0 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="CenterContainer" type="CenterContainer" parent="."] -margin_right = 1440.0 -margin_bottom = 168.0 -size_flags_horizontal = 3 -size_flags_vertical = 3 - -[node name="TextureRect" type="TextureRect" parent="CenterContainer"] -margin_left = 656.0 -margin_top = 20.0 -margin_right = 784.0 -margin_bottom = 148.0 -size_flags_horizontal = 4 -size_flags_vertical = 4 -texture = ExtResource( 1 ) -stretch_mode = 1 -flip_h = true - -[node name="ButtonPuzzle" type="TextureButton" parent="."] -margin_top = 168.0 -margin_right = 1440.0 -margin_bottom = 336.0 -size_flags_horizontal = 3 -size_flags_vertical = 3 -texture_normal = ExtResource( 2 ) -texture_hover = ExtResource( 3 ) -expand = true -__meta__ = { -"_editor_description_": "" -} - -[node name="Label" type="Label" parent="ButtonPuzzle"] -anchor_right = 1.0 -anchor_bottom = 1.0 -size_flags_horizontal = 7 -size_flags_vertical = 3 -text = "Puzzle" -align = 1 -valign = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="MarginContainer" type="MarginContainer" parent="."] -margin_top = 336.0 -margin_right = 1440.0 -margin_bottom = 366.0 -custom_constants/margin_top = 30 - -[node name="ButtonSetting" type="TextureButton" parent="."] -margin_top = 366.0 -margin_right = 1440.0 -margin_bottom = 534.0 -size_flags_horizontal = 3 -size_flags_vertical = 3 -texture_normal = ExtResource( 2 ) -texture_hover = ExtResource( 3 ) -expand = true -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="Label" type="Label" parent="ButtonSetting"] -anchor_right = 1.0 -anchor_bottom = 1.0 -margin_top = -0.840881 -margin_bottom = -0.840881 -size_flags_horizontal = 7 -size_flags_vertical = 3 -text = "Parametres" -align = 1 -valign = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="MarginContainer2" type="MarginContainer" parent="."] -margin_top = 534.0 -margin_right = 1440.0 -margin_bottom = 564.0 -custom_constants/margin_top = 30 diff --git a/project.godot b/project.godot index 45e65cb..2d2a104 100644 --- a/project.godot +++ b/project.godot @@ -178,7 +178,7 @@ config/quit_on_go_back=false [autoload] Global="*res://scenes/Global.gd" -Loading="*res://scenes/UI/Loading.tscn" +Loading="*res://scenes/UI/loading/Loading.tscn" gddb_constants="*res://addons/godot_db_manager/core/GDDBConstants.gd" gddb_types="*res://addons/godot_db_manager/core/GDDBTypes.gd" gddb_globals="*res://addons/godot_db_manager/core/GDDBGlobals.gd" diff --git a/scenes/UI/ChooseScene.tscn b/scenes/UI/ChooseScene.tscn deleted file mode 100644 index d532ca3..0000000 --- a/scenes/UI/ChooseScene.tscn +++ /dev/null @@ -1,61 +0,0 @@ -[gd_scene load_steps=3 format=2] - -[ext_resource path="res://scenes/UI/ChooseScene.gd" type="Script" id=1] -[ext_resource path="res://assets/levels/warcraft.jpg" type="Texture" id=2] - -[node name="ChooseScene" type="Control"] -anchor_right = 1.0 -anchor_bottom = 1.0 -script = ExtResource( 1 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="games" type="Control" parent="."] -margin_left = 200.0 -margin_right = 1024.0 -margin_bottom = 600.0 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="GridContainer" type="GridContainer" parent="games"] -margin_left = 503.586 -margin_top = 300.0 -margin_right = 1302.59 -margin_bottom = 604.0 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="WarCraft" type="TextureButton" parent="games/GridContainer"] -margin_right = 150.0 -margin_bottom = 150.0 -mouse_default_cursor_shape = 2 -texture_normal = ExtResource( 2 ) - -[node name="Lightmap" type="TextureButton" parent="games/GridContainer"] -margin_top = 154.0 -margin_right = 150.0 -margin_bottom = 304.0 -mouse_default_cursor_shape = 2 -texture_normal = ExtResource( 2 ) - -[node name="Label" type="Label" parent="games/GridContainer/Lightmap"] -margin_right = 40.0 -margin_bottom = 14.0 -text = "Lightmap" -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="Container" type="Control" parent="games"] -margin_right = 824.0 -margin_bottom = 300.0 - -[node name="HBoxContainer" type="VBoxContainer" parent="games/Container"] -margin_right = 824.0 -margin_bottom = 300.0 - -[connection signal="pressed" from="games/GridContainer/WarCraft" to="." method="_on_WarCraft_pressed"] -[connection signal="pressed" from="games/GridContainer/Lightmap" to="." method="_on_Lightmap_pressed"] diff --git a/scenes/UI/Loading.gd b/scenes/UI/Loading.gd deleted file mode 100644 index ba215df..0000000 --- a/scenes/UI/Loading.gd +++ /dev/null @@ -1,4 +0,0 @@ -extends Control - -func _ready(): - $ColorRect/CenterContainer/VBoxContainer/Label.text = tr("LOADING") diff --git a/scenes/UI/Loading.tscn b/scenes/UI/Loading.tscn deleted file mode 100644 index bd96c26..0000000 --- a/scenes/UI/Loading.tscn +++ /dev/null @@ -1,51 +0,0 @@ -[gd_scene load_steps=2 format=2] - -[ext_resource path="res://scenes/UI/Loading.gd" type="Script" id=1] - -[node name="Control" type="Control"] -anchor_right = 1.0 -anchor_bottom = 1.0 -script = ExtResource( 1 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="ColorRect" type="ColorRect" parent="."] -margin_right = 1024.0 -margin_bottom = 600.0 -rect_scale = Vector2( 1.00231, 1 ) -color = Color( 0, 0, 0, 1 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="CenterContainer" type="CenterContainer" parent="ColorRect"] -margin_top = 282.0 -margin_right = 1024.0 -margin_bottom = 282.0 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="VBoxContainer" type="VBoxContainer" parent="ColorRect/CenterContainer"] -margin_left = 479.0 -margin_right = 544.0 -margin_bottom = 32.0 -alignment = 1 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="Label" type="Label" parent="ColorRect/CenterContainer/VBoxContainer"] -margin_right = 65.0 -margin_bottom = 14.0 -text = "Loading ..." -align = 1 - -[node name="ProgressBar" type="ProgressBar" parent="ColorRect/CenterContainer/VBoxContainer"] -margin_top = 18.0 -margin_right = 65.0 -margin_bottom = 32.0 -max_value = 1.0 -step = 0.1 -rounded = true diff --git a/scenes/UI/Settings.tscn b/scenes/UI/Settings.tscn deleted file mode 100644 index d656721..0000000 --- a/scenes/UI/Settings.tscn +++ /dev/null @@ -1,70 +0,0 @@ -[gd_scene load_steps=2 format=2] - -[ext_resource path="res://scenes/UI/Settings.gd" type="Script" id=1] - -[node name="Settings" type="Control"] -script = ExtResource( 1 ) -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="CenterContainer" type="CenterContainer" parent="."] -margin_left = 150.0 -margin_right = 1024.0 -margin_bottom = 600.0 -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer"] -margin_left = 360.0 -margin_top = 271.0 -margin_right = 513.0 -margin_bottom = 329.0 -alignment = 1 - -[node name="Langue" type="CenterContainer" parent="CenterContainer/VBoxContainer"] -margin_right = 153.0 -margin_bottom = 14.0 - -[node name="HBoxContainer" type="HBoxContainer" parent="CenterContainer/VBoxContainer/Langue"] -margin_left = 42.0 -margin_right = 111.0 -margin_bottom = 14.0 - -[node name="Label" type="Label" parent="CenterContainer/VBoxContainer/Langue/HBoxContainer"] -margin_right = 50.0 -margin_bottom = 14.0 -text = "langue :" - -[node name="data" type="Label" parent="CenterContainer/VBoxContainer/Langue/HBoxContainer"] -margin_left = 54.0 -margin_right = 69.0 -margin_bottom = 14.0 -text = "FR" -__meta__ = { -"_edit_use_anchors_": false -} - -[node name="gyroscope" type="CenterContainer" parent="CenterContainer/VBoxContainer"] -margin_top = 18.0 -margin_right = 153.0 -margin_bottom = 58.0 - -[node name="HBoxContainer" type="HBoxContainer" parent="CenterContainer/VBoxContainer/gyroscope"] -margin_right = 153.0 -margin_bottom = 40.0 - -[node name="Label" type="Label" parent="CenterContainer/VBoxContainer/gyroscope/HBoxContainer"] -margin_top = 13.0 -margin_right = 73.0 -margin_bottom = 27.0 -text = "gyroscope :" - -[node name="data" type="CheckButton" parent="CenterContainer/VBoxContainer/gyroscope/HBoxContainer"] -margin_left = 77.0 -margin_right = 153.0 -margin_bottom = 40.0 -align = 1 - -[connection signal="pressed" from="CenterContainer/VBoxContainer/gyroscope/HBoxContainer/data" to="." method="_on_gyroscope_pressed"] diff --git a/assets/ui/UI_summary.tscn b/scenes/UI/UI_summary.tscn similarity index 99% rename from assets/ui/UI_summary.tscn rename to scenes/UI/UI_summary.tscn index fc09a66..aeb0a97 100644 --- a/assets/ui/UI_summary.tscn +++ b/scenes/UI/UI_summary.tscn @@ -227,7 +227,7 @@ size_flags_horizontal = 7 size_flags_vertical = 3 custom_fonts/font = ExtResource( 7 ) custom_colors/font_color = Color( 0, 0, 0, 1 ) -text = "Puzzles" +text = "Puzz" align = 1 valign = 1 __meta__ = { @@ -254,7 +254,7 @@ size_flags_horizontal = 7 size_flags_vertical = 3 custom_fonts/font = ExtResource( 7 ) custom_colors/font_color = Color( 0, 0, 0, 1 ) -text = "Paramétres" +text = "Param" align = 1 valign = 1 __meta__ = { @@ -287,7 +287,7 @@ size_flags_horizontal = 7 size_flags_vertical = 3 custom_fonts/font = ExtResource( 7 ) custom_colors/font_color = Color( 0, 0, 0, 1 ) -text = "Quitter" +text = "Quit" align = 1 valign = 1 __meta__ = { diff --git a/scenes/UI/ChooseScene.gd b/scenes/UI/choose_scenes/ChooseScene.gd similarity index 100% rename from scenes/UI/ChooseScene.gd rename to scenes/UI/choose_scenes/ChooseScene.gd diff --git a/scenes/UI/choose_scenes/ChooseScene.tscn b/scenes/UI/choose_scenes/ChooseScene.tscn new file mode 100644 index 0000000..34feb87 --- /dev/null +++ b/scenes/UI/choose_scenes/ChooseScene.tscn @@ -0,0 +1,55 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://scenes/UI/choose_scenes/ChooseScene.gd" type="Script" id=1] +[ext_resource path="res://assets/levels/warcraft.jpg" type="Texture" id=2] + +[node name="ChooseScene" type="CenterContainer"] +anchor_right = 1.0 +anchor_bottom = 1.0 +script = ExtResource( 1 ) +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="GridContainer" type="GridContainer" parent="."] +margin_left = 645.0 +margin_top = 298.0 +margin_right = 795.0 +margin_bottom = 602.0 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="WarCraft" type="TextureButton" parent="GridContainer"] +margin_right = 150.0 +margin_bottom = 150.0 +mouse_default_cursor_shape = 2 +texture_normal = ExtResource( 2 ) + +[node name="Lightmap" type="TextureButton" parent="GridContainer"] +margin_top = 154.0 +margin_right = 150.0 +margin_bottom = 304.0 +mouse_default_cursor_shape = 2 +texture_normal = ExtResource( 2 ) + +[node name="Label" type="Label" parent="GridContainer/Lightmap"] +margin_right = 40.0 +margin_bottom = 14.0 +text = "Lightmap" +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="Container" type="Control" parent="."] +margin_left = 720.0 +margin_top = 450.0 +margin_right = 720.0 +margin_bottom = 450.0 + +[node name="HBoxContainer" type="VBoxContainer" parent="Container"] +margin_right = 824.0 +margin_bottom = 300.0 + +[connection signal="pressed" from="GridContainer/WarCraft" to="." method="_on_WarCraft_pressed"] +[connection signal="pressed" from="GridContainer/Lightmap" to="." method="_on_Lightmap_pressed"] diff --git a/scenes/UI/loading/Loading.gd b/scenes/UI/loading/Loading.gd new file mode 100644 index 0000000..94f02e5 --- /dev/null +++ b/scenes/UI/loading/Loading.gd @@ -0,0 +1,4 @@ +extends Control + +func _ready(): + $VBoxContainer/Label.text = tr("LOADING") diff --git a/scenes/UI/loading/Loading.tscn b/scenes/UI/loading/Loading.tscn new file mode 100644 index 0000000..b3f3417 --- /dev/null +++ b/scenes/UI/loading/Loading.tscn @@ -0,0 +1,54 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://scenes/UI/loading/Loading.gd" type="Script" id=1] + +[node name="Control" type="CenterContainer"] +anchor_right = 1.0 +anchor_bottom = 1.0 +script = ExtResource( 1 ) +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="VBoxContainer" type="VBoxContainer" parent="."] +margin_left = 687.0 +margin_top = 432.0 +margin_right = 752.0 +margin_bottom = 468.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 +alignment = 1 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="Label" type="Label" parent="VBoxContainer"] +margin_right = 65.0 +margin_bottom = 14.0 +text = "Loading ..." +align = 1 + +[node name="MarginContainer" type="MarginContainer" parent="VBoxContainer"] +margin_top = 18.0 +margin_right = 65.0 +margin_bottom = 18.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 + +[node name="ProgressBar" type="ProgressBar" parent="VBoxContainer"] +margin_top = 22.0 +margin_right = 65.0 +margin_bottom = 36.0 +max_value = 1.0 +step = 0.1 +rounded = true + +[node name="ColorRect" type="ColorRect" parent="."] +margin_left = 720.0 +margin_top = 450.0 +margin_right = 720.0 +margin_bottom = 450.0 +color = Color( 0, 0, 0, 1 ) +__meta__ = { +"_edit_use_anchors_": false +} diff --git a/scenes/UI/Settings.gd b/scenes/UI/settings/Settings.gd similarity index 87% rename from scenes/UI/Settings.gd rename to scenes/UI/settings/Settings.gd index e20292b..64ff13f 100644 --- a/scenes/UI/Settings.gd +++ b/scenes/UI/settings/Settings.gd @@ -12,8 +12,8 @@ func _ready(): ## PRIVATE func _translation(): print("[Settings#_translation]") - $CenterContainer/VBoxContainer/Langue/HBoxContainer/Label.text = tr("SETTINGS_LABEL_LANGUE") - $CenterContainer/VBoxContainer/gyroscope/HBoxContainer/Label.text = tr("SETTINGS_LABEL_GYROSCOPE") + $VBoxContainer/Langue/HBoxContainer/Label.text = tr("SETTINGS_LABEL_LANGUE") + $VBoxContainer/gyroscope/HBoxContainer/Label.text = tr("SETTINGS_LABEL_GYROSCOPE") func _apply_settings(): print("[Settings#_apply_settings]") diff --git a/scenes/UI/settings/Settings.tscn b/scenes/UI/settings/Settings.tscn new file mode 100644 index 0000000..e408589 --- /dev/null +++ b/scenes/UI/settings/Settings.tscn @@ -0,0 +1,64 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://scenes/UI/settings/Settings.gd" type="Script" id=1] + +[node name="Settings" type="CenterContainer"] +anchor_right = 1.0 +anchor_bottom = 1.0 +script = ExtResource( 1 ) +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="VBoxContainer" type="VBoxContainer" parent="."] +margin_left = 643.0 +margin_top = 421.0 +margin_right = 796.0 +margin_bottom = 479.0 +alignment = 1 + +[node name="Langue" type="CenterContainer" parent="VBoxContainer"] +margin_right = 153.0 +margin_bottom = 14.0 + +[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/Langue"] +margin_left = 42.0 +margin_right = 111.0 +margin_bottom = 14.0 + +[node name="Label" type="Label" parent="VBoxContainer/Langue/HBoxContainer"] +margin_right = 50.0 +margin_bottom = 14.0 +text = "langue :" + +[node name="data" type="Label" parent="VBoxContainer/Langue/HBoxContainer"] +margin_left = 54.0 +margin_right = 69.0 +margin_bottom = 14.0 +text = "FR" +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="gyroscope" type="CenterContainer" parent="VBoxContainer"] +margin_top = 18.0 +margin_right = 153.0 +margin_bottom = 58.0 + +[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/gyroscope"] +margin_right = 153.0 +margin_bottom = 40.0 + +[node name="Label" type="Label" parent="VBoxContainer/gyroscope/HBoxContainer"] +margin_top = 13.0 +margin_right = 73.0 +margin_bottom = 27.0 +text = "gyroscope :" + +[node name="data" type="CheckButton" parent="VBoxContainer/gyroscope/HBoxContainer"] +margin_left = 77.0 +margin_right = 153.0 +margin_bottom = 40.0 +align = 1 + +[connection signal="pressed" from="VBoxContainer/gyroscope/HBoxContainer/data" to="." method="_on_gyroscope_pressed"] diff --git a/scenes/UI/title/UI_title.tscn b/scenes/UI/title/UI_title.tscn new file mode 100644 index 0000000..cc4551d --- /dev/null +++ b/scenes/UI/title/UI_title.tscn @@ -0,0 +1,18 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://assets/ui/themes/game-title.png" type="Texture" id=1] + +[node name="Control" type="CenterContainer"] +anchor_right = 1.0 +anchor_bottom = 1.0 +rect_pivot_offset = Vector2( -656.735, -331.043 ) +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="TextureRect" type="TextureRect" parent="."] +margin_left = 385.0 +margin_top = 372.0 +margin_right = 1054.0 +margin_bottom = 528.0 +texture = ExtResource( 1 ) diff --git a/scenes/main.gd b/scenes/main.gd index c4dd884..d52239f 100644 --- a/scenes/main.gd +++ b/scenes/main.gd @@ -13,9 +13,9 @@ func _ready(): ## PRIVATE func _translation(): - $MarginContainer/UI_summary/PanelWood/VBoxContainer/ButtonPuzzle/Label.text = tr("MAIN_BUTTON_PUZZLES") - $MarginContainer/UI_summary/PanelWood/VBoxContainer/ButtonSetting/Label.text = tr("MAIN_BUTTON_SETTINGS") - $MarginContainer/UI_summary/PanelWood/VBoxContainer/ButtonQuit/Label.text = tr("MAIN_BUTTON_QUIT") + $MarginContainer/HBoxContainer/UI_summary/PanelWood/VBoxContainer/ButtonPuzzle/Label.text = tr("MAIN_BUTTON_PUZZLES") + $MarginContainer/HBoxContainer/UI_summary/PanelWood/VBoxContainer/ButtonSetting/Label.text = tr("MAIN_BUTTON_SETTINGS") + $MarginContainer/HBoxContainer/UI_summary/PanelWood/VBoxContainer/ButtonQuit/Label.text = tr("MAIN_BUTTON_QUIT") func _prepare_change_scene(): if (current_scene != null): diff --git a/scenes/main.tscn b/scenes/main.tscn index 9435388..6c12b25 100644 --- a/scenes/main.tscn +++ b/scenes/main.tscn @@ -1,21 +1,21 @@ [gd_scene load_steps=10 format=2] [ext_resource path="res://scenes/main.gd" type="Script" id=1] -[ext_resource path="res://assets/ui/themes/game-title.png" type="Texture" id=2] +[ext_resource path="res://scenes/UI/title/UI_title.tscn" type="PackedScene" id=2] [ext_resource path="res://assets/ui/themes/bck.jpg" type="Texture" id=6] -[ext_resource path="res://assets/ui/UI_summary.tscn" type="PackedScene" id=8] +[ext_resource path="res://scenes/UI/UI_summary.tscn" type="PackedScene" id=8] -[sub_resource type="VisualShaderNodeInput" id=2] +[sub_resource type="VisualShaderNodeInput" id=1] input_name = "screen_uv" -[sub_resource type="VisualShaderNodeTexture" id=3] +[sub_resource type="VisualShaderNodeTexture" id=2] texture = ExtResource( 6 ) texture_type = 1 -[sub_resource type="VisualShaderNodeInput" id=4] +[sub_resource type="VisualShaderNodeInput" id=3] input_name = "screen_texture" -[sub_resource type="VisualShader" id=5] +[sub_resource type="VisualShader" id=4] code = "shader_type canvas_item; uniform sampler2D tex_frg_4 : hint_albedo; @@ -42,19 +42,19 @@ void light() { } " -graph_offset = Vector2( -506, -15 ) +graph_offset = Vector2( -1049.92, -300 ) mode = 1 flags/light_only = false -nodes/fragment/3/node = SubResource( 2 ) +nodes/fragment/3/node = SubResource( 1 ) nodes/fragment/3/position = Vector2( -840, 460 ) -nodes/fragment/4/node = SubResource( 3 ) +nodes/fragment/4/node = SubResource( 2 ) nodes/fragment/4/position = Vector2( -80, 60 ) -nodes/fragment/5/node = SubResource( 4 ) +nodes/fragment/5/node = SubResource( 3 ) nodes/fragment/5/position = Vector2( -1000, 20 ) nodes/fragment/connections = PoolIntArray( 4, 0, 0, 0 ) -[sub_resource type="ShaderMaterial" id=6] -shader = SubResource( 5 ) +[sub_resource type="ShaderMaterial" id=5] +shader = SubResource( 4 ) [node name="Main" type="Control"] anchor_right = 1.0 @@ -65,9 +65,12 @@ __meta__ = { } [node name="BackgroundPicture" type="Panel" parent="."] -material = SubResource( 6 ) +material = SubResource( 5 ) anchor_right = 1.0 anchor_bottom = 1.0 +__meta__ = { +"_edit_use_anchors_": false +} [node name="MarginContainer" type="MarginContainer" parent="."] anchor_right = 1.0 @@ -76,23 +79,32 @@ __meta__ = { "_edit_use_anchors_": false } -[node name="UI_summary" parent="MarginContainer" instance=ExtResource( 8 )] +[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer"] +margin_right = 1440.0 +margin_bottom = 900.0 + +[node name="UI_summary" parent="MarginContainer/HBoxContainer" instance=ExtResource( 8 )] anchor_bottom = 0.0 margin_right = 446.0 margin_bottom = 900.0 size_flags_horizontal = 0 size_flags_vertical = 3 -[node name="CenterContainer" type="MarginContainer" parent="MarginContainer"] -margin_left = 385.0 -margin_right = 1054.0 +[node name="CenterContainer" type="MarginContainer" parent="MarginContainer/HBoxContainer"] +margin_left = 450.0 +margin_right = 1440.0 margin_bottom = 900.0 -size_flags_horizontal = 6 +size_flags_horizontal = 7 size_flags_vertical = 3 -[node name="TextureRect" type="TextureRect" parent="MarginContainer/CenterContainer"] -margin_right = 669.0 +[node name="scene_instance" parent="MarginContainer/HBoxContainer/CenterContainer" instance=ExtResource( 2 )] +anchor_right = 0.0 +anchor_bottom = 0.0 +margin_right = 990.0 margin_bottom = 900.0 -texture = ExtResource( 2 ) -[editable path="MarginContainer/UI_summary"] +[connection signal="pressed" from="MarginContainer/HBoxContainer/UI_summary/PanelWood/VBoxContainer/ButtonPuzzle" to="." method="_on_ButtonPuzzle_pressed"] +[connection signal="pressed" from="MarginContainer/HBoxContainer/UI_summary/PanelWood/VBoxContainer/ButtonSetting" to="." method="_on_ButtonSetting_pressed"] +[connection signal="pressed" from="MarginContainer/HBoxContainer/UI_summary/PanelWood/VBoxContainer/ButtonQuit" to="." method="_on_ButtonQuit_pressed"] + +[editable path="MarginContainer/HBoxContainer/UI_summary"]