mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-26 05:58:58 -06:00
* Take screnshots using lua function, returning screenshot number. Add screenshot endpoint. * Change capitalization from screenShot to screenshot * Fix screenshot filename collision bug when using multiple windows.
24 lines
594 B
Plaintext
24 lines
594 B
Plaintext
--testing_keybindings.asset
|
|
|
|
local sceneHelper = asset.require('./scene_helper')
|
|
local propertyHelper = asset.require('./property_helper')
|
|
|
|
local Keybindings = {
|
|
{
|
|
Key = "F7",
|
|
Name = "Take Screenshot",
|
|
Command = "openspace.takeScreenshot()",
|
|
Documentation = "Saves the contents of the screen to a file in the ${SCREENSHOTS} directory.",
|
|
GuiPath = "/Rendering",
|
|
Local = true
|
|
}
|
|
}
|
|
|
|
asset.onInitialize(function()
|
|
Keys = sceneHelper.bindKeys(Keybindings)
|
|
end)
|
|
|
|
asset.onDeinitialize(function ()
|
|
sceneHelper.unbindKeys(Keybindings)
|
|
end)
|