Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1141


Ignore:
Timestamp:
Apr 22, 2008, 10:20:40 PM (16 years ago)
Author:
FelixSchulthess
Message:

created ExecptionHandler for Felix::FridgeUnderrunException

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

Legend:

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

    r1139 r1141  
    8989        // for the beginning, don't scroll
    9090        scroll = 0;
     91        scrollTimer = 0;
    9192        cursor = 0;
    9293        // create overlay and elements
     
    151152    */
    152153    void InGameConsole::tick(float dt){
    153         float top = consoleOverlayContainer->getTop();
    154         if(scroll!=0){
    155             top = top + 0.02*scroll;
    156             consoleOverlayContainer->setTop(top);
    157         }
    158         if(top <= -1.2*REL_HEIGHT){
    159             // window has completely scrolled up
    160             scroll = 0;
    161             consoleOverlay->hide();
    162             active = false;
    163         }
    164         if(top >= 0){
    165             // window has completely scrolled down
    166             scroll = 0;
    167             consoleOverlayContainer->setTop(0);
    168             active = true;
     154        scrollTimer += dt;
     155        if(scrollTimer >= 0.01){
     156            float top = consoleOverlayContainer->getTop();
     157            scrollTimer = 0;
     158            if(scroll!=0){
     159                // scroll
     160                top = top + 0.02*scroll;
     161                consoleOverlayContainer->setTop(top);
     162            }
     163            if(top <= -1.2*REL_HEIGHT){
     164                // window has completely scrolled up
     165                scroll = 0;
     166                consoleOverlay->hide();
     167                active = false;
     168            }
     169            if(top >= 0){
     170                // window has completely scrolled down
     171                scroll = 0;
     172                consoleOverlayContainer->setTop(0);
     173                active = true;
     174            }
    169175        }
    170176
  • code/branches/console/src/orxonox/console/InGameConsole.h

    r1139 r1141  
    7474            int windowH;
    7575            int scroll;
     76            float scrollTimer;
    7677            float cursor;
    7778            bool active;
Note: See TracChangeset for help on using the changeset viewer.