소스 검색

:sparkles: added new game button and adjust menu layout

Felix Bytow 10 달 전
부모
커밋
a84fa7eae8
2개의 변경된 파일19개의 추가작업 그리고 6개의 파일을 삭제
  1. 4 0
      screens/main_menu.gd
  2. 15 6
      screens/main_menu.tscn

+ 4 - 0
screens/main_menu.gd

@@ -2,3 +2,7 @@ extends Control
 
 func _on_button_pressed():
 	get_tree().quit()
+
+
+func _on_new_game_pressed():
+	pass # Replace with function body.

+ 15 - 6
screens/main_menu.tscn

@@ -23,19 +23,28 @@ grow_horizontal = 2
 theme_override_font_sizes/font_size = 42
 text = "Last Stand of Humanity"
 
-[node name="Button" type="Button" parent="."]
+[node name="Buttons" type="VBoxContainer" parent="."]
 layout_mode = 1
 anchors_preset = 8
 anchor_left = 0.5
 anchor_top = 0.5
 anchor_right = 0.5
 anchor_bottom = 0.5
-offset_left = -42.5
-offset_top = -19.0
-offset_right = 42.5
-offset_bottom = 19.0
+offset_left = -66.5
+offset_top = -37.5
+offset_right = 133.5
+offset_bottom = 37.5
 grow_horizontal = 2
 grow_vertical = 2
+
+[node name="NewGame" type="Button" parent="Buttons"]
+layout_mode = 2
+theme_override_font_sizes/font_size = 23
+text = "NEW GAME"
+
+[node name="Quit" type="Button" parent="Buttons"]
+layout_mode = 2
 text = "QUIT"
 
-[connection signal="pressed" from="Button" to="." method="_on_button_pressed"]
+[connection signal="pressed" from="Buttons/NewGame" to="." method="_on_new_game_pressed"]
+[connection signal="pressed" from="Buttons/Quit" to="." method="_on_button_pressed"]