GameInputElement

From Xojo Documentation
Jump to: navigation, search

Class (inherits from Object)


Manages an element of a GameInputDevice. Not supported on Linux.


Properties
Device ReadOnlyProperty.png Name ReadOnlyProperty.png Value ReadOnlyProperty.png


Notes

A GameInputElement is a control on an input device used for gaming (or general user input via the keyboard and mouse). For example, the Fire button on a joystick control is an element, as are the standard mouse button and each of the keys on a keyboard. The Element method of the GameInputDevice class give you access to the elements of a specified device. You use the WaitForElement method of the GameInputManager class to detect input from an element.


Examples

This example loads the list of elements belonging to the selected device into a PopupMenu named ElementPop. The connected devices are shown in a ListBox.

Dim i, Maxi As Integer
Dim device As GameInputDevice

ElementPop.DeleteAllRows
Device = mManager.Device(Listbox1.ListIndex) //selected device in Device ListBox
If Device <> Nil then
Maxi = Device.ElementCount
For i = 0 to Maxi-1
ElementPop.AddRow Device.Element(i).Name
next
end if

See also the examples for GameInputManager.

See Also

GameInputDevice, GameInputManager classes.

Personal tools
Namespaces

Variants
Actions
Main
Content
Starting Out
Dig Deeper
More Help
Toolbox
About