GameInputDevice.ElementCount

From Xojo Documentation

Read-Only Property (As Integer )


IntegerValue = aGameInputDevice.ElementCount

Supported for all project types and targets.

The number of elements the device has.

Example

This example gets the number of GameInputDevices and then populates a PopupMenu with the names of those devices.

Var i, maxi As Integer
Var device As GameInputDevice

ElementPop.RemoveAllRows
device = mManager.Device(Me.SelectedIndex) // selected device in Device popup
If device <> Nil Then
maxi = device.ElementCount
For i = 0 To maxi - 1
ElementPop.AddRow(device.Element(i).Name)
Next
End If

mElement = Nil