Files
OpenSpace/data/assets/examples/dashboarditems.asset
Alexander Bock 705c898ccd Asset File cleanup (#2713)
* Updating all assets to new coding style
* Cleaning up asset files
* Moving default_actions and default_keybindings files
* Changing procedural globes to explicitly specified globes
* Move Spice loading explicitly to the initialize part and also deinitialize
* Removing unused asset files
  * Removing asset_helper
  * Removing scale_model_helper asset
  * Removing script_scheduler_helper
  * Removing testing_keybindings
  * Remove procedural_globe
2023-05-28 17:23:20 +02:00

103 lines
2.7 KiB
Lua

local Angle = {
Type = "DashboardItemAngle",
Identifier = "Angle",
GuiName = "Angle",
ReferenceType = "Node",
ReferenceNodeName = "Earth",
DestinationType = "Node",
DestinationNodeName = "Moon"
}
local Date = {
Type = "DashboardItemDate",
Identifier = "Date",
GuiName = "Date"
}
local SimulationIncrement = {
Type = "DashboardItemSimulationIncrement",
Identifier = "SimulationIncrement",
GuiName = "Simulation Increment"
}
local Distance = {
Type = "DashboardItemDistance",
Identifier = "Distance",
GuiName = "Distance"
}
local Framerate = {
Type = "DashboardItemFramerate",
Identifier = "Framerate",
GuiName = "Framerate"
}
local ParallelConnection = {
Type = "DashboardItemParallelConnection",
Identifier = "ParallelConnection",
GuiName = "Parallel Connection"
}
local Mission = {
Type = "DashboardItemMission",
Identifier = "Mission",
GuiName = "Mission"
}
local PropertyValue = {
Type = "DashboardItemPropertyValue",
Identifier = "asd",
GuiName = "adasd",
URI = "Scene.Earth.Renderable.Enabled",
DisplayString = "Earth is enabled: {}"
}
local ElapsedTime = {
Type = "DashboardItemElapsedTime",
Identifier = "ElapsedTime",
ReferenceTime = "2022-10-12 12:00:00"
}
local InputState = {
Type = "DashboardItemInputState",
Identifier = "InputState"
}
asset.onInitialize(function()
openspace.dashboard.addDashboardItem(Angle)
openspace.dashboard.addDashboardItem(Date)
openspace.dashboard.addDashboardItem(SimulationIncrement)
openspace.dashboard.addDashboardItem(Distance)
openspace.dashboard.addDashboardItem(Framerate)
openspace.dashboard.addDashboardItem(ParallelConnection)
openspace.dashboard.addDashboardItem(Mission)
openspace.dashboard.addDashboardItem(PropertyValue)
openspace.dashboard.addDashboardItem(ElapsedTime)
openspace.dashboard.addDashboardItem(InputState)
end)
asset.onDeinitialize(function()
openspace.dashboard.removeDashboardItem(InputState)
openspace.dashboard.removeDashboardItem(ElapsedTime)
openspace.dashboard.removeDashboardItem(PropertyValue)
openspace.dashboard.removeDashboardItem(Mission)
openspace.dashboard.removeDashboardItem(ParallelConnection)
openspace.dashboard.removeDashboardItem(Framerate)
openspace.dashboard.removeDashboardItem(Distance)
openspace.dashboard.removeDashboardItem(SimulationIncrement)
openspace.dashboard.removeDashboardItem(Date)
openspace.dashboard.removeDashboardItem(Angle)
end)
asset.export(Angle)
asset.export(Date)
asset.export(SimulationIncrement)
asset.export(Distance)
asset.export(Framerate)
asset.export(ParallelConnection)
asset.export(Mission)
asset.export(PropertyValue)
asset.export(ElapsedTime)
asset.export(InputState)