Adding a proper UI panel for dev panel, with original background
This commit is contained in:
parent
e019d8bb3e
commit
8ca53f8687
6 changed files with 118 additions and 30 deletions
|
@ -11,4 +11,4 @@ func _process(delta):
|
|||
pass
|
||||
|
||||
func _on_quit_pressed():
|
||||
$Window.visible = false
|
||||
get_node("../developper_panel").visible = false
|
||||
|
|
|
@ -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"]
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"]
|
||||
|
|
BIN
scenes/themes/textures/base_panel.png
Normal file
BIN
scenes/themes/textures/base_panel.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
33
scenes/themes/textures/base_panel.png.import
Normal file
33
scenes/themes/textures/base_panel.png.import
Normal file
|
@ -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
|
Loading…
Reference in a new issue