Changeset 2908 for code/branches/questsystem5/src/orxonox/overlays/console
- Timestamp:
- Apr 8, 2009, 12:58:47 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
r2907 r2908 42 42 #include "util/Convert.h" 43 43 #include "util/Debug.h" 44 #include "core/Clock.h"45 44 #include "core/CoreIncludes.h" 46 45 #include "core/ConfigValueIncludes.h" … … 173 172 { 174 173 // create the corresponding input state 175 inputState_ = InputManager::getInstance().createInputState<SimpleInputState>("console", false, false, InputStatePriority::Console);174 inputState_ = InputManager::getInstance().createInputState<SimpleInputState>("console", 40); 176 175 inputState_->setKeyHandler(Shell::getInstance().getInputBuffer()); 177 176 bHidesAllInputChanged(); … … 348 347 @brief Used to control the actual scrolling and the cursor. 349 348 */ 350 void InGameConsole:: update(const Clock& time)349 void InGameConsole::tick(float dt) 351 350 { 352 351 if (this->scroll_ != 0) … … 359 358 // enlarge oldTop a little bit so that this exponential function 360 359 // reaches 0 before infinite time has passed... 361 float deltaScroll = (oldTop - 0.01) * time.getDeltaTime()* this->scrollSpeed_;360 float deltaScroll = (oldTop - 0.01) * dt * this->scrollSpeed_; 362 361 if (oldTop - deltaScroll >= 0) 363 362 { … … 374 373 // scrolling up 375 374 // note: +0.01 for the same reason as when scrolling down 376 float deltaScroll = (1.2 * this->relativeHeight + 0.01 + oldTop) * time.getDeltaTime()* this->scrollSpeed_;375 float deltaScroll = (1.2 * this->relativeHeight + 0.01 + oldTop) * dt * this->scrollSpeed_; 377 376 if (oldTop - deltaScroll <= -1.2 * this->relativeHeight) 378 377 { … … 389 388 if (this->bActive_) 390 389 { 391 this->cursor_ += time.getDeltaTime();390 this->cursor_ += dt; 392 391 if (this->cursor_ >= this->blinkTime) 393 392 { … … 410 409 @brief Resizes the console elements. Call if window size changes. 411 410 */ 412 void InGameConsole::windowResized( unsigned int newWidth, unsignedint newHeight)411 void InGameConsole::windowResized(int newWidth, int newHeight) 413 412 { 414 413 this->windowW_ = newWidth; -
code/branches/questsystem5/src/orxonox/overlays/console/InGameConsole.h
r2907 r2908 53 53 void setConfigValues(); 54 54 55 v oid update(const Clock& time);55 virtual void tick(float dt); 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( unsigned int newWidth, unsignedint newHeight);83 void windowResized(int newWidth, int newHeight); 84 84 85 85 // config value related
Note: See TracChangeset
for help on using the changeset viewer.