C# Class GarrysModLuaShared.system

The system library provides functions that allow you to gather information about the system running the game, such as operating system, uptime and battery level.
Afficher le fichier Open project: OmegaExtern/gmod-csharp-binary-module

Méthodes publiques

Méthode Description
AppTime ( LuaState luaState ) : uint

Returns the total uptime of the current application. This will return a similar value to Global.SysTime.

BatteryPower ( LuaState luaState ) : byte

Returns the current battery power.

FlashWindow ( LuaState luaState ) : void

Flashes the window. Currently works only on Windows platform.

GetCountry ( LuaState luaState ) : string

Returns the country code of this computer, determined by the localisation settings of the OS.

HasFocus ( LuaState luaState ) : bool

Returns whether or not the game window has focus. This does nothing on dedicated servers. Returns true 100% of the time on OS X and returns nil on Linux platform.

IsLinux ( LuaState luaState ) : bool

Returns whether the current OS is Linux.

IsOSX ( LuaState luaState ) : bool

Returns whether the current OS is OSX.

IsWindowed ( LuaState luaState ) : bool

Returns true if the game is currently running windowed; otherwise false if it is fullscreen.

IsWindows ( LuaState luaState ) : bool

Returns whether the current OS is Windows.

SteamTime ( LuaState luaState ) : uint

Returns the synchronized steam time. This is the number of seconds since the Unix epoch.

UpTime ( LuaState luaState ) : uint

Returns the total uptime of operating system.

Method Details

AppTime() public static méthode

Returns the total uptime of the current application. This will return a similar value to Global.SysTime.
public static AppTime ( LuaState luaState ) : uint
luaState LuaState Pointer to lua_State struct.
Résultat uint

BatteryPower() public static méthode

Returns the current battery power.
public static BatteryPower ( LuaState luaState ) : byte
luaState LuaState Pointer to lua_State struct.
Résultat byte

FlashWindow() public static méthode

Flashes the window. Currently works only on Windows platform.
public static FlashWindow ( LuaState luaState ) : void
luaState LuaState Pointer to lua_State struct.
Résultat void

GetCountry() public static méthode

Returns the country code of this computer, determined by the localisation settings of the OS.
public static GetCountry ( LuaState luaState ) : string
luaState LuaState Pointer to lua_State struct.
Résultat string

HasFocus() public static méthode

Returns whether or not the game window has focus. This does nothing on dedicated servers. Returns true 100% of the time on OS X and returns nil on Linux platform.
public static HasFocus ( LuaState luaState ) : bool
luaState LuaState Pointer to lua_State struct.
Résultat bool

IsLinux() public static méthode

Returns whether the current OS is Linux.
public static IsLinux ( LuaState luaState ) : bool
luaState LuaState Pointer to lua_State struct.
Résultat bool

IsOSX() public static méthode

Returns whether the current OS is OSX.
public static IsOSX ( LuaState luaState ) : bool
luaState LuaState Pointer to lua_State struct.
Résultat bool

IsWindowed() public static méthode

Returns true if the game is currently running windowed; otherwise false if it is fullscreen.
public static IsWindowed ( LuaState luaState ) : bool
luaState LuaState Pointer to lua_State struct.
Résultat bool

IsWindows() public static méthode

Returns whether the current OS is Windows.
public static IsWindows ( LuaState luaState ) : bool
luaState LuaState Pointer to lua_State struct.
Résultat bool

SteamTime() public static méthode

Returns the synchronized steam time. This is the number of seconds since the Unix epoch.
public static SteamTime ( LuaState luaState ) : uint
luaState LuaState Pointer to lua_State struct.
Résultat uint

UpTime() public static méthode

Returns the total uptime of operating system.
public static UpTime ( LuaState luaState ) : uint
luaState LuaState Pointer to lua_State struct.
Résultat uint