new features, play menu, deck builder, deck selection
This commit is contained in:
@@ -5,8 +5,8 @@ extends CanvasLayer
|
||||
## The window is sized to match the image (67% of 1024x1536).
|
||||
## The image fills the entire window; buttons overlay the pre-drawn slots.
|
||||
|
||||
signal quick_play
|
||||
signal play_game
|
||||
signal deck_builder
|
||||
signal online_game
|
||||
signal open_settings
|
||||
signal quit_game
|
||||
@@ -14,8 +14,8 @@ signal quit_game
|
||||
# UI Components
|
||||
var bg_texture: TextureRect
|
||||
var buttons_container: Control
|
||||
var quick_play_button: Button
|
||||
var play_button: Button
|
||||
var deck_builder_button: Button
|
||||
var online_button: Button
|
||||
var settings_button: Button
|
||||
var quit_button: Button
|
||||
@@ -64,15 +64,17 @@ func _create_menu() -> void:
|
||||
buttons_container.mouse_filter = Control.MOUSE_FILTER_IGNORE
|
||||
|
||||
# Create buttons overlaying the pre-drawn slots
|
||||
quick_play_button = _create_overlay_button("Quick Play", 0)
|
||||
quick_play_button.add_theme_color_override("font_color", Color(0.15, 0.13, 0.1))
|
||||
quick_play_button.add_theme_color_override("font_hover_color", Color(0.3, 0.25, 0.2))
|
||||
quick_play_button.add_theme_color_override("font_pressed_color", Color(0.05, 0.05, 0.05))
|
||||
quick_play_button.pressed.connect(_on_quick_play_pressed)
|
||||
|
||||
play_button = _create_overlay_button("Play", 1)
|
||||
# "Play" is now in the top golden slot (formerly Quick Play)
|
||||
play_button = _create_overlay_button("Play", 0)
|
||||
play_button.add_theme_color_override("font_color", Color(0.15, 0.13, 0.1))
|
||||
play_button.add_theme_color_override("font_hover_color", Color(0.3, 0.25, 0.2))
|
||||
play_button.add_theme_color_override("font_pressed_color", Color(0.05, 0.05, 0.05))
|
||||
play_button.pressed.connect(_on_play_pressed)
|
||||
|
||||
# "Deck Builder" is in slot 1 (formerly Play)
|
||||
deck_builder_button = _create_overlay_button("Deck Builder", 1)
|
||||
deck_builder_button.pressed.connect(_on_deck_builder_pressed)
|
||||
|
||||
online_button = _create_overlay_button("Online", 2)
|
||||
online_button.disabled = true
|
||||
|
||||
@@ -158,12 +160,14 @@ func _reposition_elements() -> void:
|
||||
version_label.position = Vector2(win_size.x - 80, win_size.y - 24)
|
||||
version_label.size = Vector2(72, 18)
|
||||
|
||||
func _on_quick_play_pressed() -> void:
|
||||
quick_play.emit()
|
||||
|
||||
func _on_play_pressed() -> void:
|
||||
play_game.emit()
|
||||
|
||||
|
||||
func _on_deck_builder_pressed() -> void:
|
||||
deck_builder.emit()
|
||||
|
||||
|
||||
func _on_quit_pressed() -> void:
|
||||
quit_game.emit()
|
||||
get_tree().quit()
|
||||
|
||||
Reference in New Issue
Block a user