Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9656 in orxonox.OLD for trunk/src/lib/gui/gl/glgui_widget.cc


Ignore:
Timestamp:
Aug 4, 2006, 11:01:28 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: merged the proxy bache back with no conflicts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/gui/gl/glgui_widget.cc

    r9406 r9656  
    7979    if (this == GLGuiWidget::selected())
    8080      this->unselect();
     81
     82    if (this->_parent != NULL)
     83      this->_parent->removeChildWidget(this);
    8184  }
    8285
     
    8487  GLGuiWidget* GLGuiWidget::_mouseFocused = NULL;
    8588  GLGuiWidget* GLGuiWidget::_inputGrabber = NULL;
    86 
     89  Font* GLGuiWidget::_defaultFont = NULL;
    8790
    8891
     
    100103    this->_state = OrxGui::Normal;
    101104
    102 
    103     this->_font = Font(ResourceManager::getInstance()->getDataDir() + "/fonts/final_frontier.ttf", 20);
     105    if(GLGuiWidget::_defaultFont == NULL)
     106      GLGuiWidget::_defaultFont = new Font(ResourceManager::getInstance()->getDataDir() + "/fonts/final_frontier.ttf", 20);
     107
     108    this->_font = *GLGuiWidget::_defaultFont;
    104109    this->resetStyle();
    105110
     
    776781  void GLGuiWidget::setFont(const std::string& fontName, unsigned int renderSize)
    777782  {
    778     this->_font = Font(fontName, renderSize);
     783    this->setFont(Font(fontName, renderSize));
    779784  }
    780785
Note: See TracChangeset for help on using the changeset viewer.