[Orxonox-commit 3338] r8026 - code/branches/usability/data/gui/scripts
landauf at orxonox.net
landauf at orxonox.net
Sat Mar 5 23:56:21 CET 2011
Author: landauf
Date: 2011-03-05 23:56:20 +0100 (Sat, 05 Mar 2011)
New Revision: 8026
Modified:
code/branches/usability/data/gui/scripts/GraphicsMenu.lua
Log:
don't show the ogre config dialog again if the new resolution was accepted by the user or if the resolution was changed back to the old settings
Modified: code/branches/usability/data/gui/scripts/GraphicsMenu.lua
===================================================================
--- code/branches/usability/data/gui/scripts/GraphicsMenu.lua 2011-03-05 22:31:20 UTC (rev 8025)
+++ code/branches/usability/data/gui/scripts/GraphicsMenu.lua 2011-03-05 22:56:20 UTC (rev 8026)
@@ -338,7 +338,7 @@
P.oldHeight = orxonox.GraphicsManager:getInstance():getWindowHeight()
P.oldFullscreen = orxonox.GraphicsManager:getInstance():isFullScreen()
- P.revertTimerHandle = orxonox.CommandExecutor:query("delayreal 10 \"hideGUI DecisionPopup; GraphicsManager setScreenResolution " .. P.oldWidth .. " " .. P.oldHeight .. " " .. tostring(P.oldFullscreen) .. "\"")
+ P.revertTimerHandle = orxonox.CommandExecutor:query("delayreal 10 {hideGUI DecisionPopup; GraphicsManager setScreenResolution " .. P.oldWidth .. " " .. P.oldHeight .. " " .. tostring(P.oldFullscreen) .. "; config Core lastLevelTimestamp_ [expr [getConfig Core ogreConfigTimestamp_] + 1]}")
-- change settings
orxonox.CommandExecutor:execute("GraphicsManager setScreenResolution " .. P.newWidth .. " " .. P.newHeight .. " " .. checkedFullscreen)
@@ -359,6 +359,9 @@
orxonox.CommandExecutor:execute("GraphicsManager setScreenResolution " .. P.oldWidth .. " " .. P.oldHeight .. " " .. tostring(P.oldFullscreen))
P:onShow()
end
+
+ -- update timestamp to avoid showing the ogre config dialog again after the user accepted or reverted the resolution
+ orxonox.CommandExecutor:execute("config Core lastLevelTimestamp_ [expr [getConfig Core ogreConfigTimestamp_] + 1]")
end
function P.callback_Ok_Clicked(e)
More information about the Orxonox-commit
mailing list