Move the rendertime into a property and remove the toggleFrametimeType

Make OptionProperty work in Radio mode
Rename DROPDOWN and RADIO to Dropdown and Radio
This commit is contained in:
Alexander Bock
2016-11-06 22:15:52 +01:00
parent c469be26c3
commit 572257d3b0
9 changed files with 45 additions and 77 deletions

View File

@@ -23,9 +23,6 @@ helper.setCommonKeys = function()
"Toogles performance measurements that shows rendering time informations"
)
openspace.bindKeyLocal("t", "openspace.toggleFrametimeType(1)")
openspace.bindKeyLocal("Shift+t", "openspace.toggleFrametimeType(0)")
openspace.bindKeyLocal("ESC", "openspace.toggleShutdown()")
openspace.bindKeyLocal("PRINT_SCREEN", "openspace.takeScreenshot()")
@@ -73,7 +70,7 @@ end
helper.property.increment = function(property, value)
local v = value or 1
local escaped_property = "'" .. property .. "'"
return "openspace.setPropertyValue(" .. escaped_property .. ", openspace.getPropertyValue(" .. escaped_property .. ") + " .. v .. ")"
return "openspace.setPropertyValue(" .. escaped_property .. ", openspace.getPropertyValue(" .. escaped_property .. ") + " .. v .. ");"
end
-- Function that returns the string that decrements the 'property' by the 'value'
@@ -81,6 +78,12 @@ helper.property.decrement = function(property, value)
return helper.property.increment(property, -value)
end
-- Function that sets a property to a specify value
helper.property.set = function(property, value)
local escaped_property = "'" .. property .. "'"
return "openspace.setPropertyValue(" .. escaped_property .. ", " .. value .. ");"
end
-- Function that returns the string that enables/disables the renderable 'renderable'
helper.renderable.toggle = function(renderable)
return helper.property.invert(renderable .. ".renderable.enabled")