script improvement for manialink menus

Talk about ManiaLink development in this forum

Moderator: NADEO

Post Reply
User avatar
xbx
Nadeo
Nadeo
Posts: 1289
Joined: 14 Jun 2010, 17:35

script improvement for manialink menus

Post by xbx »

We've included some additional functionality to make custom menus.

as a replacement for EnableMenuNavigationInputs
there's now

Code: Select all

Void EnableMenuNavigation(Boolean EnableInputs,Boolean WithAutoFocus,CMlControl AutoBackControl,Integer InputPriority);
EnableInputs is same as the old EnableMenuNavigationInputs, it sends events to the script with the EMenuNavAction.

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...
Post Reply

Return to “ManiaLink”

Who is online

Users browsing this forum: No registered users and 1 guest