Changeset 1567
- Timestamp:
- Jun 8, 2008, 5:55:05 PM (17 years ago)
- Location:
- code/trunk
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/core/input/KeyBinder.cc
r1543 r1567 234 234 void KeyBinder::setConfigValues() 235 235 { 236 SetConfigValueGeneric(KeyBinder, analogThreshold_, 0.0 1f) .description("Threshold for analog axes until which the state is 0.");236 SetConfigValueGeneric(KeyBinder, analogThreshold_, 0.05f) .description("Threshold for analog axes until which the state is 0."); 237 237 SetConfigValueGeneric(KeyBinder, mouseSensitivity_, 1.0f) .description("Mouse sensitivity."); 238 238 SetConfigValueGeneric(KeyBinder, bDeriveMouseInput_, false).description("Whether or not to derive moues movement for the absolute value."); 239 SetConfigValueGeneric(KeyBinder, derivePeriod_, 0. 5f).description("Accuracy of the mouse input deriver. The higher the more precise, but laggier.");239 SetConfigValueGeneric(KeyBinder, derivePeriod_, 0.05f).description("Accuracy of the mouse input deriver. The higher the more precise, but laggier."); 240 240 SetConfigValueGeneric(KeyBinder, mouseSensitivityDerived_, 1.0f).description("Mouse sensitivity if mouse input is derived."); 241 241 SetConfigValueGeneric(KeyBinder, bClipMouse_, true).description("Whether or not to clip absolute value of mouse in non derive mode."); -
code/trunk/src/orxonox/Orxonox.cc
r1563 r1567 116 116 { 117 117 // keep in mind: the order of deletion is very important! 118 // if (this->orxonoxHUD_) 119 // delete this->orxonoxHUD_; 118 this->orxonoxHUD_->destroy(); 120 119 Loader::close(); 121 120 InputManager::destroy(); … … 331 330 COUT(3) << "Orxonox: Loading HUD..." << std::endl; 332 331 orxonoxHUD_ = &HUD::getSingleton(); 332 orxonoxHUD_->initialise(); 333 333 return true; 334 334 } -
code/trunk/src/orxonox/hud/HUD.cc
r1564 r1567 46 46 #include "RadarOverlayElement.h" 47 47 #include "Navigation.h" 48 #include "OverlayElementFactories.h"49 48 50 49 namespace orxonox … … 59 58 HUD::HUD() 60 59 { 60 orxonoxHUD_ = 0; 61 container_ = 0; 62 fpsText_ = 0; 63 rTRText_ = 0; 64 energyBar_ = 0; 65 speedoBar_ = 0; 66 radar_ = 0; 67 nav_ = 0; 68 bool showFPS_ = true; 69 bool showRenderTime_ = true; 70 } 71 72 HUD::~HUD() 73 { 74 this->destroy(); 75 } 76 77 void HUD::initialise() 78 { 61 79 showFPS_ = true; 62 80 showRenderTime_ = true; 63 81 64 82 // create Factories 65 barOverlayElementFactory_ = new BarOverlayElementFactory(); 66 Ogre::OverlayManager::getSingleton().addOverlayElementFactory(barOverlayElementFactory_); 67 radarOverlayElementFactory_ = new RadarOverlayElementFactory(); 68 Ogre::OverlayManager::getSingleton().addOverlayElementFactory(radarOverlayElementFactory_); 83 Ogre::OverlayManager::getSingleton().addOverlayElementFactory(&barOverlayElementFactory_); 84 Ogre::OverlayManager::getSingleton().addOverlayElementFactory(&radarOverlayElementFactory_); 69 85 70 86 orxonoxHUD_ = Ogre::OverlayManager::getSingleton().create("Orxonox/HUD"); … … 139 155 } 140 156 141 HUD::~HUD() 142 { 143 Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->container_); 144 Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->fpsText_); 145 Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->rTRText_); 146 Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->energyBar_); 147 Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->speedoBar_); 148 Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->radar_); 149 150 delete this->nav_; 151 delete this->barOverlayElementFactory_; 152 delete this->radarOverlayElementFactory_; 157 void HUD::destroy() 158 { 159 if (this->container_) 160 Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->container_); 161 this->container_ = 0; 162 if (this->fpsText_) 163 Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->fpsText_); 164 this->fpsText_ = 0; 165 if (this->rTRText_) 166 Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->rTRText_); 167 this->rTRText_ = 0; 168 if (this->energyBar_) 169 Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->energyBar_); 170 this->energyBar_ = 0; 171 if (this->speedoBar_) 172 Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->speedoBar_); 173 this->speedoBar_ = 0; 174 if (this->radar_) 175 Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->radar_); 176 this->radar_ = 0; 177 if (this->orxonoxHUD_) 178 Ogre::OverlayManager::getSingleton().destroy(this->orxonoxHUD_); 179 this->orxonoxHUD_ = 0; 180 181 if (this->nav_) 182 delete this->nav_; 183 this->nav_ = 0; 153 184 } 154 185 -
code/trunk/src/orxonox/hud/HUD.h
r1564 r1567 37 37 #include "objects/Tickable.h" 38 38 #include "util/Math.h" 39 #include "OverlayElementFactories.h" 39 40 40 41 namespace orxonox … … 43 44 { 44 45 public: 45 static HUD& getSingleton(); 46 void initialise(); 47 void destroy(); 48 46 49 virtual void tick(float); 47 50 … … 54 57 inline std::list<RadarObject*>& getRadarObjects() 55 58 { return this->roSet_; } 59 60 static HUD& getSingleton(); 56 61 57 62 static void setEnergy(float value); … … 66 71 ~HUD(); 67 72 68 static HUD* instance_s; 73 std::list<RadarObject*> roSet_; 74 BarOverlayElementFactory barOverlayElementFactory_; 75 RadarOverlayElementFactory radarOverlayElementFactory_; 69 76 70 std::list<RadarObject*> roSet_;71 77 Ogre::Overlay* orxonoxHUD_; 72 78 Ogre::OverlayContainer* container_; 73 BarOverlayElementFactory* barOverlayElementFactory_;74 RadarOverlayElementFactory* radarOverlayElementFactory_;75 79 Ogre::TextAreaOverlayElement* fpsText_; 76 80 Ogre::TextAreaOverlayElement* rTRText_; -
code/trunk/visual_studio/base_properties_release.vsprops
r1502 r1567 9 9 Name="VCCLCompilerTool" 10 10 Optimization="2" 11 WholeProgramOptimization="false"12 11 PreprocessorDefinitions="NDEBUG" 13 12 RuntimeLibrary="2" -
code/trunk/visual_studio/vc8/core.vcproj
r1543 r1567 82 82 InheritedPropertySheets="$(SolutionDir)base_properties_release.vsprops;..\core_properties.vsprops" 83 83 CharacterSet="1" 84 WholeProgramOptimization=" 1"84 WholeProgramOptimization="0" 85 85 > 86 86 <Tool -
code/trunk/visual_studio/vc8/cpptcl.vcproj
r1223 r1567 73 73 InheritedPropertySheets="$(SolutionDir)base_properties_release.vsprops;..\cpptcl_properties.vsprops" 74 74 CharacterSet="1" 75 WholeProgramOptimization=" 1"75 WholeProgramOptimization="0" 76 76 > 77 77 <Tool -
code/trunk/visual_studio/vc8/network.vcproj
r1316 r1567 73 73 InheritedPropertySheets="$(SolutionDir)base_properties_release.vsprops;..\network_properties.vsprops" 74 74 CharacterSet="1" 75 WholeProgramOptimization=" 1"75 WholeProgramOptimization="0" 76 76 > 77 77 <Tool -
code/trunk/visual_studio/vc8/ois.vcproj
r1293 r1567 24 24 InheritedPropertySheets="..\directory_properties.vsprops" 25 25 CharacterSet="2" 26 WholeProgramOptimization="1" 26 27 > 27 28 <Tool … … 76 77 EnableCOMDATFolding="2" 77 78 OptimizeForWindows98="1" 78 LinkTimeCodeGeneration="1"79 79 ImportLibrary="$(RootDir)lib\$(TargetName).lib" 80 80 /> -
code/trunk/visual_studio/vc8/orxonox.vcproj
r1561 r1567 84 84 InheritedPropertySheets="$(SolutionDir)base_properties_release.vsprops;..\orxonox_properties.vsprops" 85 85 CharacterSet="1" 86 WholeProgramOptimization=" 1"86 WholeProgramOptimization="0" 87 87 > 88 88 <Tool -
code/trunk/visual_studio/vc8/tixml.vcproj
r1209 r1567 73 73 InheritedPropertySheets="$(SolutionDir)base_properties_release.vsprops;..\tixml_properties.vsprops" 74 74 CharacterSet="1" 75 WholeProgramOptimization=" 1"75 WholeProgramOptimization="0" 76 76 > 77 77 <Tool -
code/trunk/visual_studio/vc8/tolua.vcproj
r1223 r1567 73 73 InheritedPropertySheets="$(SolutionDir)base_properties_release.vsprops;..\tolua_properties.vsprops" 74 74 CharacterSet="1" 75 WholeProgramOptimization=" 1"75 WholeProgramOptimization="0" 76 76 > 77 77 <Tool
Note: See TracChangeset
for help on using the changeset viewer.