Skip to content

Main Menu Manager

chris edited this page Jun 12, 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
  • 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.

buttonLoadExample: Button = A reference to Load Example 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.

buttonNewLevelCreate: Button = A reference to New Level button child: create button.

buttonNewLevelCancel: Button = A reference to New Level button child: cancel button.

fieldNewLevelName: LineEdit = A reference to New Level button child: level name field.

spinBoxNewLevelX: SpinBox = A reference to New Level button child: grid size X SpinBox.

spinBoxfieldNewLevelY: SpinBox = A reference to New Level button child: grid size Y SpinBox.

buttonImportLevelCancel: Button = A reference to Import Level button child: cancel button.

buttonImportLevelOpen: Button = A reference to Import Level button child: open button.

buttonImportLevelBrowse: TextureButton = A reference to Import Level button child: browse button.

fieldImportLevelPath: LineEdit = A reference to Import Level button child: filepath field.

panelInvalidPath: PanelContainer = A reference to Import Level button child: invalid path panel.

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: ensures name, and x,y fields are correct types, call the masterManager.level_setup()

func exit_program() -> void: closes the applications


Future Work / Risks

List and description of upcoming work/risks.

Future Work:

  • New Level Overlay

    • create some sort of pop-up or custom behavior for pressing create without the fields filled out
  • Import Level Overlay

    • allow for properly loading a custom level file
  • Level List

    • All implementation of this needs to get done

Risks:

  • script bloated by references

Miscellaneous Notes

A place for miscellaneous notes pertaining to this system.

  • none.

Clone this wiki locally