mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-21 18:38:20 -05:00
Feature/dashboard (#431)
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
This commit is contained in:
@@ -12,6 +12,14 @@ openspace.documentation = {
|
||||
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'."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,6 +31,28 @@ openspace.mark_interesting_nodes = function(nodes)
|
||||
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',
|
||||
@@ -30,4 +60,4 @@ openspace.set_default_gui_sorting = function()
|
||||
"Solar System", "Milky Way", "Universe", "Other"
|
||||
}
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user