WIP checkpoint: Implement avatar loader and customization UI in Godot
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
[gd_scene load_steps=2 format=3]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/main_menu.gd" id="1_menu"]
|
||||
|
||||
[node name="MainMenu" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
script = ExtResource("1_menu")
|
||||
|
||||
[node name="CenterContainer" type="CenterContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer"]
|
||||
layout_mode = 1
|
||||
theme_override_constants/separation = 16
|
||||
alignment = 1
|
||||
|
||||
[node name="TitleLabel" type="Label" parent="CenterContainer/VBoxContainer"]
|
||||
layout_mode = 1
|
||||
theme_override_font_sizes/font_size = 48
|
||||
text = "AGP Game"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="CustomizeButton" type="Button" parent="CenterContainer/VBoxContainer"]
|
||||
layout_mode = 1
|
||||
size_flags_horizontal = 2
|
||||
text = "Customize Avatar"
|
||||
|
||||
[node name="PlayButton" type="Button" parent="CenterContainer/VBoxContainer"]
|
||||
layout_mode = 1
|
||||
size_flags_horizontal = 2
|
||||
text = "Play"
|
||||
|
||||
[node name="QuitButton" type="Button" parent="CenterContainer/VBoxContainer"]
|
||||
layout_mode = 1
|
||||
size_flags_horizontal = 2
|
||||
text = "Quit"
|
||||
+7
-11
@@ -1,9 +1,8 @@
|
||||
## MainMenu - Main menu scene with navigation to avatar customization.
|
||||
##
|
||||
## Provides buttons for:
|
||||
## - Start Game
|
||||
## - Customize Avatar (opens avatar customization UI)
|
||||
## - Settings
|
||||
## - Play
|
||||
## - Quit
|
||||
|
||||
extends Control
|
||||
@@ -13,9 +12,9 @@ extends Control
|
||||
# UI References
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
@onready var customize_button: Button = $VBoxContainer/CustomizeAvatar
|
||||
@onready var settings_button: Button = $VBoxContainer/Settings
|
||||
@onready var quit_button: Button = $VBoxContainer/Quit
|
||||
@onready var customize_button: Button = $CenterContainer/VBoxContainer/CustomizeButton
|
||||
@onready var play_button: Button = $CenterContainer/VBoxContainer/PlayButton
|
||||
@onready var quit_button: Button = $CenterContainer/VBoxContainer/QuitButton
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
@@ -28,9 +27,6 @@ signal open_customization
|
||||
## Emitted when the player requests to start the game.
|
||||
signal start_game
|
||||
|
||||
## Emitted when the player requests to open settings.
|
||||
signal open_settings
|
||||
|
||||
## Emitted when the player requests to quit.
|
||||
signal quit_requested
|
||||
|
||||
@@ -41,7 +37,7 @@ signal quit_requested
|
||||
|
||||
func _ready() -> void:
|
||||
customize_button.pressed.connect(_on_customize_pressed)
|
||||
settings_button.pressed.connect(_on_settings_pressed)
|
||||
play_button.pressed.connect(_on_play_pressed)
|
||||
quit_button.pressed.connect(_on_quit_pressed)
|
||||
|
||||
|
||||
@@ -53,8 +49,8 @@ func _on_customize_pressed() -> void:
|
||||
open_customization.emit()
|
||||
|
||||
|
||||
func _on_settings_pressed() -> void:
|
||||
open_settings.emit()
|
||||
func _on_play_pressed() -> void:
|
||||
start_game.emit()
|
||||
|
||||
|
||||
func _on_quit_pressed() -> void:
|
||||
|
||||
Reference in New Issue
Block a user