Changeset 8769 in orxonox.OLD for trunk/src/lib/gui
- Timestamp:
- Jun 24, 2006, 4:21:52 AM (19 years ago)
- Location:
- trunk/src/lib/gui/gl
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/gui/gl/glgui_button.cc
r8740 r8769 56 56 this->setClickable(true); 57 57 58 this->_label.setFont( "fonts/final_frontier.ttf", 20);58 this->_label.setFont(this->font()); 59 59 this->_label.setColor(this->foregroundColor() ); 60 60 -
trunk/src/lib/gui/gl/glgui_widget.cc
r8717 r8769 98 98 99 99 100 this->_font = NULL; 100 this->_font = Font("/home/bensch/svn/orxonox/data/fonts/final_frontier.ttf", 20); 101 this->_font.debug(); 101 102 this->resetStyle(); 102 103 … … 329 330 330 331 this->setFeaturePosition(FeatureLeft); 331 this->setFont(NULL);332 332 333 333 this->setAnimatedStateChanges(true); … … 726 726 * @param font the Font. 727 727 */ 728 void GLGuiWidget::setFont( Font*font)728 void GLGuiWidget::setFont(const Font& font) 729 729 { 730 730 this->_font = font; … … 735 735 * @param fontName the FileName of the Font. 736 736 */ 737 void GLGuiWidget::setFont(const std::string& fontName )738 { 739 //this->font = new Font(fontName);737 void GLGuiWidget::setFont(const std::string& fontName, unsigned int renderSize) 738 { 739 this->_font = Font(fontName, renderSize); 740 740 } 741 741 -
trunk/src/lib/gui/gl/glgui_widget.h
r8717 r8769 12 12 13 13 #include "material.h" 14 #include "font.h" 15 14 16 #include "rect2D.h" 15 17 16 18 #include "event.h" 17 19 #include "signal_connector.h" 18 19 class Font;20 20 21 21 namespace OrxGui … … 120 120 inline FeaturePosition featurePosition() const { return _featurePosition; } 121 121 /** @returns the font */ 122 inline const Font * constfont() const { return _font; }122 inline const Font& font() const { return _font; } 123 123 /** @returns true if the Element is Animated */ 124 124 inline bool animating() const { return _animating; } … … 204 204 void setFeaturePositionS(const std::string& featurePosition); 205 205 206 void setFont( Font*font);207 void setFont(const std::string& fontName );206 void setFont(const Font& font); 207 void setFont(const std::string& fontName, unsigned int renderSize); 208 208 209 209 void setAnimatedStateChanges(bool animated); … … 319 319 320 320 FeaturePosition _featurePosition; //!< The Position a Feature will be layed at (checkbox(box), slider(text),...) 321 Font *_font; //!< The Font used in the current Widget.321 Font _font; //!< The Font used in the current Widget. 322 322 323 323
Note: See TracChangeset
for help on using the changeset viewer.