Skip to content

Main Menu Manager

Andrew Hernandez edited this page Jul 1, 2026 · 18 revisions

System Summary

The Main Menu Manager handles all buttons, functions, and data relating to the main menu. The project will start with play and edit Node2Ds hidden, and the main menu Control node shown.


Connected Systems

List of connecting/parent/subsystems.

Connecting Systems:

Subsystems:

  • none.

Related Controls

List of related controls.

While the Editor Manager does not have any controls itself, controls related to tools and modifying the grid are under Tool Manager, whereas hotkeys for switching tools are under Hokey Manager.


Bugs

List of known bugs. Be descriptive but keep it brief!

  • none.

Feature List / Breakdown of Features

  • New Level Button: shows the new level pop-up

    • Create Button: as of now directly calls .edit() on menu manager, bringing the global state to EDIT
    • Cancel Button: hides the new level pop-up
  • Import Level Button: shows the import level pop-up

    • Create Button: as of now shows the invalid file-path message since loading files is not implemented
    • Cancel Button: hides the import level pop-up
    • Browse Button: opens file dialog, doesn't have functionality at the moment
  • Level Grid

    • Load Level: Double clicking on the level cards within the level grid loads a level for the user.
  • Quit Button: exits the application

Important Variables

Name the most important variables, their type, and what their purpose is

  • **masterManager: Node2D** = A reference to Master Manager.

  • **buttonNewLevel: Button** = A reference to New Level button in Main Menu Control Node.

  • **buttonImportLevel: Button** = A reference to Import Level button in Main Menu Control Node.

  • **buttonQuit: Button** = A reference to Quit button in Main Menu Control Node.

  • **overlayNewLevel: ColorRect** = A reference to New Level ColorRect in Main Menu Control Node.

  • **overlayImportLevel: ColorRect** = A reference to Import Level ColorRect in Main Menu Control Node.

  • **fileExplorer: FileDialog** = A reference to File Dialog for opening file explorer.

Important Functions

Name of the most important functions, their parameters, and what they do.

  • **func import_level() -> void**: Currently shows incorrect file path message
  • **func import_cancel() -> void**: hides incorrect file path message & hides import overlay
  • **func create_new_level() -> void**: Validates the new level and sends info to Master Manager by calling level_setup
  • **func exit_program() -> void**: closes the applications

Future Work / Risks

List and description of upcoming work/risks.

Future Work:

  • Rearrange the UI in accordance with the plans
  • Overlay the main menu above the editor state instead of being an isolated menu

Risks:

  • Script is bloated by references, and potentially may need a split for each of the 3 main functions (new level, load level, and import).

Miscellaneous Notes

A place for miscellaneous notes pertaining to this system.

  • none.

Clone this wiki locally