Changeset 2907 for code/branches/questsystem5/src/orxonox/overlays/console
- Timestamp:
- Apr 8, 2009, 12:36:08 AM (16 years ago)
- Location:
- code/branches/questsystem5
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/questsystem5
- Property svn:mergeinfo changed
-
code/branches/questsystem5/src/orxonox/overlays/console/InGameConsole.cc
r2087 r2907 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" … … 172 173 { 173 174 // create the corresponding input state 174 inputState_ = InputManager::getInstance().createInputState<SimpleInputState>("console", 40);175 inputState_ = InputManager::getInstance().createInputState<SimpleInputState>("console", false, false, InputStatePriority::Console); 175 176 inputState_->setKeyHandler(Shell::getInstance().getInputBuffer()); 176 177 bHidesAllInputChanged(); … … 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 { … … 409 410 @brief Resizes the console elements. Call if window size changes. 410 411 */ 411 void InGameConsole::windowResized( int newWidth,int newHeight)412 void InGameConsole::windowResized(unsigned int newWidth, unsigned int newHeight) 412 413 { 413 414 this->windowW_ = newWidth; -
code/branches/questsystem5/src/orxonox/overlays/console/InGameConsole.h
r2087 r2907 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; } … … 81 81 void print(const std::string& text, int index, bool alwaysShift = false); 82 82 83 void windowResized( int newWidth,int newHeight);83 void windowResized(unsigned int newWidth, unsigned int newHeight); 84 84 85 85 // config value related
Note: See TracChangeset
for help on using the changeset viewer.