Skip to content

MainMenu ​

Inherits: CurrentUI < Control

MainMenu manages the game's main menu interface and navigation. Handles new game creation, continuing from last save, loading specific saves, settings access, credits display, and game exit.

Description ​

Key features:

  • New game functionality via TransitionManager
  • Continue from autosave or latest save
  • Save/load game menu integration
  • Settings menu management
  • Credits display with animation
  • Autosave detection and UI updates
  • UI scaling support

Variables ​

Array[Control]panel_interfaces[]

Methods ​

voidinitialize_ui( p_system_hub: GameHost.SystemHub )
voidconnect_signals()
voidset_ui_scale( ui_scale: float )
boolcheck_if_saves_exist()
Stringget_most_recent_save()
voidclose_all_windows()

Variable descriptions ​

Array[Control] panel_interfaces = [] ​

Array of panel interfaces for UI scaling

Method descriptions ​

void initialize_ui( p_system_hub: GameHost.SystemHub ) ​

Initialize the main menu UI and sub-menus

void connect_signals() ​

Connect all necessary signals

void set_ui_scale( ui_scale: float ) ​

Apply UI scale to all panel interfaces

bool check_if_saves_exist() ​

Check if any save files exist (autosave or manual saves)

String get_most_recent_save() ​

Get the most recent save file (prioritizes autosave, then latest manual save)

void close_all_windows() ​

Close all sub-menus and return to main menu options