Changeset 8040 for code/branches
- Timestamp:
- Mar 7, 2011, 9:57:13 AM (14 years ago)
- Location:
- code/branches/usability
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/usability/data/gui/scripts/HostMenu.lua
r7928 r8040 28 28 29 29 function P.onShow() 30 if P.showAll ~= orxonox.GUIManager:inDevMode() then 31 local window = winMgr:getWindow("orxonox/SingleplayerShowAllCheckbox") 32 local button = tolua.cast(window,"CEGUI::Checkbox") 33 P.showAll = not P.showAll 34 button:setSelected(P.showAll) 35 P.createLevelList() 36 end 37 end 38 39 function P.onShow() 40 if P.showAll ~= orxonox.GUIManager:inDevMode() then 41 local window = winMgr:getWindow("orxonox/SingleplayerShowAllCheckbox") 42 local button = tolua.cast(window,"CEGUI::Checkbox") 43 P.showAll = not P.showAll 44 button:setSelected(P.showAll) 45 end 46 30 47 if P.multiplayerMode == "startServer" then 31 48 local window = winMgr:getWindow("orxonox/HostMenuHostButton") -
code/branches/usability/data/gui/scripts/MiscConfigMenu.lua
r7928 r8040 35 35 table.insert(P.commandList, "HumanPlayer nick_") 36 36 table.insert(P.commandList, "ChatOverlay displayTime_") 37 table.insert(P.commandList, "Core bDevMode_") 37 38 38 39 P.nameList = {} … … 54 55 table.insert(P.nameList, "Playername") 55 56 table.insert(P.nameList, "Chat: display time") 57 table.insert(P.nameList, "Developer's Mode") 56 58 57 59 P.linesList = {} -
code/branches/usability/data/gui/scripts/SingleplayerMenu.lua
r7928 r8040 25 25 end 26 26 27 function P.onShow() 28 if P.showAll ~= orxonox.GUIManager:inDevMode() then 29 local window = winMgr:getWindow("orxonox/SingleplayerShowAllCheckbox") 30 local button = tolua.cast(window,"CEGUI::Checkbox") 31 P.showAll = not P.showAll 32 button:setSelected(P.showAll) 33 P.createLevelList() 34 end 35 end 36 27 37 function P.createLevelList() 28 38 P.levelList = {} … … 44 54 index = index + 1 45 55 end 46 --TODO: Reintroduce sorting, if needed. At the moment it's sorted by filename.47 --table.sort(levelList)48 56 for k,v in pairs(P.levelList) do 49 57 local item = CEGUI.createListboxTextItem(v:getName()) -
code/branches/usability/src/libraries/core/Core.cc
r7872 r8040 208 208 #ifdef ORXONOX_RELEASE 209 209 const unsigned int defaultLevelLogFile = 3; 210 SetConfigValue(bDevMode_, false) 211 .description("Developer mode. If not set, hides some things from the user to not confuse him."); 210 212 #else 211 213 const unsigned int defaultLevelLogFile = 4; 214 SetConfigValue(bDevMode_, true) 215 .description("Developer mode. If not set, hides some things from the user to not confuse him."); 212 216 #endif 213 217 SetConfigValueExternal(softDebugLevelLogFile_, "OutputHandler", "softDebugLevelLogFile", defaultLevelLogFile) -
code/branches/usability/src/libraries/core/Core.h
r7870 r8040 91 91 { return this->ogreConfigTimestamp_; } 92 92 93 inline bool inDevMode(void) const 94 { return this->bDevMode_; } 95 93 96 private: 94 97 Core(const Core&); //!< Don't use (undefined symbol) … … 130 133 long long lastLevelTimestamp_; ///< Timestamp when the last level was started 131 134 long long ogreConfigTimestamp_; ///< Timestamp wehen the ogre config level was modified 135 bool bDevMode_; //!< Developers bit. If set to false, some options are not available as to not confuse the normal user. 132 136 133 137 static Core* singletonPtr_s; -
code/branches/usability/src/libraries/core/GUIManager.h
r8035 r8040 49 49 #include "util/Singleton.h" 50 50 #include "input/InputHandler.h" 51 #include "Core.h" 51 52 #include "OrxonoxClass.h" 52 53 #include "WindowEventListener.h" … … 96 97 static void navigateGUI(const std::string& mode); 97 98 void guisActiveChanged(bool active); // tolua_export 99 100 /** 101 @brief Helper method to get the developer's mode without having to export Core.h. 102 @see Core::inDevMode 103 */ 104 static bool inDevMode(void) { return Core::getInstance().inDevMode(); } // tolua_export 98 105 99 106 //! Creates a new InputState to be used with a GUI Sheet -
code/branches/usability/src/orxonox/gametypes/Gametype.cc
r7801 r8040 30 30 31 31 #include "util/Math.h" 32 #include "core/Core.h" 32 33 #include "core/CoreIncludes.h" 33 34 #include "core/ConfigValueIncludes.h" … … 386 387 if (allplayersready && hashumanplayers) 387 388 { 388 this->gtinfo_->startCountdown_ = this->initialStartCountdown_; 389 // If in developer's mode, there is no start countdown. 390 if(Core::getInstance().inDevMode()) 391 this->gtinfo_->startCountdown_ = 0; 392 else 393 this->gtinfo_->startCountdown_ = this->initialStartCountdown_; 389 394 this->gtinfo_->bStartCountdownRunning_ = true; 390 395 }
Note: See TracChangeset
for help on using the changeset viewer.