Skip to content

Commit

Permalink
Makes sizes of buttons more consistent.
Browse files Browse the repository at this point in the history
  • Loading branch information
Maaack committed Nov 30, 2023
1 parent 7afd8a3 commit a7f32d7
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 5 deletions.
13 changes: 11 additions & 2 deletions App/Scenes/Menus/MainMenu/MainMenu.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,6 @@ layout_mode = 2
[node name="TitlesMargin" type="MarginContainer" parent="MarginContainer/VBoxContainer"]
layout_mode = 2
theme_override_constants/margin_top = 16
theme_override_constants/margin_bottom = 16

[node name="TitlesContainer" type="VBoxContainer" parent="MarginContainer/VBoxContainer/TitlesMargin"]
layout_mode = 2
Expand All @@ -365,7 +364,7 @@ vertical_alignment = 1
[node name="SubTitle" type="Label" parent="MarginContainer/VBoxContainer/TitlesMargin/TitlesContainer"]
modulate = Color(1, 1, 1, 0)
layout_mode = 2
theme_override_font_sizes/font_size = 32
theme_override_font_sizes/font_size = 24
text = "Subtitle"
horizontal_alignment = 1
vertical_alignment = 1
Expand All @@ -380,27 +379,36 @@ theme_override_constants/margin_bottom = 16
unique_name_in_owner = true
modulate = Color(1, 1, 1, 0)
layout_mode = 2
theme_override_constants/separation = 16
alignment = 1
script = ExtResource("4_l1ebe")

[node name="PlayButton" parent="MarginContainer/VBoxContainer/MenuMargin/MenuButtons" instance=ExtResource("5")]
unique_name_in_owner = true
custom_minimum_size = Vector2(128, 40)
layout_mode = 2
size_flags_horizontal = 4
text = "Play"

[node name="OptionsButton" parent="MarginContainer/VBoxContainer/MenuMargin/MenuButtons" instance=ExtResource("5")]
unique_name_in_owner = true
custom_minimum_size = Vector2(128, 40)
layout_mode = 2
size_flags_horizontal = 4
text = "Options"

[node name="CreditsButton" parent="MarginContainer/VBoxContainer/MenuMargin/MenuButtons" instance=ExtResource("5")]
unique_name_in_owner = true
custom_minimum_size = Vector2(128, 40)
layout_mode = 2
size_flags_horizontal = 4
text = "Credits"

[node name="ExitButton" parent="MarginContainer/VBoxContainer/MenuMargin/MenuButtons" instance=ExtResource("5")]
unique_name_in_owner = true
custom_minimum_size = Vector2(128, 40)
layout_mode = 2
size_flags_horizontal = 4
text = "Exit"

[node name="OptionsContainer" type="MarginContainer" parent="."]
Expand Down Expand Up @@ -441,6 +449,7 @@ mouse_filter = 2
[node name="BackButton" parent="FlowControlContainer/FlowControl" instance=ExtResource("5")]
unique_name_in_owner = true
visible = false
custom_minimum_size = Vector2(62, 40)
layout_mode = 0
anchor_top = 1.0
anchor_bottom = 1.0
Expand Down
22 changes: 19 additions & 3 deletions App/Scenes/Menus/PauseMenu/PauseMenu.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -41,39 +41,54 @@ grow_vertical = 2
[node name="VBoxContainer" type="VBoxContainer" parent="Control/MenuContainer"]
layout_mode = 2

[node name="Title" type="Label" parent="Control/MenuContainer/VBoxContainer"]
[node name="MarginContainer" type="MarginContainer" parent="Control/MenuContainer/VBoxContainer"]
layout_mode = 2
theme_override_constants/margin_top = 16

[node name="Title" type="Label" parent="Control/MenuContainer/VBoxContainer/MarginContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 24
text = "Pause"
horizontal_alignment = 1

[node name="MenuButtons" type="VBoxContainer" parent="Control/MenuContainer/VBoxContainer"]
layout_mode = 2
size_flags_vertical = 3
theme_override_constants/separation = 24
theme_override_constants/separation = 16
alignment = 1
script = ExtResource("3_43rgy")

[node name="ResumeButton" parent="Control/MenuContainer/VBoxContainer/MenuButtons" instance=ExtResource("4")]
custom_minimum_size = Vector2(128, 40)
layout_mode = 2
size_flags_horizontal = 4
text = "Resume"

[node name="RestartButton" parent="Control/MenuContainer/VBoxContainer/MenuButtons" instance=ExtResource("4")]
custom_minimum_size = Vector2(128, 40)
layout_mode = 2
size_flags_horizontal = 4
text = "Restart"

[node name="OptionsButton" parent="Control/MenuContainer/VBoxContainer/MenuButtons" instance=ExtResource("4")]
unique_name_in_owner = true
custom_minimum_size = Vector2(128, 40)
layout_mode = 2
size_flags_horizontal = 4
text = "Options"

[node name="MainMenuButton" parent="Control/MenuContainer/VBoxContainer/MenuButtons" instance=ExtResource("4")]
unique_name_in_owner = true
custom_minimum_size = Vector2(128, 40)
layout_mode = 2
text = "Return to Main Menu"
size_flags_horizontal = 4
text = "Main Menu"

[node name="ExitButton" parent="Control/MenuContainer/VBoxContainer/MenuButtons" instance=ExtResource("4")]
unique_name_in_owner = true
custom_minimum_size = Vector2(128, 40)
layout_mode = 2
size_flags_horizontal = 4
text = "Exit Game"

[node name="CenterContainer" type="CenterContainer" parent="Control"]
Expand Down Expand Up @@ -102,6 +117,7 @@ layout_mode = 2
alignment = 1

[node name="BackButton" type="Button" parent="Control/CenterContainer/SubMenuContainer/HBoxContainer"]
custom_minimum_size = Vector2(62, 40)
layout_mode = 2
text = "Back"

Expand Down

0 comments on commit a7f32d7

Please sign in to comment.