DashboardItemInputState
Inherits DashboardItem
This DashboardItem shows the current state of the different methods to provide user input: keyboard, mouse, and/or joystick.
Each input method has the ability to be selectively disabled, meaning that all inputs from that input method are ignored by the system entirely.
Members
Name |
Documentation |
Type |
Description |
Optional |
|---|---|---|---|---|
|
This value is the name of the font that is used. It can either refer to an internal name registered previously, or it can refer to a path that is used. |
|
Value of type ‘String’ |
Yes |
|
This value determines the size of the font that is used to render the distance. |
|
Value of type ‘Double’ |
Yes |
|
Display the state of the joystick input. |
|
Value of type ‘Boolean’ |
Yes |
|
Display the state of the keyboard input. |
|
Value of type ‘Boolean’ |
Yes |
|
Display the state of the mouse input. |
|
Value of type ‘Boolean’ |
Yes |
|
Show text when the input is disabled. |
|
Value of type ‘Boolean’ |
Yes |
|
Show text when the input is enabled. |
|
Value of type ‘Boolean’ |
Yes |
Inherited members from DashboardItem
Name |
Documentation |
Type |
Description |
Optional |
|---|---|---|---|---|
|
The unique identifier for this DashboardItem. |
|
An identifier string. May not contain ‘.’, spaces, newlines, or tabs |
No |
|
Determines the type of the DashbordItem that should be created. |
|
Value of type ‘String’ |
No |
|
If this value is set to ‘true’ this dashboard item is shown in the dashboard. Otherwise it will be hidden. |
|
Value of type ‘Boolean’ |
Yes |
|
The name for the DashboardItem that is used when showing it in the user interface. |
|
Value of type ‘String’ |
Yes |
Asset Examples
Only disabled
This example adds a dashboard item that shows the input state of the mouse, keyboard, and joystick input devices but only when they are disabled.
1local Item = {
2 Identifier = "DashboardItemInputState_Example_OnlyDisabled",
3 Type = "DashboardItemInputState",
4 ShowWhenDisabled = true
5}
6
7asset.onInitialize(function()
8 openspace.dashboard.addDashboardItem(Item)
9end)
10
11asset.onDeinitialize(function()
12 openspace.dashboard.removeDashboardItem(Item)
13end)
Mouse Only
This example adds a dashboard item that only shows the input state of the mouse inputs.
1local Item = {
2 Identifier = "DashboardItemInputState_Example_MouseOnly",
3 Type = "DashboardItemInputState",
4 ShowKeyboard = false,
5 ShowJoystick = false
6}
7
8asset.onInitialize(function()
9 openspace.dashboard.addDashboardItem(Item)
10end)
11
12asset.onDeinitialize(function()
13 openspace.dashboard.removeDashboardItem(Item)
14end)
Basic
This example adds a dashboard item that shows the input state of the mouse, keyboard, and joystick input devices.
1local Item = {
2 Identifier = "DashboardItemInputState_Example",
3 Type = "DashboardItemInputState"
4}
5
6asset.onInitialize(function()
7 openspace.dashboard.addDashboardItem(Item)
8end)
9
10asset.onDeinitialize(function()
11 openspace.dashboard.removeDashboardItem(Item)
12end)