DashboardItemInstruments

Inherits DashboardItem

Asset Examples

 1asset.require("./model")
 2asset.require("./pluto")
 3
 4
 5
 6local Spacing = {
 7  Type = "DashboardItemSpacing",
 8  Identifier = "NewHorizonsSpacing",
 9  GuiName = "New Horizons Spacing",
10  Spacing = 25
11}
12
13local Distance = {
14  Type = "DashboardItemDistance",
15  Identifier = "NewHorizonsPlutoDistance",
16  GuiName = "New Horizons Pluto Distance",
17  SourceType = "Node",
18  SourceNodeName = "NewHorizons",
19  DestinationType = "Node Surface",
20  DestinationNodeName = "PlutoProjection"
21}
22
23local Instruments = {
24  Type = "DashboardItemInstruments",
25  Identifier = "NewHorizonsInstruments",
26  GuiName = "NewHorizons Instruments"
27}
28
29
30asset.onInitialize(function()
31  openspace.dashboard.addDashboardItem(Spacing)
32  openspace.dashboard.addDashboardItem(Distance)
33  openspace.dashboard.addDashboardItem(Instruments)
34end)
35
36asset.onDeinitialize(function()
37  openspace.dashboard.removeDashboardItem(Instruments)
38  openspace.dashboard.removeDashboardItem(Distance)
39  openspace.dashboard.removeDashboardItem(Spacing)
40end)