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

FontName

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.

String

Value of type ‘String’

Yes

FontSize

This value determines the size of the font that is used to render the distance.

Double

Value of type ‘Double’

Yes

ShowJoystick

Display the state of the joystick input.

Boolean

Value of type ‘Boolean’

Yes

ShowKeyboard

Display the state of the keyboard input.

Boolean

Value of type ‘Boolean’

Yes

ShowMouse

Display the state of the mouse input.

Boolean

Value of type ‘Boolean’

Yes

ShowWhenDisabled

Show text when the input is disabled.

Boolean

Value of type ‘Boolean’

Yes

ShowWhenEnabled

Show text when the input is enabled.

Boolean

Value of type ‘Boolean’

Yes

Inherited members from DashboardItem

Name

Documentation

Type

Description

Optional

Identifier

The unique identifier for this DashboardItem.

Identifier

An identifier string. May not contain ‘.’, spaces, newlines, or tabs

No

Type

Determines the type of the DashbordItem that should be created.

String

Value of type ‘String’

No

Enabled

If this value is set to ‘true’ this dashboard item is shown in the dashboard. Otherwise it will be hidden.

Boolean

Value of type ‘Boolean’

Yes

GuiName

The name for the DashboardItem that is used when showing it in the user interface.

String

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)