Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8530 in orxonox.OLD for branches/gui/src


Ignore:
Timestamp:
Jun 16, 2006, 3:09:42 PM (18 years ago)
Author:
bensch
Message:

more configurable

Location:
branches/gui/src/lib/gui/gl/specials
Files:
2 edited

Legend:

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

    r8522 r8530  
    3434    this->lineSpacing = 0;
    3535    this->linesProcessed = 0;
     36    this->_fadeAge = 3.0;
     37    this->setHideAge(4.0);
    3638
    3739    this->setDisplayLineCount(10);
     
    111113  }
    112114
     115  void GLGuiNotifier::setFadeAge(float fadeAge)
     116  {
     117    this->_fadeAge = fadeAge;
     118    this->_transformAge = hideAge() - this->fadeAge();
     119  }
     120
     121  void GLGuiNotifier::setHideAge(float hideAge)
     122  {
     123    this->_hideAge = hideAge;
     124    this->_transformAge = this->hideAge() - fadeAge();
     125  }
     126
    113127
    114128  /**
     
    154168    {
    155169      (*line).age+=dt;
    156       if ((*line).age > 3.0f)
     170      if ((*line).age > this->fadeAge())
    157171      {
    158         (*line).text->setBlending(4.0 - (*line).age);
    159         if ((*line).age > 4.0f)
     172        (*line).text->setBlending((hideAge() - (*line).age)/_transformAge);
     173        if ((*line).age > hideAge())
    160174        {
    161175          std::list<DisplayLine>::iterator tmp = line;
  • branches/gui/src/lib/gui/gl/specials/glgui_notifier.h

    r8518 r8530  
    3030    void pushNotifyMessage(const std::string& message);
    3131
    32     // BUFFERS
     32    /// Setup
    3333    void setDisplayLineCount(unsigned int count);
     34    void setFadeAge(float fadeAge);
     35    void setHideAge(float hideAge);
     36
     37    /** @returns the beginning of the Hiding process */
     38    inline float fadeAge() const { return _fadeAge; };
     39    /** @returns at what age elements should be fully hidden */
     40    inline float hideAge() const { return _hideAge; };
    3441
    3542    void clear();
     
    5461
    5562  private:
     63    //! structure that defines a Displayed line.
    5664    typedef struct
    5765    {
     
    5967      MultiLineText*    text;
    6068
    61     }
    62     DisplayLine;
     69    } DisplayLine;
     70
     71
     72    float                       _fadeAge;
     73    float                       _hideAge;
     74    float                       _transformAge;
    6375
    6476    unsigned int                lineSpacing;            //!< The Spacing between lines.
     
    7284
    7385    unsigned long               linesProcessed;         //!< How many Lines have been processed so far.
    74     std::list<std::string>      inputBuffer;            //!<
     86    std::list<std::string>      inputBuffer;            //!< The input buffer for lines that were not yet printet out, because there is too much input.
    7587
    7688  };
Note: See TracChangeset for help on using the changeset viewer.