Changeset 8530 in orxonox.OLD for branches/gui/src
- Timestamp:
- Jun 16, 2006, 3:09:42 PM (18 years ago)
- 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 34 34 this->lineSpacing = 0; 35 35 this->linesProcessed = 0; 36 this->_fadeAge = 3.0; 37 this->setHideAge(4.0); 36 38 37 39 this->setDisplayLineCount(10); … … 111 113 } 112 114 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 113 127 114 128 /** … … 154 168 { 155 169 (*line).age+=dt; 156 if ((*line).age > 3.0f)170 if ((*line).age > this->fadeAge()) 157 171 { 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()) 160 174 { 161 175 std::list<DisplayLine>::iterator tmp = line; -
branches/gui/src/lib/gui/gl/specials/glgui_notifier.h
r8518 r8530 30 30 void pushNotifyMessage(const std::string& message); 31 31 32 // BUFFERS32 /// Setup 33 33 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; }; 34 41 35 42 void clear(); … … 54 61 55 62 private: 63 //! structure that defines a Displayed line. 56 64 typedef struct 57 65 { … … 59 67 MultiLineText* text; 60 68 61 } 62 DisplayLine; 69 } DisplayLine; 70 71 72 float _fadeAge; 73 float _hideAge; 74 float _transformAge; 63 75 64 76 unsigned int lineSpacing; //!< The Spacing between lines. … … 72 84 73 85 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. 75 87 76 88 };
Note: See TracChangeset
for help on using the changeset viewer.