aboutsummaryrefslogtreecommitdiff
path: root/game/src/MainMenu/MainMenu.gd
diff options
context:
space:
mode:
author George L. Albany <Megacake1234@gmail.com>2023-02-21 08:49:46 +0100
committer GitHub <noreply@github.com>2023-02-21 08:49:46 +0100
commitfb9e316a18139ea6b6ffe3b237796b42d7114738 (patch)
tree7eb315989e19d1e8eabea955330e3a2e5469c876 /game/src/MainMenu/MainMenu.gd
parent0b3f9cb21cfa86e98649066ff7d260b4f9022023 (diff)
Add stylized theme to MainMenu (#12)
* Add stylized theme to MainMenu Increase message queue memory size by 4 Add default_theme.theme Refactor SampleGame.gd to better account for refactoring via @export nodes Properly aligne SampleGame scene Reorganize MainMenu into its own directory Add main_menu_border_paper.png Add main_menu_button.png * Add background image to theme Implement StyleBoxCombinedTexture Allows drawing an array of textures all at once Make MainMenu Panel a PanelContainer for consistency * Implement MainMenu button press, hover, and focus styles Improve MainMenu button disabled style * Add Godot's latest documentation to the README.md
Diffstat (limited to 'game/src/MainMenu/MainMenu.gd')
-rw-r--r--game/src/MainMenu/MainMenu.gd34
1 files changed, 34 insertions, 0 deletions
diff --git a/game/src/MainMenu/MainMenu.gd b/game/src/MainMenu/MainMenu.gd
new file mode 100644
index 0000000..000dc69
--- /dev/null
+++ b/game/src/MainMenu/MainMenu.gd
@@ -0,0 +1,34 @@
+extends Control
+
+signal options_button_pressed
+
+@export
+var _new_game_button : BaseButton
+
+func _ready():
+ print("From GDScript")
+ TestSingleton.hello_singleton()
+ _new_game_button.grab_focus()
+
+
+func _on_new_game_button_pressed():
+ print("Start a new game!")
+ get_tree().change_scene_to_file("res://src/SampleGame.tscn")
+
+
+func _on_continue_button_pressed():
+ print("Continue last game!")
+
+
+func _on_multi_player_button_pressed():
+ print("Have fun with friends!")
+
+
+func _on_options_button_pressed():
+ print("Check out some options!")
+ options_button_pressed.emit()
+
+
+func _on_exit_button_pressed():
+ print("See you later!")
+ get_tree().quit()