- Timestamp:
- Mar 5, 2011, 7:10:31 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/usability/data/gui/scripts/GraphicsMenu.lua
r8019 r8021 323 323 local heightEditbox = winMgr:getWindow("orxonox/Display/Resolution/EditboxHeight") 324 324 325 -- start revert timer 326 P.oldWidth = orxonox.GraphicsManager:getInstance():getWindowWidth() 327 P.oldHeight = orxonox.GraphicsManager:getInstance():getWindowHeight() 328 P.oldFullscreen = orxonox.GraphicsManager:getInstance():isFullScreen() 329 330 P.revertTimerHandle = orxonox.CommandExecutor:query("delay 10 \"hideGUI DecisionPopup; GraphicsManager setScreenResolution " .. P.oldWidth .. " " .. P.oldHeight .. " " .. tostring(P.oldFullscreen) .. "\"") 331 332 -- change settings 325 333 orxonox.CommandExecutor:execute("GraphicsManager setScreenResolution " .. widthEditbox:getText() .. " " .. heightEditbox:getText() .. " " .. checkedFullscreen) 326 334 327 335 P.updateApplyButton() 336 337 -- prompt for confirmation 338 openDecisionPopup("Do you want to keep these settings? (Settings will be reverted in 10 seconds if not accepted)", GraphicsMenu.callback_ApplyDecisionPopup) 339 end 340 341 function P.callback_ApplyDecisionPopup(pressedOK) 342 orxonox.CommandExecutor:execute("killdelay " .. P.revertTimerHandle) 343 344 if not pressedOK then 345 orxonox.CommandExecutor:execute("GraphicsManager setScreenResolution " .. P.oldWidth .. " " .. P.oldHeight .. " " .. tostring(P.oldFullscreen)) 346 P:onShow() 347 end 328 348 end 329 349
Note: See TracChangeset
for help on using the changeset viewer.