Changeset 2800 for code/branches/gui/src/orxonox
- Timestamp:
- Mar 19, 2009, 10:34:54 AM (16 years ago)
- Location:
- code/branches/gui/src/orxonox
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/gui/src/orxonox/gamestates/GSClient.cc
r2171 r2800 31 31 32 32 #include "core/input/InputManager.h" 33 #include "core/Clock.h" 33 34 #include "core/CommandLine.h" 34 35 #include "core/Core.h" … … 60 61 GSLevel::enter(this->getParent()->getViewport()); 61 62 62 client_->tick(0); 63 // TODO: Get Clock from Game or GameStateManager, but with 0 delta time 64 client_->update(Clock()); 63 65 } 64 66 … … 78 80 { 79 81 GSLevel::ticked(time); 80 client_-> tick(time.getDeltaTime());82 client_->update(time); 81 83 82 84 this->tickChild(time); -
code/branches/gui/src/orxonox/gamestates/GSDedicated.cc
r2662 r2800 30 30 #include "GSDedicated.h" 31 31 32 #include "core/Clock.h" 32 33 #include "core/CommandLine.h" 33 34 #include "core/Core.h" … … 83 84 timeSinceLastUpdate_ -= static_cast<unsigned int>(timeSinceLastUpdate_ / NETWORK_PERIOD) * NETWORK_PERIOD; 84 85 GSLevel::ticked(time); 85 server_-> tick(time.getDeltaTime());86 server_->update(time); 86 87 this->tickChild(time); 87 88 } -
code/branches/gui/src/orxonox/gamestates/GSGUI.cc
r2790 r2800 31 31 32 32 #include <OgreViewport.h> 33 #include "core/Clock.h" 33 34 #include "core/input/InputManager.h" 34 35 #include "core/input/SimpleInputState.h" … … 64 65 { 65 66 // tick CEGUI 66 guiManager_-> tick(time.getDeltaTime());67 guiManager_->update(time); 67 68 68 69 this->tickChild(time); -
code/branches/gui/src/orxonox/gamestates/GSGraphics.cc
r2759 r2800 233 233 float dt = time.getDeltaTime(); 234 234 235 this->inputManager_-> tick(dt);235 this->inputManager_->update(time); 236 236 // tick console 237 this->console_-> tick(dt);237 this->console_->update(time); 238 238 this->tickChild(time); 239 239 -
code/branches/gui/src/orxonox/gamestates/GSRoot.cc
r2799 r2800 134 134 uint64_t timeBeforeTick = time.getRealMicroseconds(); 135 135 136 Core::getInstance(). tick(time);136 Core::getInstance().update(time); 137 137 138 138 for (ObjectList<TimerBase>::iterator it = ObjectList<TimerBase>::begin(); it; ++it) -
code/branches/gui/src/orxonox/gamestates/GSServer.cc
r2171 r2800 73 73 { 74 74 GSLevel::ticked(time); 75 server_-> tick(time.getDeltaTime());75 server_->update(time); 76 76 this->tickChild(time); 77 77 } -
code/branches/gui/src/orxonox/gamestates/GSStandalone.cc
r2790 r2800 86 86 } 87 87 // tick CEGUI 88 guiManager_-> tick(time.getDeltaTime());88 guiManager_->update(time); 89 89 90 90 GSLevel::ticked(time); -
code/branches/gui/src/orxonox/gui/GUIManager.h
r2790 r2800 40 40 #include <CEGUIInputEvent.h> 41 41 #include <CEGUISystem.h> 42 #include "core/Clock.h" 42 43 #include "core/input/InputInterfaces.h" 43 44 … … 71 72 bool initialise(Ogre::RenderWindow* renderWindow); 72 73 void loadScene(const std::string& name); 73 void tick(float dt)74 void update(const Clock& time) 74 75 { 75 76 assert(guiSystem_); 76 guiSystem_->injectTimePulse( dt);77 guiSystem_->injectTimePulse(time.getDeltaTime()); 77 78 } 78 79 void showGUI(const std::string& name, Ogre::SceneManager* sceneManager);// bool showBackground); // tolua_export … … 108 109 { guiSystem_->injectMouseWheelChange(rel);} 109 110 110 void tickInput(float dt) { }111 void tickKey(float dt) { }112 void tickMouse(float dt) { }111 void updateInput(float dt) { } 112 void updateKey(float dt) { } 113 void updateMouse(float dt) { } 113 114 114 115 void loadScenes(); -
code/branches/gui/src/orxonox/overlays/console/InGameConsole.cc
r2087 r2800 42 42 #include "util/Convert.h" 43 43 #include "util/Debug.h" 44 #include "core/Clock.h" 44 45 #include "core/CoreIncludes.h" 45 46 #include "core/ConfigValueIncludes.h" … … 347 348 @brief Used to control the actual scrolling and the cursor. 348 349 */ 349 void InGameConsole:: tick(float dt)350 void InGameConsole::update(const Clock& time) 350 351 { 351 352 if (this->scroll_ != 0) … … 358 359 // enlarge oldTop a little bit so that this exponential function 359 360 // reaches 0 before infinite time has passed... 360 float deltaScroll = (oldTop - 0.01) * dt* this->scrollSpeed_;361 float deltaScroll = (oldTop - 0.01) * time.getDeltaTime() * this->scrollSpeed_; 361 362 if (oldTop - deltaScroll >= 0) 362 363 { … … 373 374 // scrolling up 374 375 // note: +0.01 for the same reason as when scrolling down 375 float deltaScroll = (1.2 * this->relativeHeight + 0.01 + oldTop) * dt* this->scrollSpeed_;376 float deltaScroll = (1.2 * this->relativeHeight + 0.01 + oldTop) * time.getDeltaTime() * this->scrollSpeed_; 376 377 if (oldTop - deltaScroll <= -1.2 * this->relativeHeight) 377 378 { … … 388 389 if (this->bActive_) 389 390 { 390 this->cursor_ += dt;391 this->cursor_ += time.getDeltaTime(); 391 392 if (this->cursor_ >= this->blinkTime) 392 393 { -
code/branches/gui/src/orxonox/overlays/console/InGameConsole.h
r2087 r2800 53 53 void setConfigValues(); 54 54 55 v irtual void tick(float dt);55 void update(const Clock& time); 56 56 57 57 static InGameConsole& getInstance() { assert(singletonRef_s); return *singletonRef_s; }
Note: See TracChangeset
for help on using the changeset viewer.