card editor, menu updated, screen changes

This commit is contained in:
2026-01-27 18:47:53 -05:00
parent 7ce6560225
commit 7a89ee47f0
28 changed files with 189196 additions and 403 deletions

View File

@@ -10,6 +10,11 @@ enum State {
var current_state: State = State.MENU
# Menu window size (matches project.godot viewport)
const MENU_SIZE := Vector2i(460, 689)
# Game window size
const GAME_SIZE := Vector2i(2160, 980)
# Scene references
var main_menu: MainMenu = null
var game_scene: Node3D = null
@@ -41,11 +46,22 @@ func _show_main_menu() -> void:
pause_menu.queue_free()
pause_menu = null
# Switch back to small borderless menu window
DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_WINDOWED)
DisplayServer.window_set_flag(DisplayServer.WINDOW_FLAG_BORDERLESS, true)
DisplayServer.window_set_size(MENU_SIZE)
var screen := DisplayServer.screen_get_size()
DisplayServer.window_set_position(Vector2i(
(screen.x - MENU_SIZE.x) / 2,
(screen.y - MENU_SIZE.y) / 2
))
# Create main menu
if not main_menu:
main_menu = MainMenu.new()
add_child(main_menu)
main_menu.start_game.connect(_on_start_game)
main_menu.quick_play.connect(_on_start_game)
main_menu.play_game.connect(_on_start_game)
main_menu.visible = true
current_state = State.MENU
@@ -55,6 +71,15 @@ func _on_start_game() -> void:
if main_menu:
main_menu.visible = false
# Switch to windowed gameplay size
DisplayServer.window_set_flag(DisplayServer.WINDOW_FLAG_BORDERLESS, false)
DisplayServer.window_set_size(GAME_SIZE)
var screen := DisplayServer.screen_get_size()
DisplayServer.window_set_position(Vector2i(
(screen.x - GAME_SIZE.x) / 2,
(screen.y - GAME_SIZE.y) / 2
))
# Create game scene
_start_new_game()