DashboardItemText
Inherits DashboardItem
Members
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. |
|
Must name a valid DashboardItem type |
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 |
|
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 |
|
The name for the DashboardItem that is used when showing it in the user interface. |
|
Value of type ‘String’ |
Yes |
|
The text to be displayed. |
|
Value of type ‘String’ |
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. |
|
Must name a valid DashboardItem type |
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
Basic
This example adds a dashboard item that shows a string of text. The contents of this text can be controlled at runtime through a property of the dashboard item.
1local Item = {
2 Identifier = "DashboardItemText_Example",
3 Type = "DashboardItemText",
4 Text = "This is a dashboard text example text"
5}
6
7
8asset.onInitialize(function()
9 openspace.dashboard.addDashboardItem(Item)
10end)
11
12asset.onDeinitialize(function()
13 openspace.dashboard.removeDashboardItem(Item)
14end)
Font
This example adds a dashboard item that shows a string of text rendered with a different font face and a larger font size. The contents of this text can be controlled at runtime through a property of the dashboard item.
1local Item = {
2 Identifier = "DashboardItemText_Font",
3 Type = "DashboardItemText",
4 Text = "This is a dashboard text example text",
5 FontName = "Light",
6 FontSize = 72.0
7}
8
9
10asset.onInitialize(function()
11 openspace.dashboard.addDashboardItem(Item)
12end)
13
14asset.onDeinitialize(function()
15 openspace.dashboard.removeDashboardItem(Item)
16end)