C# Class GarrysModLuaShared.gui

The gui library is similar to the input library but features functions that are more focused on the mouse's interaction with GUI panels.
Afficher le fichier Open project: OmegaExtern/gmod-csharp-binary-module

Méthodes publiques

Méthode Description
ActivateGameUI ( LuaState luaState ) : void

Opens the game menu overlay.

EnableScreenClicker ( LuaState luaState, bool enabled ) : void

Enables the mouse cursor without restricting player movement, like using Sandbox's Context Menu.

HideGameUI ( LuaState luaState ) : void

Hides the game menu overlay.

InternalCursorMoved ( LuaState luaState, double deltaX, double deltaY ) : void

Simulates a mouse move with the given deltas.

InternalKeyCodePressed ( LuaState luaState, KEY key ) : void

Simulates a key press for the given key.

InternalKeyCodeReleased ( LuaState luaState, KEY key ) : void

Simulates a key release for the given key.

InternalKeyCodeTyped ( LuaState luaState, KEY key ) : void

Simulates a key type typing to the specified key.

InternalKeyTyped ( LuaState luaState, double code ) : void

Simulates a ASCII symbol writing. Use for write text in chat or VGUI. Don't work while console open!

InternalMouseDoublePressed ( LuaState luaState, MOUSE key ) : void

Simulates a double mouse key press for the given mouse key.

InternalMousePressed ( LuaState luaState, MOUSE key ) : void

Simulates a mouse key press for the given mouse key.

InternalMouseReleased ( LuaState luaState, MOUSE key ) : void

Simulates a mouse key release for the given mouse key.

InternalMouseWheeled ( LuaState luaState, double delta ) : void

Simulates a mouse wheel scroll with the given delta.

IsConsoleVisible ( LuaState luaState ) : bool

Returns whenever the console is visible.

IsGameUIVisible ( LuaState luaState ) : bool

Returns whenever the game menu overlay ( main menu ) is open or not.

MousePos ( LuaState luaState ) : double>.Tuple

Returns the cursor's position on the screen.

MousePos ( LuaState luaState, double &mouseX, double &mouseY ) : void

Returns the cursor's position on the screen.

MouseX ( LuaState luaState ) : double

Returns X component of the mouse position.

MouseY ( LuaState luaState ) : double

Returns Y component of the mouse position.

OpenURL ( LuaState luaState, string url ) : void

Opens specified URL in the steam overlay browser. The URL has to start with either "http://" or "https://".

SetMousePos ( LuaState luaState, double mouseX, double mouseY ) : void

Sets the cursor's position on the screen, relative to the topleft corner of the window.

Method Details

ActivateGameUI() public static méthode

Opens the game menu overlay.
public static ActivateGameUI ( LuaState luaState ) : void
luaState LuaState Pointer to lua_State struct.
Résultat void

EnableScreenClicker() public static méthode

Enables the mouse cursor without restricting player movement, like using Sandbox's Context Menu.
public static EnableScreenClicker ( LuaState luaState, bool enabled ) : void
luaState LuaState Pointer to lua_State struct.
enabled bool Whether the cursor should be enabled or not (true = enable, false = disable).
Résultat void

HideGameUI() public static méthode

Hides the game menu overlay.
public static HideGameUI ( LuaState luaState ) : void
luaState LuaState Pointer to lua_State struct.
Résultat void

InternalCursorMoved() public static méthode

Simulates a mouse move with the given deltas.
public static InternalCursorMoved ( LuaState luaState, double deltaX, double deltaY ) : void
luaState LuaState Pointer to lua_State struct.
deltaX double The movement delta on the x axis.
deltaY double The movement delta on the y axis.
Résultat void

InternalKeyCodePressed() public static méthode

Simulates a key press for the given key.
public static InternalKeyCodePressed ( LuaState luaState, KEY key ) : void
luaState LuaState Pointer to lua_State struct.
key KEY The key.
Résultat void

InternalKeyCodeReleased() public static méthode

Simulates a key release for the given key.
public static InternalKeyCodeReleased ( LuaState luaState, KEY key ) : void
luaState LuaState Pointer to lua_State struct.
key KEY The key.
Résultat void

InternalKeyCodeTyped() public static méthode

Simulates a key type typing to the specified key.
public static InternalKeyCodeTyped ( LuaState luaState, KEY key ) : void
luaState LuaState Pointer to lua_State struct.
key KEY The key.
Résultat void

InternalKeyTyped() public static méthode

Simulates a ASCII symbol writing. Use for write text in chat or VGUI. Don't work while console open!
public static InternalKeyTyped ( LuaState luaState, double code ) : void
luaState LuaState Pointer to lua_State struct.
code double ASCII code of symbol, see .
Résultat void

InternalMouseDoublePressed() public static méthode

Simulates a double mouse key press for the given mouse key.
public static InternalMouseDoublePressed ( LuaState luaState, MOUSE key ) : void
luaState LuaState Pointer to lua_State struct.
key MOUSE The key.
Résultat void

InternalMousePressed() public static méthode

Simulates a mouse key press for the given mouse key.
public static InternalMousePressed ( LuaState luaState, MOUSE key ) : void
luaState LuaState Pointer to lua_State struct.
key MOUSE The key.
Résultat void

InternalMouseReleased() public static méthode

Simulates a mouse key release for the given mouse key.
public static InternalMouseReleased ( LuaState luaState, MOUSE key ) : void
luaState LuaState Pointer to lua_State struct.
key MOUSE The key.
Résultat void

InternalMouseWheeled() public static méthode

Simulates a mouse wheel scroll with the given delta.
public static InternalMouseWheeled ( LuaState luaState, double delta ) : void
luaState LuaState Pointer to lua_State struct.
delta double The amount of scrolling to simulate.
Résultat void

IsConsoleVisible() public static méthode

Returns whenever the console is visible.
public static IsConsoleVisible ( LuaState luaState ) : bool
luaState LuaState Pointer to lua_State struct.
Résultat bool

IsGameUIVisible() public static méthode

Returns whenever the game menu overlay ( main menu ) is open or not.
public static IsGameUIVisible ( LuaState luaState ) : bool
luaState LuaState Pointer to lua_State struct.
Résultat bool

MousePos() public static méthode

Returns the cursor's position on the screen.
public static MousePos ( LuaState luaState ) : double>.Tuple
luaState LuaState Pointer to lua_State struct.
Résultat double>.Tuple

MousePos() public static méthode

Returns the cursor's position on the screen.
public static MousePos ( LuaState luaState, double &mouseX, double &mouseY ) : void
luaState LuaState Pointer to lua_State struct.
mouseX double Mouse X coordinate.
mouseY double Mouse Y coordinate.
Résultat void

MouseX() public static méthode

Returns X component of the mouse position.
public static MouseX ( LuaState luaState ) : double
luaState LuaState Pointer to lua_State struct.
Résultat double

MouseY() public static méthode

Returns Y component of the mouse position.
public static MouseY ( LuaState luaState ) : double
luaState LuaState Pointer to lua_State struct.
Résultat double

OpenURL() public static méthode

Opens specified URL in the steam overlay browser. The URL has to start with either "http://" or "https://".
public static OpenURL ( LuaState luaState, string url ) : void
luaState LuaState Pointer to lua_State struct.
url string URL to open.
Résultat void

SetMousePos() public static méthode

Sets the cursor's position on the screen, relative to the topleft corner of the window.
public static SetMousePos ( LuaState luaState, double mouseX, double mouseY ) : void
luaState LuaState Pointer to lua_State struct.
mouseX double The X coordinate to move the cursor to.
mouseY double The Y coordinate to move the cursor to.
Résultat void