SixL client API / browser / GuiCursorMp
Interface: GuiCursorMp
The mouse cursor over the pages: mp.gui.cursor.
Remarks
While the cursor is shown, the mouse goes to the pages, and the keyboard too: the game keeps its focus, and keys go to the page's focused element (a click into an input field focuses it). Keys that belong to the system (Alt+Tab, the Windows keys, Ctrl+Alt+Del) stay the system's.
Example
mp.gui.cursor.show(true, true);
Properties
visible
visible: boolean
Whether the cursor is shown. Setting it is the same as show(false, value): the game's controls are not frozen.
Example
mp.gui.cursor.visible = false;
Methods
show()
show(freezeControls,state):void
Shows or hides the cursor.
Parameters
freezeControls
boolean
true also stops the game's own controls (the keyboard and the gamepad no longer reach the game). It has effect only when state is true.
state
boolean
true shows the cursor, false hides it.
Returns
void
Remarks
While shown, the mouse and keyboard go to the pages and the game keeps its focus, so the game is not put aside. Hiding it returns the keys to the game.
Example
mp.gui.cursor.show(true, true); // a menu: the mouse and keyboard go to the page
mp.gui.cursor.show(false, false);