Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 19, 2009, 10:34:54 AM (15 years ago)
Author:
rgrieder
Message:

Renaming "tick" to "update" for all those classes not inheriting from Tickable to avoid confusions.
GameState::ticked still exists, but that's going to change anyway.

Location:
code/branches/gui/src/orxonox/overlays/console
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/gui/src/orxonox/overlays/console/InGameConsole.cc

    r2087 r2800  
    4242#include "util/Convert.h"
    4343#include "util/Debug.h"
     44#include "core/Clock.h"
    4445#include "core/CoreIncludes.h"
    4546#include "core/ConfigValueIncludes.h"
     
    347348        @brief Used to control the actual scrolling and the cursor.
    348349    */
    349     void InGameConsole::tick(float dt)
     350    void InGameConsole::update(const Clock& time)
    350351    {
    351352        if (this->scroll_ != 0)
     
    358359                // enlarge oldTop a little bit so that this exponential function
    359360                // 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_;
    361362                if (oldTop - deltaScroll >= 0)
    362363                {
     
    373374                // scrolling up
    374375                // 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_;
    376377                if (oldTop - deltaScroll <= -1.2 * this->relativeHeight)
    377378                {
     
    388389        if (this->bActive_)
    389390        {
    390             this->cursor_ += dt;
     391            this->cursor_ += time.getDeltaTime();
    391392            if (this->cursor_ >= this->blinkTime)
    392393            {
  • code/branches/gui/src/orxonox/overlays/console/InGameConsole.h

    r2087 r2800  
    5353        void setConfigValues();
    5454
    55         virtual void tick(float dt);
     55        void update(const Clock& time);
    5656
    5757        static InGameConsole& getInstance() { assert(singletonRef_s); return *singletonRef_s; }
Note: See TracChangeset for help on using the changeset viewer.