Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 9, 2006, 11:35:50 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: evil was within

File:
1 edited

Legend:

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

    r7193 r7207  
    3232 * @param type The renderType to display this font in
    3333 */
    34 Text::Text(const char* fontFile, unsigned int textSize)
     34Text::Text(const std::string& fontFile, unsigned int textSize)
    3535{
    3636  this->init();
    3737
    38   if (fontFile != NULL)
     38  if (!fontFile.empty())
    3939    this->setFont(fontFile, FONT_DEFAULT_RENDER_SIZE);
    4040  this->setSizeY2D(textSize);
     
    7878 * @param fontSize the Size of the Font
    7979 */
    80 void Text::setFont(const char* fontFile, unsigned int fontSize)
     80void Text::setFont(const std::string& fontFile, unsigned int fontSize)
    8181{
    8282  Font* tmpFont;
     
    9090
    9191  // load a new Font
    92   if (fontFile != NULL)
     92  if (!fontFile.empty())
    9393  {
    9494    tmpFont = (Font*)ResourceManager::getInstance()->load(fontFile, TTF, RP_GAME, (int)fontSize);
     
    9696      this->font = tmpFont;
    9797    else
    98       PRINTF(2)("Font %s could not be loaded, probably file not found\n", fontFile);
     98      PRINTF(2)("Font %s could not be loaded, probably file not found\n", fontFile.c_str());
    9999  }
    100100}
Note: See TracChangeset for help on using the changeset viewer.