mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-09 05:00:42 -06:00
Merging Dashboard branch that introduces the Dashboard, DashboardItem and moves most of the screen rendering code into a component-based layout that can also be displayed as a screenspace renderable * Add Onscreen Dashboard * Add Dashboard class * Add DashboardItem classes and subclasses * Added font and fontsize customization to dashboarditems * Add default dashboard specifications to all scenes * Add tests.scene to test dashboard items * Add configuration options to DashboardItemDistance * Fix distance conversion to correctly use singular or plural values * Make DashboardItems unique when adding them to a dashboard * Correctly position test with different font sizes * Add Dashboard Item that enables spacing between other items * Add performance measurement to dashboard rendering * Add method to DashboardItemDistance that computes distance to surface * Add DashboardItemAngle that computes and prints the angle between three objects * Add DashboardItemInstruments that shows the instruments on New Horizons * Add ability to OpenSpaceModules to return a list of Luascripts defined by child objects * Make it possible for ScreenSpaceDashboard to work with its own dashboard or the main one
64 lines
1.9 KiB
Lua
64 lines
1.9 KiB
Lua
openspace.documentation = {
|
|
{
|
|
Name = "mark_interating_nodes",
|
|
Arguments = "List of nodes",
|
|
Documentation = "This function marks the scene graph nodes identified by name " ..
|
|
"as interesting, which will provide shortcut access to focus buttons and " ..
|
|
"featured properties."
|
|
},
|
|
{
|
|
Name = "set_default_gui_sorting",
|
|
Arguments = "",
|
|
Documentation = "This function sets the default GUI sorting for the space " ..
|
|
"environment to increasing size, from solar system, through Milky Way, " ..
|
|
"Universe and finishing with other elements"
|
|
},
|
|
{
|
|
Name = "set_default_dashboard",
|
|
Arguments = "",
|
|
Documentation = "This function sets the default values for the dashboard " ..
|
|
"consisting of 'DashboardItemDate', 'DashboardItemSimulationIncrement', " ..
|
|
"'DashboardItemDistance', 'DashboardItemFramerate', and " ..
|
|
"'DashboardItemParallelConnection'."
|
|
}
|
|
}
|
|
|
|
openspace.mark_interesting_nodes = function(nodes)
|
|
for _, n in pairs(nodes) do
|
|
if openspace.hasSceneGraphNode(n) then
|
|
openspace.addTag(n, "GUI.Interesting")
|
|
end
|
|
end
|
|
end
|
|
|
|
openspace.set_default_dashboard = function()
|
|
openspace.dashboard.addDashboardItem({
|
|
Type = "DashboardItemDate"
|
|
})
|
|
|
|
openspace.dashboard.addDashboardItem({
|
|
Type = "DashboardItemSimulationIncrement"
|
|
})
|
|
|
|
openspace.dashboard.addDashboardItem({
|
|
Type = "DashboardItemDistance"
|
|
})
|
|
|
|
openspace.dashboard.addDashboardItem({
|
|
Type = "DashboardItemFramerate"
|
|
})
|
|
|
|
openspace.dashboard.addDashboardItem({
|
|
Type = "DashboardItemParallelConnection"
|
|
})
|
|
end
|
|
|
|
openspace.set_default_gui_sorting = function()
|
|
openspace.setPropertyValueSingle(
|
|
'Global Properties.ImGUI.Main.Properties.Ordering',
|
|
{
|
|
"Solar System", "Milky Way", "Universe", "Other"
|
|
}
|
|
)
|
|
end
|