C# Класс 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.
Показать файл Открыть проект

Открытые методы

Метод Описание
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.

Описание методов

ActivateGameUI() публичный статический Метод

Opens the game menu overlay.
public static ActivateGameUI ( LuaState luaState ) : void
luaState LuaState Pointer to lua_State struct.
Результат void

EnableScreenClicker() публичный статический Метод

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).
Результат void

HideGameUI() публичный статический Метод

Hides the game menu overlay.
public static HideGameUI ( LuaState luaState ) : void
luaState LuaState Pointer to lua_State struct.
Результат void

InternalCursorMoved() публичный статический Метод

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.
Результат void

InternalKeyCodePressed() публичный статический Метод

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.
Результат void

InternalKeyCodeReleased() публичный статический Метод

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.
Результат void

InternalKeyCodeTyped() публичный статический Метод

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.
Результат void

InternalKeyTyped() публичный статический Метод

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 .
Результат void

InternalMouseDoublePressed() публичный статический Метод

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.
Результат void

InternalMousePressed() публичный статический Метод

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.
Результат void

InternalMouseReleased() публичный статический Метод

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.
Результат void

InternalMouseWheeled() публичный статический Метод

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.
Результат void

IsConsoleVisible() публичный статический Метод

Returns whenever the console is visible.
public static IsConsoleVisible ( LuaState luaState ) : bool
luaState LuaState Pointer to lua_State struct.
Результат bool

IsGameUIVisible() публичный статический Метод

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.
Результат bool

MousePos() публичный статический Метод

Returns the cursor's position on the screen.
public static MousePos ( LuaState luaState ) : double>.Tuple
luaState LuaState Pointer to lua_State struct.
Результат double>.Tuple

MousePos() публичный статический Метод

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.
Результат void

MouseX() публичный статический Метод

Returns X component of the mouse position.
public static MouseX ( LuaState luaState ) : double
luaState LuaState Pointer to lua_State struct.
Результат double

MouseY() публичный статический Метод

Returns Y component of the mouse position.
public static MouseY ( LuaState luaState ) : double
luaState LuaState Pointer to lua_State struct.
Результат double

OpenURL() публичный статический Метод

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.
Результат void

SetMousePos() публичный статический Метод

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.
Результат void