[Orxonox-commit 3807] r8485 - code/trunk/data/gui/scripts

dafrick at orxonox.net dafrick at orxonox.net
Sat May 14 17:44:10 CEST 2011


Author: dafrick
Date: 2011-05-14 17:44:09 +0200 (Sat, 14 May 2011)
New Revision: 8485

Modified:
   code/trunk/data/gui/scripts/SheetManager.lua
Log:
Now it should work in all cases.


Modified: code/trunk/data/gui/scripts/SheetManager.lua
===================================================================
--- code/trunk/data/gui/scripts/SheetManager.lua	2011-05-14 15:30:26 UTC (rev 8484)
+++ code/trunk/data/gui/scripts/SheetManager.lua	2011-05-14 15:44:09 UTC (rev 8485)
@@ -215,18 +215,18 @@
 
 function keyESC()
     -- HUGE, very HUGE hacks!
-
-    -- Count the number of sheets that don't need input till the first that does.
-    local counter = noInputSheetIndex()
     
     -- If the InGameConsole is active, ignore the ESC command.
     if bInGameConsoleClosed == true then
         bInGameConsoleClosed = false
-        if counter > 0 then
+        if activeMenuSheets[1].sheet.name == "MainMenu" then
             return
         end
     end
 
+    -- Count the number of sheets that don't need input till the first that does.
+    local counter = noInputSheetIndex()
+
     -- If the first sheet that needs input is the MainMenu.
     if noInputSheetCounter() == 1 and activeMenuSheets[counter].sheet.name == "MainMenu" then
         orxonox.execute("exit")




More information about the Orxonox-commit mailing list