Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 5, 2013, 8:46:18 PM (10 years ago)
Author:
jo
Message:

Making the countdown speed configurable.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/levelMichael/src/modules/overlays/hud/CountDown.cc

    r9870 r9872  
    3535        <OverlayGroup name="spacefightHUD" scale = "1, 1">
    3636          <CountDown
    37               position  = "0.49, 0.05"
    38               pickpoint = "0.0, 0.0"
    39               font      = "ShareTechMono"
    40               textsize  = 0.06
    41               colour    = "1.0, 1.0, 1.0, 1.0"
    42               align     = "right"                 
    43               counter   = "10.0"
    44               active    = "false"
     37              position    = "0.49, 0.05"
     38              pickpoint   = "0.0, 0.0"
     39              font        = "ShareTechMono"
     40              textsize    = 0.06
     41              colour      = "1.0, 1.0, 1.0, 1.0"
     42              align       = "right"                 
     43              counter     = "10.0"
     44              speedfactor = "1.0"
     45              active      = "false"
    4546           >
    4647            <events>
     
    8283        SUPER(CountDown, XMLPort, xmlelement, mode);
    8384        XMLPortParam(CountDown, "counter", setCounter, getCounter, xmlelement, mode).defaultValues(10);
     85        XMLPortParam(CountDown, "speedfactor", setSpeed, getSpeed, xmlelement, mode).defaultValues(1);
    8486    }
    8587   
     
    9799            else
    98100            {
    99                 this->counter_ -= dt;
     101                this->counter_ -= dt*speed_;
    100102                this->setCaption(multi_cast<std::string>((int)this->counter_)); //TODO: evtl. initialize with +0.5f
    101103            }
Note: See TracChangeset for help on using the changeset viewer.