Packages
Comm
DB
Debug
Input
Interface
Module
Token
User

Objects
bitmapwidget
databasenode
dragdata
textwidget
tokeninstance
widget
widgetcontainer

Elements
buttoncontrol
categoryselectioncontrol
chatentry
chatwindow
databasecontrol
diecontrol
diefield
formattedtextcontrol
formattedtextfield
genericcontrol
imagecontrol
numbercontrol
numberfield
portraitselectioncontrol
script
scrollbarcontrol
scrollercontrol
stringcontrol
stringfield
subwindow
textbasecontrol
tokenbag
tokencontrol
tokenfield
windowclass
windowcontrol
windowinstance
windowlist
windowreferencecontrol
windowreferencefield

Components
categoryselectionsettings
customdie
desktopframe
die
distance
font
framedef
hotkeybar
icon
imageupdatefolder
importinfo
includefile
panel
portraitset
properties
replaces
template
tokenroot
tooltip
getDragData
getMouseButtonState
getMousePosition
isAltPressed
isControlPressed
isShiftPressed
onAlt
onControl
onShift



This is a global built in package that provides information about the state of the user input devices.



Interface

getDragData

function getDragData( )

Retrieves the data on the current drag and drop operation.

Return values

(dragdata)
A reference to a dragdata object, or nil if no drag is underway

getMouseButtonState

function getMouseButtonState( button )

Get the state of the specified mouse button.

Parameters

button(number)
This value specifies the mouse button whose state is being queried and should be 1 for the left mouse button, 2 for the middle button and 3 for the right button

Return values

(boolean)
Returns true if the button is pressed and false if it is not

getMousePosition

function getMousePosition( )

Retrieve the current mouse pointer coordinates relative to the top left corner of the application window area.

Return values

(number)
The X coordinate of the mouse cursor
(number)
The Y coordinate of the mouse cursor

isAltPressed

function isAltPressed( )

Check the state of the alt key.

Return values

(boolean)
Returns true if the key is down, false otherwise

isControlPressed

function isControlPressed( )

Check the state of the control key.

Return values

(boolean)
Returns true if the key is down, false otherwise

isShiftPressed

function isShiftPressed( )

Check the state of the shift key.

Return values

(boolean)
Returns true if the key is down, false otherwise

onAlt

handler function onAlt( pressed )

Called when the alt key is pressed down or released.

Parameters

pressed(boolean)
A value of true if the key was pressed, or false if it was released

onControl

handler function onControl( pressed )

Called when the control key is pressed down or released.

Parameters

pressed(boolean)
A value of true if the key was pressed, or false if it was released

onShift

handler function onShift( pressed )

Called when the shift key is pressed down or released.

Parameters

pressed(boolean)
A value of true if the key was pressed, or false if it was released


'Fantasy Grounds' is a trademark of SmiteWorks Ltd. All other trademarks are the property of their respective owners.
2004-2010 SmiteWorks Ltd. ALL RIGHTS RESERVED.
Privacy policy