Gkinterface: Difference between revisions

From Vendetta Lua
Jump to navigationJump to search
Drazed (talk | contribs)
Line 95: Line 95:
=== GKPoll ===
=== GKPoll ===
=== GKProcessCommand ===
=== GKProcessCommand ===
[http://www.vendetta-online.com/manual/app_commands.html list of the Vendetta commands]<br>
[http://www.vo-wiki.com/wiki/Command_List detailed explanation of the commands]
=== GKRenderFrame ===
=== GKRenderFrame ===
=== GKUpdateFrame ===
=== GKUpdateFrame ===

Revision as of 05:03, 3 September 2008

Interface related functions.

Mouse related Functions

Those of these which come in Get/Set pairs are combined into a single entry below.

GetMouseLookMode/SetMouseLookMode

These relate to the mouselook mode. "True" with these refers to mouselook being on, false to mouselook being disabled. <source lang="lua"> gkinterface.SetMouseLookMode(true) -- enables mouselook mode gkinterface.GetMouseLookMode() -- would return "true" now gkinterface.SetMouseLookMode(false) -- disables mouselook mode gkinterface.GetMouseLookMode() -- would return "false" now </source>


GetMouseOptions/SetMouseOptions

I'm not sure what this does. The Get option returns the following data structure (on my machine) <source lang="lua"> {

   1 = {
       "name" = "X Axis",
       "value" = 1
   },
   2 = {
       "name" = "Y Axis",
       "value" = 1
   }

} </source>

GetMousePosition

Definition: gkinterface.GetMousePosition() -> float percent_x, float percent_y

Description Returns two floats which designate how far across the screen the mouse pointer is in percent, as seen from the top left. E.g., if the mouse pointer is dead centre of the screen, this would return "0.5, 0.5" while if it were at the top left, this would return 0,0.


GetMouseSensitivity/SetMouseSensitivity

Get or set the mouse sensitivity. This can be set to values from 1-20 via the Controls menu, but really can go quite a bit higher. Negative values invert mouse movement (for both axis, so this is not a way to get "invert mouse" behaviour).

SetMouseCursor

to do

SetMouseCursorIndexImage

to do

SetMouseHotspot

to do

Uncategorized Functions

AddDirectionalLight

BindCommand

BindJoystickCommand

CaptureMouse

Draw3DScene

EvictTextures

GetAudioDrivers

GetAudioOptions

GetBindsForCommand

GetCommandForKeyboardBind

GetCurrentAudioDriverName

GetCurrentVideoDriverName

GetGameOptions

GetGraphicsOptions

GetInputCodeByName

GetNameForInputCode

GetVideoDrivers

GetVideoOptions

GetXResolution

Definition: gkinterface.GetXResolution -> int width

Description Returns the width of the current game resolution

Arguments None

Returns An int containing the current game screen width (e.g. 800)

GetYResolution

Definition: gkinterface.GetYResolution -> int width

Description Returns the height of the current game resolution

Arguments None

Returns An int containing the current game screen height (e.g. 600)

GKLoadCommands

GKPoll

GKProcessCommand

list of the Vendetta commands
detailed explanation of the commands

GKRenderFrame

GKUpdateFrame

HideMouse

InitializeLevelGfx

IsAltKeyDown

Definition: gkinterface.IsAltKeyDown() -> bool pressed

Description Test if the Alt key is currently pressed.

Arguments None

Returns True if the either of the alt keys is currently pressed, false otherwise.

IsCtrlKeyDown

Definition: gkinterface.IsCtrlKeyDown() -> bool pressed

Description Test if the Ctrl key is currently pressed.

Arguments None

Returns True if the either of the ctrl keys is currently pressed, false otherwise.

IsShiftKeyDown

Definition: gkinterface.IsShiftKeyDown() -> bool pressed

Description Test if the shift key is currently pressed.

Arguments None

Returns True if the either of the shift keys is currently pressed, false otherwise.

LoadDefaults

QueryAudio

QueryVideo

SetAudioDriver

SetAudioOptions

SetCamera

SetFOV

Definition: gkinterface.SetFOV(int angle) -> nil

Description Sets the Field of View angle in degrees (from 1 to 179). Note that this value is reset each time the player warps to another sector.

Arguments int angle -> the new angle for the field of view.

Returns nil

SetGameOptions

SetGraphicsOptions

SetVideoDriver

SetVideoOptions

SetVisualQuality

ShowMouse

UnbindCommand

UninitializeLevelGfx