Changeset 7455 in orxonox.OLD for trunk/src/lib/graphics/text_engine/text.cc
- Timestamp:
- Apr 29, 2006, 10:38:12 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/text_engine/text.cc
r7453 r7455 35 35 // initialize this Text 36 36 this->font = NULL; 37 this->text = ""; 38 this->setAlignment(TEXT_DEFAULT_ALIGNMENT); 37 38 this->setFont(fontFile, FONT_DEFAULT_RENDER_SIZE); 39 39 40 this->blending = TEXT_DEFAULT_BLENDING; 40 41 this->color = TEXT_DEFAULT_COLOR; 41 42 if (!fontFile.empty()) 43 this->setFont(fontFile, FONT_DEFAULT_RENDER_SIZE); 44 42 this->setAlignment(TEXT_DEFAULT_ALIGNMENT); 45 43 this->setSize(TEXT_DEFAULT_SIZE); 46 44 } … … 63 61 void Text::setFont(const std::string& fontFile, unsigned int fontSize) 64 62 { 65 Font* newFont ;63 Font* newFont = NULL; 66 64 Font* oldFont = this->font; 67 65 … … 76 74 } 77 75 } 78 else76 if (newFont == NULL) 79 77 newFont = Font::getDefaultFont(); 78 assert(newFont != NULL); 80 79 81 80 // unloading the Font if we alrady have one loaded.
Note: See TracChangeset
for help on using the changeset viewer.