Changeset 7207 in orxonox.OLD for branches/std/src/lib/graphics/text_engine/text.cc
- Timestamp:
- Mar 9, 2006, 11:35:50 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/std/src/lib/graphics/text_engine/text.cc
r7193 r7207 32 32 * @param type The renderType to display this font in 33 33 */ 34 Text::Text(const char*fontFile, unsigned int textSize)34 Text::Text(const std::string& fontFile, unsigned int textSize) 35 35 { 36 36 this->init(); 37 37 38 if ( fontFile != NULL)38 if (!fontFile.empty()) 39 39 this->setFont(fontFile, FONT_DEFAULT_RENDER_SIZE); 40 40 this->setSizeY2D(textSize); … … 78 78 * @param fontSize the Size of the Font 79 79 */ 80 void Text::setFont(const char*fontFile, unsigned int fontSize)80 void Text::setFont(const std::string& fontFile, unsigned int fontSize) 81 81 { 82 82 Font* tmpFont; … … 90 90 91 91 // load a new Font 92 if ( fontFile != NULL)92 if (!fontFile.empty()) 93 93 { 94 94 tmpFont = (Font*)ResourceManager::getInstance()->load(fontFile, TTF, RP_GAME, (int)fontSize); … … 96 96 this->font = tmpFont; 97 97 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()); 99 99 } 100 100 }
Note: See TracChangeset
for help on using the changeset viewer.