mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-25 13:38:34 -06:00
- Remove the asset_helper file and call the onInitialize and onDeinitialize functions directly - Small compile fix on Windows - Removes the need for the registerIdentifierWithMeta function by automatically doing that for all asset.export statements - Allow the passing of either identifiers (as before) or entire tables to the removeSceneGraphNode, removeScreenSpaceRenderable, deleteLayer, removeAction, and export methods. In that case, the Identifier key from the table is extracted and used instead
23 lines
633 B
Lua
23 lines
633 B
Lua
--testing_keybindings.asset
|
|
|
|
local propertyHelper = asset.require("./property_helper")
|
|
|
|
local take_screenshot = {
|
|
Identifier = "testing_keyboard.take_screenshot",
|
|
Name = "Take Screenshot",
|
|
Command = "openspace.takeScreenshot()",
|
|
Documentation = "Saves the contents of the screen to a file in the ${SCREENSHOTS} directory.",
|
|
GuiPath = "/Rendering",
|
|
IsLocal = true
|
|
}
|
|
|
|
asset.onInitialize(function()
|
|
openspace.action.registerAction(take_screenshot)
|
|
openspace.bindKey("F7", take_screenshot.Identifier)
|
|
end)
|
|
|
|
asset.onDeinitialize(function ()
|
|
openspace.action.removeAction(take_screenshot)
|
|
openspace.clearKey("F7")
|
|
end)
|