Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8510 in orxonox.OLD


Ignore:
Timestamp:
Jun 16, 2006, 12:31:06 AM (18 years ago)
Author:
bensch
Message:

gui: notifier: yeah. fading works

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/gui/src/lib/gui/gl/specials/glgui_notifier.cc

    r8509 r8510  
    6565      dl.text = this->hiddenText.top();
    6666
     67      dl.text->setBlending(1.0f);
    6768      dl.text->setText(message);
    6869      this->hiddenText.pop();
     
    127128  void GLGuiNotifier::tick(float dt)
    128129  {
     130    std::list<DisplayLine>::iterator line;
     131    for (line = this->displayLines.begin() ; line != this->displayLines.end(); ++line )
     132    {
     133      (*line).age+=dt;
     134      if ((*line).age > 3.0f)
     135      {
     136        (*line).text->setBlending(4.0 - (*line).age);
     137        if ((*line).age > 4.0f)
     138        {
     139          std::list<DisplayLine>::iterator tmp = line;
     140          ++line;
     141
     142          this->hiddenText.push((*tmp).text);
     143          this->displayLines.erase(tmp);
     144        }
     145      }
     146    }
    129147  }
    130148
Note: See TracChangeset for help on using the changeset viewer.