A Godot template for Ninesliced, containing various utility scenes and scripts.
A simple menu manager that handles menu navigation, and has default behavior for pause menu functionality.
All menus need to extend from Menu
and need to be put as children of the Menus
node.
Each menu will emit the menu_set
signal when set.
Menus have a is_backable
property to menus if you want to customize the back behavior. This is enabled by default on Android with the back button.
@export var is_pause_enabled = true # Whether pause functionality is enabled
@export var PAUSE_ACTION_NAME = "pause" # Action pressed in order to open the pause menu
@export var PAUSE_MENU_NAME = "PauseMenu" # Pause menu node name
Activates the pause menu if enabled.
Closes all menus and resumes the game.
set_menu(menu_name: String, add_to_stack := true, animation_direction_right := true, no_animation := false)
Displays the specified menu by name, with optional animation and stack tracking.
Same as set_menu
but takes a node directly.
Goes back to the previous menu in the stack or closes the menu system.