The main menu (fl_main_menu): a fullscreen panel with a sidebar of buttons and at most
one submenu open at a time.
The buttons are added with add_button from the AddMainMenuItems hook; a button either runs
a callback or opens a theme panel as the submenu. The theme draws the menu and supplies its
music.
Summary
Methods
Methods
Adds a button to the sidebar.
Parameters
- text String button title, displayed in upper case
- callback Function/String function that receives the clicked button, or the ID of a theme panel to open as the submenu
Returns
- Panel the created button
Covers the screen, builds the sidebar and starts the theme's menu music unless the framework runs in development mode.
Shows a notification near the bottom of the menu unless one is already visible.
Parameters
- text String
Restores the blur update rate that was lowered while the menu was open.
Opens a theme panel as the submenu, closing the currently open submenu first.
Parameters
- panel String theme panel ID
- data Any optional, defaults to
nilpassed to the set_data method of the new panel, if it has one
Draws the menu through the theme's PaintMainMenu hook.
Parameters
- w Number
- h Number
Recreates the sidebar, optionally filling it through the AddMainMenuItems hook.
Parameters
- create_buttons Boolean optional, defaults to
falseadd the menu buttons and center them
Animates the schema logo offset toward zero while a submenu is open and back otherwise.