diff --git a/scenes/developper/developper.gd b/scenes/developper/developper.gd index 3b6c092..127f5d5 100644 --- a/scenes/developper/developper.gd +++ b/scenes/developper/developper.gd @@ -11,4 +11,4 @@ func _process(delta): pass func _on_quit_pressed(): - $Window.visible = false + get_node("../developper_panel").visible = false diff --git a/scenes/developper/developper.tscn b/scenes/developper/developper.tscn index 6d6d37c..bcdf2a1 100644 --- a/scenes/developper/developper.tscn +++ b/scenes/developper/developper.tscn @@ -1,43 +1,101 @@ -[gd_scene load_steps=2 format=3 uid="uid://cua4782cbjhla"] +[gd_scene load_steps=4 format=3 uid="uid://cua4782cbjhla"] [ext_resource type="Script" path="res://scenes/developper/developper.gd" id="1_qf0rd"] +[ext_resource type="Texture2D" uid="uid://se0t5xwdxyq7" path="res://scenes/themes/textures/base_panel.png" id="2_fmcto"] +[ext_resource type="Theme" uid="uid://bi1js53ni6ehd" path="res://UI/themes/khanat/khanat.theme" id="3_ols6l"] -[node name="Control" type="Control"] -script = ExtResource( "1_qf0rd" ) - -[node name="Window" type="Window" parent="."] -title = "win_developper" +[node name="developper_panel" type="Control"] visible = false +minimum_size = Vector2(350, 250) +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +offset_left = -175.0 +offset_top = -125.0 +offset_right = 175.0 +offset_bottom = 125.0 +grow_horizontal = 2 +grow_vertical = 2 +script = ExtResource( "1_qf0rd" ) +metadata/_edit_use_custom_anchors = false -[node name="VBoxContainer" type="VBoxContainer" parent="Window"] +[node name="NinePatchRect" type="NinePatchRect" parent="."] anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 +texture = ExtResource( "2_fmcto" ) +patch_margin_left = 50 +patch_margin_top = 10 +patch_margin_right = 25 +patch_margin_bottom = 25 +axis_stretch_horizontal = 2 +axis_stretch_vertical = 2 +metadata/_edit_layout_mode = 1 +metadata/_edit_use_custom_anchors = false + +[node name="header" type="VBoxContainer" parent="."] +offset_left = 50.0 +offset_top = 4.0 +offset_right = 347.0 +offset_bottom = 31.0 +metadata/_edit_layout_mode = 0 +metadata/_edit_use_custom_anchors = false + +[node name="Label" type="Label" parent="header"] +offset_top = -1.0 +offset_right = 297.0 +offset_bottom = 26.4 +theme = ExtResource( "3_ols6l" ) +text = "win_developper" + +[node name="main" type="VBoxContainer" parent="."] +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_left = 5.0 +offset_top = 33.0 +offset_right = -17.0 +offset_bottom = -11.0 +grow_horizontal = 2 +grow_vertical = 2 size_flags_horizontal = 3 size_flags_vertical = 3 metadata/_edit_use_custom_anchors = false +metadata/_edit_layout_mode = 1 -[node name="VBoxContainer2" type="VBoxContainer" parent="Window/VBoxContainer"] -offset_right = 40.0 -offset_bottom = 40.0 +[node name="VBoxContainer2" type="VBoxContainer" parent="main"] +offset_right = 328.0 +offset_bottom = 27.0 +size_flags_vertical = 0 -[node name="TabBar" type="TabBar" parent="Window/VBoxContainer/VBoxContainer2"] -anchor_right = 1.0 -anchor_bottom = 1.0 -offset_top = 31.0 -offset_bottom = 22.0 +[node name="TabBar" type="TabBar" parent="main/VBoxContainer2"] +offset_right = 328.0 +offset_bottom = 27.0 +theme = ExtResource( "3_ols6l" ) tab_count = 2 tab_0/title = "tab_sky" tab_1/title = "tab_weather" -[node name="Quit" type="Button" parent="Window/VBoxContainer"] -offset_top = 35.0 -offset_right = 43.0 -offset_bottom = 66.0 +[node name="footer" type="VBoxContainer" parent="."] +minimum_size = Vector2(0, 30) +offset_left = 3.0 +offset_top = 213.0 +offset_right = 347.0 +offset_bottom = 247.0 +size_flags_vertical = 10 +metadata/_edit_layout_mode = 0 +metadata/_edit_use_custom_anchors = false + +[node name="Quit" type="Button" parent="footer"] +minimum_size = Vector2(75, 0) +offset_left = 134.0 +offset_top = 7.0 +offset_right = 209.0 +offset_bottom = 26.0 size_flags_horizontal = 4 -size_flags_vertical = 8 +size_flags_vertical = 6 +theme = ExtResource( "3_ols6l" ) text = "Quit" -[connection signal="close_requested" from="Window" to="." method="_on_quit_pressed"] -[connection signal="pressed" from="Window/VBoxContainer/Quit" to="." method="_on_quit_pressed"] +[connection signal="pressed" from="footer/Quit" to="." method="_on_quit_pressed"] diff --git a/scenes/hud/hud.gd b/scenes/hud/hud.gd index 38e2be2..19368f6 100644 --- a/scenes/hud/hud.gd +++ b/scenes/hud/hud.gd @@ -67,8 +67,7 @@ func _on_themes_pressed(): $MenuTheme/Window.visible = true func _on_dev_pressed(): - $MenuDev/Window.popup_centered() - $MenuDev/Window.visible = true + $developper_panel.visible = true func _on_about_pressed(): var aboutmessage:String diff --git a/scenes/hud/hud.tscn b/scenes/hud/hud.tscn index 1372df2..4841d2e 100644 --- a/scenes/hud/hud.tscn +++ b/scenes/hud/hud.tscn @@ -15,6 +15,7 @@ theme = ExtResource( "1_iq3fo" ) script = ExtResource( "1_s6f6d" ) [node name="Message" type="HBoxContainer" parent="."] +visible = false anchor_right = 1.0 size_flags_horizontal = 0 size_flags_vertical = 0 @@ -28,6 +29,7 @@ size_flags_vertical = 1 text = "Echap = Menu" [node name="Menu" type="HBoxContainer" parent="."] +visible = false anchor_right = 1.0 offset_right = 40.0 offset_bottom = 40.0 @@ -98,11 +100,7 @@ visible = false [node name="MusicManager" parent="." instance=ExtResource( "6_0ivsi" )] visible = false -[node name="MenuDev" parent="." instance=ExtResource( "7_45giw" )] -offset_left = 174.0 -offset_top = 4.0 -offset_right = 174.0 -offset_bottom = 4.0 +[node name="developper_panel" parent="." instance=ExtResource( "7_45giw" )] [connection signal="pressed" from="Menu/Keys" to="." method="_on_keys_pressed"] [connection signal="pressed" from="Menu/Themes" to="." method="_on_themes_pressed"] diff --git a/scenes/themes/textures/base_panel.png b/scenes/themes/textures/base_panel.png new file mode 100644 index 0000000..97af4cd Binary files /dev/null and b/scenes/themes/textures/base_panel.png differ diff --git a/scenes/themes/textures/base_panel.png.import b/scenes/themes/textures/base_panel.png.import new file mode 100644 index 0000000..b554aec --- /dev/null +++ b/scenes/themes/textures/base_panel.png.import @@ -0,0 +1,33 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://se0t5xwdxyq7" +path="res://.godot/imported/base_panel.png-2a8a839c6032022981731374105e51fc.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://scenes/themes/textures/base_panel.png" +dest_files=["res://.godot/imported/base_panel.png-2a8a839c6032022981731374105e51fc.ctex"] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/bptc_ldr=0 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/size_limit=0 +detect_3d/compress_to=1