GameInputElement.Value
From Xojo Documentation
Read-Only Property (As Integer )
This property is only available on macOS and Windows platforms. For cross-platform compatibility, use #If...#Endif with the Target... specifiers to make sure you will not attempt to use this property on an incompatible platform. |
The current value of this element.
Example
This example loads the names and values corresponding to the selected device into a PopupMenu named ElementPop.
Var i, maxi As Integer
Var device As GameInputDevice
ElementPop.RemoveAllRows
device = mManager.Device(Listbox1.SelectedIndex) // selected device in Device ListBox
If device <> Nil Then
maxi = device.ElementCount
For i = 0 To maxi - 1
ElementPop.AddRow(Device.Element(i).Name + Str(device.Element(i).Value)
Next
End If
Var device As GameInputDevice
ElementPop.RemoveAllRows
device = mManager.Device(Listbox1.SelectedIndex) // selected device in Device ListBox
If device <> Nil Then
maxi = device.ElementCount
For i = 0 To maxi - 1
ElementPop.AddRow(Device.Element(i).Name + Str(device.Element(i).Value)
Next
End If