[Orxonox-commit 3953] r8627 - in code/branches/presentation: data/gui/scripts data/levels/templates src/libraries/core

landauf at orxonox.net landauf at orxonox.net
Fri May 27 21:54:04 CEST 2011


Author: landauf
Date: 2011-05-27 21:54:03 +0200 (Fri, 27 May 2011)
New Revision: 8627

Modified:
   code/branches/presentation/data/gui/scripts/SheetManager.lua
   code/branches/presentation/data/levels/templates/lodInformation.oxt
   code/branches/presentation/src/libraries/core/GUIManager.cc
   code/branches/presentation/src/libraries/core/GUIManager.h
Log:
merged revisions 8527-8530 from trunk to presentation branch:
 - 8527: build fix for mingw, d_ostream.open() is not defined for wchar
 - 8528: disable LOD for some of the debris meshes which cause a crash on old versions of Ogre
 - 8529: fixed lua error when pressing ESC ingame after closing the console
 - 8530: added config value to define the scroll speed in CEGUI listboxes. default 1 line.


Modified: code/branches/presentation/data/gui/scripts/SheetManager.lua
===================================================================
--- code/branches/presentation/data/gui/scripts/SheetManager.lua	2011-05-27 17:39:36 UTC (rev 8626)
+++ code/branches/presentation/data/gui/scripts/SheetManager.lua	2011-05-27 19:54:03 UTC (rev 8627)
@@ -215,11 +215,11 @@
 
 function keyESC()
     -- HUGE, very HUGE hacks!
-    
+
     -- If the InGameConsole is active, ignore the ESC command.
     if bInGameConsoleClosed == true then
         bInGameConsoleClosed = false
-        if activeMenuSheets[i] and activeMenuSheets[1].sheet.name == "MainMenu" then
+        if activeMenuSheets[1] and activeMenuSheets[1].sheet.name == "MainMenu" then
             return
         end
     end

Modified: code/branches/presentation/data/levels/templates/lodInformation.oxt
===================================================================
--- code/branches/presentation/data/levels/templates/lodInformation.oxt	2011-05-27 17:39:36 UTC (rev 8626)
+++ code/branches/presentation/data/levels/templates/lodInformation.oxt	2011-05-27 19:54:03 UTC (rev 8627)
@@ -14,6 +14,10 @@
       <MeshLodInformation mesh=SolarPanel.mesh enabled=false/>
       <MeshLodInformation mesh=CuboidLandingZone.mesh enabled=false/>
       <MeshLodInformation mesh=HydroHarvester.mesh enabled=false />
+
+      <!-- disable LOD for some debris meshes which caused a crash (fixed in Ogre 1.7.3) -->
+      <MeshLodInformation mesh=BodyDebris1.mesh enabled=false/>
+      <MeshLodInformation mesh=WingDebris2.mesh enabled=false/>
     </lodinformation>
   </Level>
 </Template>

Modified: code/branches/presentation/src/libraries/core/GUIManager.cc
===================================================================
--- code/branches/presentation/src/libraries/core/GUIManager.cc	2011-05-27 17:39:36 UTC (rev 8626)
+++ code/branches/presentation/src/libraries/core/GUIManager.cc	2011-05-27 19:54:03 UTC (rev 8627)
@@ -64,7 +64,7 @@
 #  include <OgreSceneManager.h>
 #endif
 
-#ifdef ORXONOX_PLATFORM_WINDOWS
+#if defined(ORXONOX_PLATFORM_WINDOWS) && !defined(ORXONOX_COMPILER_MINGW)
 #  include <windows.h>
 #endif
 
@@ -72,6 +72,7 @@
 #include "util/Convert.h"
 #include "util/Debug.h"
 #include "util/Exception.h"
+#include "util/Math.h"
 #include "util/OrxAssert.h"
 #include "ConfigValueIncludes.h"
 #include "Core.h"
@@ -120,7 +121,7 @@
             if (d_ostream.is_open())
                 d_ostream.close();
 
-#ifdef ORXONOX_PLATFORM_WINDOWS
+#if defined(ORXONOX_PLATFORM_WINDOWS) && !defined(ORXONOX_COMPILER_MINGW)
             // filename.c_str() is UTF-8 encoded, but Windows expects characters
             // according to the current codepage or UTF-16 (wchar)
             d_ostream.open(utf8ToUtf16(filename.c_str()).c_str(), std::ios_base::out | (append ? std::ios_base::app : std::ios_base::trunc));
@@ -155,7 +156,7 @@
             }
         }
 
-#ifdef ORXONOX_PLATFORM_WINDOWS
+#if defined(ORXONOX_PLATFORM_WINDOWS) && !defined(ORXONOX_COMPILER_MINGW)
         /// Converts a UTF-8 character sequence to Windows UTF-16
         static std::wstring utf8ToUtf16(const std::string& utf8text)
         {
@@ -354,6 +355,7 @@
     void GUIManager::setConfigValues(void)
     {
         SetConfigValue(guiScheme_, GUIManager::defaultScheme_) .description("Changes the current GUI scheme.") .callback(this, &GUIManager::changedGUIScheme);
+        SetConfigValue(numScrollLines_, 1).description("How many lines to scroll in a list if the scroll wheel is used");
     }
 
     void GUIManager::changedGUIScheme(void)
@@ -592,7 +594,7 @@
 
     void GUIManager::mouseScrolled(int abs, int rel)
     {
-        this->protectedCall(boost::bind(&CEGUI::System::injectMouseWheelChange, _1, (float)rel));
+        this->protectedCall(boost::bind(&CEGUI::System::injectMouseWheelChange, _1, (float)sgn(rel) * this->numScrollLines_));
     }
 
     /**

Modified: code/branches/presentation/src/libraries/core/GUIManager.h
===================================================================
--- code/branches/presentation/src/libraries/core/GUIManager.h	2011-05-27 17:39:36 UTC (rev 8626)
+++ code/branches/presentation/src/libraries/core/GUIManager.h	2011-05-27 19:54:03 UTC (rev 8627)
@@ -185,6 +185,8 @@
         static const std::string defaultScheme_;
         std::string guiScheme_;
 
+        int numScrollLines_; ///< How many lines to scroll in a list if the scroll wheel is used
+
     }; // tolua_export
 } // tolua_export
 




More information about the Orxonox-commit mailing list