changes UI to a global singleton
This commit is contained in:
parent
aa4afc4c4b
commit
e3aec75404
16 changed files with 371 additions and 119 deletions
|
|
@ -1,16 +1,79 @@
|
|||
[gd_scene load_steps=3 format=3 uid="uid://dt00rjsodtady"]
|
||||
[gd_scene load_steps=10 format=3 uid="uid://dt00rjsodtady"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://b6ylra30qxf30" path="res://assets/logo/logo.png" id="1_1fmce"]
|
||||
[ext_resource type="Script" path="res://scenes/ui/main_menu.gd" id="1_5gs73"]
|
||||
[ext_resource type="FontFile" uid="uid://bjaavdnopfh0q" path="res://assets/fonts/aoboshi_one/AoboshiOne-Regular.ttf" id="2_aqmkw"]
|
||||
[ext_resource type="Texture2D" uid="uid://da7o6lfuoliid" path="res://assets/textures/Backgrounds/meadow2.jpg" id="2_bb61v"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_7grw7"]
|
||||
content_margin_left = 20.0
|
||||
content_margin_right = 20.0
|
||||
content_margin_bottom = 5.0
|
||||
bg_color = Color(0.799841, 0.529277, 0.323387, 1)
|
||||
corner_radius_top_left = 5
|
||||
corner_radius_top_right = 5
|
||||
corner_radius_bottom_right = 5
|
||||
corner_radius_bottom_left = 5
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_xjg0j"]
|
||||
content_margin_left = 20.0
|
||||
content_margin_right = 20.0
|
||||
content_margin_bottom = 5.0
|
||||
bg_color = Color(0.799841, 0.529277, 0.323387, 1)
|
||||
corner_radius_top_left = 5
|
||||
corner_radius_top_right = 5
|
||||
corner_radius_bottom_right = 5
|
||||
corner_radius_bottom_left = 5
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_3y6oq"]
|
||||
content_margin_left = 20.0
|
||||
content_margin_right = 20.0
|
||||
content_margin_bottom = 5.0
|
||||
bg_color = Color(0.799841, 0.529277, 0.323387, 1)
|
||||
corner_radius_top_left = 5
|
||||
corner_radius_top_right = 5
|
||||
corner_radius_bottom_right = 5
|
||||
corner_radius_bottom_left = 5
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_cnake"]
|
||||
content_margin_left = 20.0
|
||||
content_margin_right = 20.0
|
||||
content_margin_bottom = 5.0
|
||||
bg_color = Color(0.799841, 0.529277, 0.323387, 1)
|
||||
corner_radius_top_left = 5
|
||||
corner_radius_top_right = 5
|
||||
corner_radius_bottom_right = 5
|
||||
corner_radius_bottom_left = 5
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_0d7mr"]
|
||||
content_margin_left = 20.0
|
||||
content_margin_right = 20.0
|
||||
content_margin_bottom = 5.0
|
||||
bg_color = Color(0.799841, 0.529277, 0.323387, 1)
|
||||
corner_radius_top_left = 5
|
||||
corner_radius_top_right = 5
|
||||
corner_radius_bottom_right = 5
|
||||
corner_radius_bottom_left = 5
|
||||
|
||||
[node name="MainMenu" type="Control"]
|
||||
visible = false
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_5gs73")
|
||||
|
||||
[node name="Background" type="TextureRect" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
texture = ExtResource("2_bb61v")
|
||||
expand_mode = 3
|
||||
stretch_mode = 6
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
layout_mode = 1
|
||||
|
|
@ -22,7 +85,9 @@ grow_vertical = 2
|
|||
theme_override_constants/separation = 50
|
||||
|
||||
[node name="Logo" type="TextureRect" parent="VBoxContainer"]
|
||||
custom_minimum_size = Vector2(600, 600)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
texture = ExtResource("1_1fmce")
|
||||
expand_mode = 4
|
||||
stretch_mode = 5
|
||||
|
|
@ -46,22 +111,88 @@ FANGEN"
|
|||
horizontal_alignment = 1
|
||||
max_lines_visible = 2
|
||||
|
||||
[node name="MenuButtons" type="VBoxContainer" parent="VBoxContainer"]
|
||||
[node name="MarginContainer" type="MarginContainer" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
theme_override_constants/margin_left = 50
|
||||
theme_override_constants/margin_top = 20
|
||||
theme_override_constants/margin_right = 50
|
||||
theme_override_constants/margin_bottom = 50
|
||||
|
||||
[node name="MenuButtons" type="VBoxContainer" parent="VBoxContainer/MarginContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="NewGameButton" type="Button" parent="VBoxContainer/MenuButtons"]
|
||||
[node name="NewGameButton" type="Button" parent="VBoxContainer/MarginContainer/MenuButtons"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.355673, 0.203473, 0.0399276, 1)
|
||||
theme_override_fonts/font = ExtResource("2_aqmkw")
|
||||
theme_override_font_sizes/font_size = 45
|
||||
theme_override_styles/focus = SubResource("StyleBoxFlat_7grw7")
|
||||
theme_override_styles/hover_pressed = SubResource("StyleBoxFlat_xjg0j")
|
||||
theme_override_styles/hover = SubResource("StyleBoxFlat_3y6oq")
|
||||
theme_override_styles/pressed = SubResource("StyleBoxFlat_cnake")
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_0d7mr")
|
||||
text = "New Game"
|
||||
|
||||
[node name="ContinueGameButton" type="Button" parent="VBoxContainer/MenuButtons"]
|
||||
[node name="ContinueGameButton" type="Button" parent="VBoxContainer/MarginContainer/MenuButtons"]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.356863, 0.203922, 0.0392157, 1)
|
||||
theme_override_fonts/font = ExtResource("2_aqmkw")
|
||||
theme_override_font_sizes/font_size = 45
|
||||
theme_override_styles/focus = SubResource("StyleBoxFlat_0d7mr")
|
||||
theme_override_styles/hover_pressed = SubResource("StyleBoxFlat_0d7mr")
|
||||
theme_override_styles/hover = SubResource("StyleBoxFlat_0d7mr")
|
||||
theme_override_styles/pressed = SubResource("StyleBoxFlat_0d7mr")
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_0d7mr")
|
||||
text = "Continue"
|
||||
|
||||
[node name="OptionsButton" type="Button" parent="VBoxContainer/MenuButtons"]
|
||||
[node name="OptionsButton" type="Button" parent="VBoxContainer/MarginContainer/MenuButtons"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.356863, 0.203922, 0.0392157, 1)
|
||||
theme_override_fonts/font = ExtResource("2_aqmkw")
|
||||
theme_override_font_sizes/font_size = 45
|
||||
theme_override_styles/focus = SubResource("StyleBoxFlat_0d7mr")
|
||||
theme_override_styles/hover_pressed = SubResource("StyleBoxFlat_0d7mr")
|
||||
theme_override_styles/hover = SubResource("StyleBoxFlat_0d7mr")
|
||||
theme_override_styles/pressed = SubResource("StyleBoxFlat_0d7mr")
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_0d7mr")
|
||||
text = "Options"
|
||||
|
||||
[node name="ExitButton" type="Button" parent="VBoxContainer/MenuButtons"]
|
||||
[node name="LicensesButton" type="Button" parent="VBoxContainer/MarginContainer/MenuButtons"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
theme_override_colors/font_color = Color(0.356863, 0.203922, 0.0392157, 1)
|
||||
theme_override_fonts/font = ExtResource("2_aqmkw")
|
||||
theme_override_font_sizes/font_size = 45
|
||||
theme_override_styles/focus = SubResource("StyleBoxFlat_0d7mr")
|
||||
theme_override_styles/hover_pressed = SubResource("StyleBoxFlat_0d7mr")
|
||||
theme_override_styles/hover = SubResource("StyleBoxFlat_0d7mr")
|
||||
theme_override_styles/pressed = SubResource("StyleBoxFlat_0d7mr")
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_0d7mr")
|
||||
text = "Licenses"
|
||||
|
||||
[node name="ExitButton" type="Button" parent="VBoxContainer/MarginContainer/MenuButtons"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 10
|
||||
theme_override_colors/font_color = Color(0.356863, 0.203922, 0.0392157, 1)
|
||||
theme_override_fonts/font = ExtResource("2_aqmkw")
|
||||
theme_override_font_sizes/font_size = 45
|
||||
theme_override_styles/focus = SubResource("StyleBoxFlat_0d7mr")
|
||||
theme_override_styles/hover_pressed = SubResource("StyleBoxFlat_0d7mr")
|
||||
theme_override_styles/hover = SubResource("StyleBoxFlat_0d7mr")
|
||||
theme_override_styles/pressed = SubResource("StyleBoxFlat_0d7mr")
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_0d7mr")
|
||||
text = "Exit"
|
||||
|
||||
[connection signal="pressed" from="VBoxContainer/MarginContainer/MenuButtons/NewGameButton" to="." method="_on_new_game_button_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/MarginContainer/MenuButtons/ContinueGameButton" to="." method="_on_continue_game_button_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/MarginContainer/MenuButtons/OptionsButton" to="." method="_on_options_button_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/MarginContainer/MenuButtons/LicensesButton" to="." method="_on_licenses_button_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/MarginContainer/MenuButtons/ExitButton" to="." method="_on_exit_button_pressed"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue