Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8769 in orxonox.OLD for trunk


Ignore:
Timestamp:
Jun 24, 2006, 4:21:52 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: Font in Button-Widget used

Location:
trunk/src/lib
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/text_engine/text.cc

    r8768 r8769  
    197197{
    198198  this->_font = font;
     199  this->setupTextWidth();
    199200}
    200201
  • trunk/src/lib/gui/gl/glgui_button.cc

    r8740 r8769  
    5656    this->setClickable(true);
    5757
    58     this->_label.setFont("fonts/final_frontier.ttf", 20);
     58    this->_label.setFont(this->font());
    5959    this->_label.setColor(this->foregroundColor() );
    6060
  • trunk/src/lib/gui/gl/glgui_widget.cc

    r8717 r8769  
    9898
    9999
    100     this->_font = NULL;
     100    this->_font = Font("/home/bensch/svn/orxonox/data/fonts/final_frontier.ttf", 20);
     101    this->_font.debug();
    101102    this->resetStyle();
    102103
     
    329330
    330331    this->setFeaturePosition(FeatureLeft);
    331     this->setFont(NULL);
    332332
    333333    this->setAnimatedStateChanges(true);
     
    726726   * @param font the Font.
    727727   */
    728   void GLGuiWidget::setFont(Font* font)
     728  void GLGuiWidget::setFont(const Font& font)
    729729  {
    730730    this->_font = font;
     
    735735   * @param fontName the FileName of the Font.
    736736   */
    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);
    740740  }
    741741
  • trunk/src/lib/gui/gl/glgui_widget.h

    r8717 r8769  
    1212
    1313#include "material.h"
     14#include "font.h"
     15
    1416#include "rect2D.h"
    1517
    1618#include "event.h"
    1719#include "signal_connector.h"
    18 
    19 class Font;
    2020
    2121namespace OrxGui
     
    120120    inline FeaturePosition featurePosition() const { return _featurePosition; }
    121121    /** @returns the font */
    122     inline const Font* const font() const { return _font; }
     122    inline const Font& font() const { return _font; }
    123123    /** @returns true if the Element is Animated */
    124124    inline bool animating() const { return _animating; }
     
    204204    void setFeaturePositionS(const std::string& featurePosition);
    205205
    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);
    208208
    209209    void setAnimatedStateChanges(bool animated);
     
    319319
    320320    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.
    322322
    323323
Note: See TracChangeset for help on using the changeset viewer.