Changeset 8760 in orxonox.OLD for branches/fontdata/src/lib/graphics/text_engine/text.h
- Timestamp:
- Jun 24, 2006, 2:14:37 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/fontdata/src/lib/graphics/text_engine/text.h
r8754 r8760 45 45 void setFont(const std::string& fontFile, unsigned int renderSize); 46 46 /** @param blending the blending intensity to set (between 0.0 and 1.0) */ 47 inline void setBlending(float blending) { this->_ color.a() = blending; };47 inline void setBlending(float blending) { this->_font.setTransparency(blending); }; 48 48 /** @param r red @param g green @param b blue @brief sets the Color of the Text to render (values in [0-1]) */ 49 void setColor(float r, float g, float b) { this->_ color = Color(r, g, b, this->_color.a()); };50 void setColor(float r, float g, float b, float a) { this->_ color = Color(r, g, b, a); };51 void setColor(const Color& color) { this->_ color = color; };49 void setColor(float r, float g, float b) { this->_font.setDiffuseColor(Color(r, g, b, this->blending())); }; 50 void setColor(float r, float g, float b, float a) { this->_font.setDiffuseColor(Color(r, g, b, a)); }; 51 void setColor(const Color& color) { this->_font.setDiffuseColor(color); }; 52 52 void setSize(float size); 53 53 … … 60 60 inline const Font& font() const { return this->_font; }; 61 61 /** @returns the Blending Value [0 invisible 1.0 full visible */ 62 inline float blending() const { return this->_ color.a(); };62 inline float blending() const { return this->_font.diffuseColor().a(); }; 63 63 /** @returns: a Vector(r,g,b) @brief: retrieve a Vector holding the Color of the Text */ 64 inline const Color& color() const { return this->_ color; };64 inline const Color& color() const { return this->_font.diffuseColor(); }; 65 65 /** @returns the Size of the Text */ 66 66 inline float size() const { return this->_size; }; … … 79 79 80 80 std::string _text; //!< The text to display 81 Color _color; //!< The color of the font.82 81 float _size; //!< The size of the Text. 83 82 };
Note: See TracChangeset
for help on using the changeset viewer.