mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-05 19:19:39 -06:00
Add new keybindings Shift+H to toggle all trails including the ISS (closes #3005)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
asset.require("./base")
|
||||
local trailAction = asset.require("actions/trails/toggle_trails_planets_moons").ToggleTrails
|
||||
local allTrailsAction = asset.require("actions/trails/toggle_all_trails").ToggleTrails
|
||||
|
||||
|
||||
|
||||
@@ -14,22 +15,23 @@ local TogglePlanetLabels = {
|
||||
]],
|
||||
Documentation = "Turns on visibility for all solar system labels",
|
||||
GuiPath = "/Solar System",
|
||||
IsLocal = false,
|
||||
Key = "l"
|
||||
IsLocal = false
|
||||
}
|
||||
|
||||
asset.onInitialize(function()
|
||||
openspace.action.registerAction(TogglePlanetLabels)
|
||||
openspace.bindKey(TogglePlanetLabels.Key, TogglePlanetLabels.Identifier)
|
||||
openspace.bindKey("L", TogglePlanetLabels.Identifier)
|
||||
|
||||
openspace.bindKey("h", trailAction)
|
||||
openspace.bindKey("H", trailAction)
|
||||
openspace.bindKey("SHIFT+H", allTrailsAction)
|
||||
end)
|
||||
|
||||
asset.onDeinitialize(function()
|
||||
openspace.clearKey("h")
|
||||
openspace.clearKey("SHIFT+H")
|
||||
openspace.clearKey("H")
|
||||
|
||||
openspace.action.removeAction(TogglePlanetLabels)
|
||||
openspace.clearKey(TogglePlanetLabels.Key)
|
||||
openspace.clearKey("L")
|
||||
end)
|
||||
|
||||
asset.export("TogglePlanetLabels", TogglePlanetLabels.Identifier)
|
||||
|
||||
Reference in New Issue
Block a user