Skip to content

Commit 5f9d908

Browse files
committed
🔧 refactor: just small changes on demo
1 parent b0b6913 commit 5f9d908

File tree

2 files changed

+30
-35
lines changed

2 files changed

+30
-35
lines changed

demo/scene1.tscn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ custom_minimum_size = Vector2(100, 50)
127127
layout_mode = 2
128128
theme_override_fonts/font = ExtResource("1_oeex7")
129129
theme_override_font_sizes/font_size = 32
130-
text = "PAUSE & RESUME"
130+
text = "PAUSE 3 SECONDS"
131131
script = ExtResource("1")
132132
fade_out_speed = 0.5
133133
fade_in_speed = 0.5

demo/scene2.tscn

Lines changed: 29 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -12,34 +12,33 @@ grow_horizontal = 2
1212
grow_vertical = 2
1313

1414
[node name="ColorRect" type="ColorRect" parent="."]
15-
anchors_preset = 15
15+
layout_mode = 0
1616
anchor_right = 1.0
1717
anchor_bottom = 1.0
1818
grow_horizontal = 2
1919
grow_vertical = 2
2020
color = Color(0.298039, 0.831373, 0.317647, 1)
2121

2222
[node name="CenterContainer" type="CenterContainer" parent="."]
23+
layout_mode = 1
2324
anchors_preset = 15
2425
anchor_right = 1.0
2526
anchor_bottom = 1.0
2627
grow_horizontal = 2
2728
grow_vertical = 2
2829

2930
[node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer"]
30-
offset_left = 397.0
31-
offset_top = 67.0
32-
offset_right = 755.0
33-
offset_bottom = 581.0
31+
layout_mode = 2
3432
theme_override_constants/separation = 15
3533

3634
[node name="loading_scene" type="Button" parent="CenterContainer/VBoxContainer"]
3735
custom_minimum_size = Vector2(200, 150)
38-
offset_right = 358.0
39-
offset_bottom = 150.0
36+
layout_mode = 2
4037
theme_override_fonts/font = ExtResource("1_nyid6")
4138
theme_override_font_sizes/font_size = 32
42-
text = "LOADING SCREEN"
39+
text = "LOADING
40+
41+
SCREEN"
4342
script = ExtResource("1")
4443
scene = "scene3"
4544
fade_in_speed = 2.0
@@ -53,15 +52,12 @@ timeout = 0.2
5352
add_to_back = false
5453

5554
[node name="HBoxContainer" type="HBoxContainer" parent="CenterContainer/VBoxContainer"]
56-
offset_top = 165.0
57-
offset_right = 358.0
58-
offset_bottom = 345.0
55+
layout_mode = 2
5956
theme_override_constants/separation = 15
6057

6158
[node name="next_scene" type="Button" parent="CenterContainer/VBoxContainer/HBoxContainer"]
6259
custom_minimum_size = Vector2(200, 150)
63-
offset_right = 200.0
64-
offset_bottom = 180.0
60+
layout_mode = 2
6561
theme_override_fonts/font = ExtResource("1_nyid6")
6662
theme_override_font_sizes/font_size = 32
6763
text = "SCENE 2"
@@ -76,15 +72,12 @@ color = Color(0.172549, 0.176471, 0.129412, 1)
7672
timeout = 0.5
7773

7874
[node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer/VBoxContainer/HBoxContainer"]
79-
offset_left = 215.0
80-
offset_right = 358.0
81-
offset_bottom = 180.0
75+
layout_mode = 2
8276
theme_override_constants/separation = 15
8377

8478
[node name="reset" type="Button" parent="CenterContainer/VBoxContainer/HBoxContainer/VBoxContainer"]
8579
custom_minimum_size = Vector2(100, 50)
86-
offset_right = 143.0
87-
offset_bottom = 50.0
80+
layout_mode = 2
8881
theme_override_fonts/font = ExtResource("1_nyid6")
8982
theme_override_font_sizes/font_size = 32
9083
text = "RESET"
@@ -93,9 +86,7 @@ scene = "ignore"
9386

9487
[node name="reload" type="Button" parent="CenterContainer/VBoxContainer/HBoxContainer/VBoxContainer"]
9588
custom_minimum_size = Vector2(100, 50)
96-
offset_top = 65.0
97-
offset_right = 143.0
98-
offset_bottom = 115.0
89+
layout_mode = 2
9990
theme_override_fonts/font = ExtResource("1_nyid6")
10091
theme_override_font_sizes/font_size = 32
10192
text = "RELOAD"
@@ -106,9 +97,7 @@ fade_in_speed = 0.2
10697

10798
[node name="back" type="Button" parent="CenterContainer/VBoxContainer/HBoxContainer/VBoxContainer"]
10899
custom_minimum_size = Vector2(100, 50)
109-
offset_top = 130.0
110-
offset_right = 143.0
111-
offset_bottom = 180.0
100+
layout_mode = 2
112101
theme_override_fonts/font = ExtResource("1_nyid6")
113102
theme_override_font_sizes/font_size = 32
114103
text = "BACK"
@@ -119,24 +108,31 @@ fade_in_speed = 0.2
119108

120109
[node name="nothing" type="Button" parent="CenterContainer/VBoxContainer"]
121110
custom_minimum_size = Vector2(100, 50)
122-
offset_top = 360.0
123-
offset_right = 358.0
124-
offset_bottom = 410.0
111+
layout_mode = 2
125112
theme_override_fonts/font = ExtResource("1_nyid6")
126113
theme_override_font_sizes/font_size = 32
127114
text = "NOTHING"
128115
script = ExtResource("1")
129-
scene = ""
116+
fade_out_speed = 0.5
117+
fade_in_speed = 0.5
118+
color = Color(0.564706, 0.376471, 0.584314, 1)
119+
timeout = 0.5
120+
121+
[node name="pause_and_resume" type="Button" parent="CenterContainer/VBoxContainer"]
122+
custom_minimum_size = Vector2(100, 50)
123+
layout_mode = 2
124+
theme_override_fonts/font = ExtResource("1_nyid6")
125+
theme_override_font_sizes/font_size = 32
126+
text = "PAUSE 3 SECONDS"
127+
script = ExtResource("1")
130128
fade_out_speed = 0.5
131129
fade_in_speed = 0.5
132130
color = Color(0.564706, 0.376471, 0.584314, 1)
133131
timeout = 0.5
134132

135133
[node name="exit" type="Button" parent="CenterContainer/VBoxContainer"]
136134
custom_minimum_size = Vector2(100, 50)
137-
offset_top = 425.0
138-
offset_right = 358.0
139-
offset_bottom = 475.0
135+
layout_mode = 2
140136
theme_override_fonts/font = ExtResource("1_nyid6")
141137
theme_override_font_sizes/font_size = 32
142138
text = "EXIT"
@@ -145,14 +141,13 @@ scene = "exit"
145141
fade_out_speed = 0.3
146142

147143
[node name="check" type="CheckButton" parent="CenterContainer/VBoxContainer"]
148-
offset_top = 490.0
149-
offset_right = 358.0
150-
offset_bottom = 514.0
144+
layout_mode = 2
151145

152146
[connection signal="button_up" from="CenterContainer/VBoxContainer/loading_scene" to="CenterContainer/VBoxContainer/loading_scene" method="_on_loading_scene_button_up"]
153147
[connection signal="button_up" from="CenterContainer/VBoxContainer/HBoxContainer/next_scene" to="CenterContainer/VBoxContainer/HBoxContainer/next_scene" method="_on_button_button_up"]
154148
[connection signal="button_up" from="CenterContainer/VBoxContainer/HBoxContainer/VBoxContainer/reset" to="CenterContainer/VBoxContainer/HBoxContainer/VBoxContainer/reset" method="_on_reset_button_up"]
155149
[connection signal="button_up" from="CenterContainer/VBoxContainer/HBoxContainer/VBoxContainer/reload" to="CenterContainer/VBoxContainer/HBoxContainer/VBoxContainer/reload" method="_on_button_button_up"]
156150
[connection signal="button_up" from="CenterContainer/VBoxContainer/HBoxContainer/VBoxContainer/back" to="CenterContainer/VBoxContainer/HBoxContainer/VBoxContainer/back" method="_on_button_button_up"]
157151
[connection signal="button_up" from="CenterContainer/VBoxContainer/nothing" to="CenterContainer/VBoxContainer/nothing" method="_on_button_button_up"]
152+
[connection signal="button_up" from="CenterContainer/VBoxContainer/pause_and_resume" to="CenterContainer/VBoxContainer/pause_and_resume" method="_on_pause_and_resume_button_up"]
158153
[connection signal="button_up" from="CenterContainer/VBoxContainer/exit" to="CenterContainer/VBoxContainer/exit" method="_on_button_button_up"]

0 commit comments

Comments
 (0)