as a replacement for EnableMenuNavigationInputs
there's now
Code: Select all
Void EnableMenuNavigation(Boolean EnableInputs,Boolean WithAutoFocus,CMlControl AutoBackControl,Integer InputPriority);
WithAutoFocus easiyy allows to add keyboard navigation by generates the usual "MouseOver" / "MouseClick" events for the script when the players uses the using the up/right/left/down... keys.
AutoBackControl is the control to "MouseClick" when ESC key is pressed.
InputPriority is used to solve the ambiguity of wich layer has the focus when several layers use EnableMenuNavigation() at the same time.
(the highest priority visible layer has the focus. And the script can know this by testing IsMenuNavigationForeground )
---
It is also now possible for a game mode script to make a custom "esc" in-game menu.
- Make a manialink layer of type InGameMenu. and it will be displayed instead of the usual menu.
- you can then call CloseInGameMenu() to close it when the user has made their choice.
/!\ beware that if the menu doesn't properly call CloseInGameMenu() the player will be stuck with an open menu and no longer be able to play...