Changeset 9854 in orxonox.OLD for branches/new_class_id/src/lib/graphics/text_engine
- Timestamp:
- Sep 28, 2006, 10:17:56 AM (18 years ago)
- Location:
- branches/new_class_id/src/lib/graphics/text_engine
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/new_class_id/src/lib/graphics/text_engine/resource_font.cc
r9847 r9854 6 6 7 7 8 ResourceFont::ResourceFont(const std::string& fontName, unsigned int renderSize )8 ResourceFont::ResourceFont(const std::string& fontName, unsigned int renderSize, const Resources::KeepLevel& keepLevel) 9 9 : Font(), Resource(&ResourceFont::type) 10 10 { … … 25 25 26 26 this->Font::loadFontFromTTF(fileName, renderSize); 27 this->Resource::addResource(new ResourceFont::FontResourcePointer(fontName + ',' + MultiType((int)renderSize).getString(), Resources::KeepLevel(0), this->Font::dataPointer()));27 this->Resource::addResource(new ResourceFont::FontResourcePointer(fontName + ',' + MultiType((int)renderSize).getString(), keepLevel, this->Font::dataPointer())); 28 28 } 29 29 } 30 30 31 ResourceFont ResourceFont::createFromString(const std::string& loadString )31 ResourceFont ResourceFont::createFromString(const std::string& loadString, const Resources::KeepLevel& keepLevel) 32 32 { 33 33 SubString loadValues(loadString, ','); … … 39 39 renderSize = (unsigned int)MultiType(loadValues[2]).getInt(); 40 40 41 return ResourceFont(fontName, renderSize );41 return ResourceFont(fontName, renderSize, keepLevel); 42 42 } 43 43 -
branches/new_class_id/src/lib/graphics/text_engine/resource_font.h
r9847 r9854 15 15 { 16 16 public: 17 ResourceFont(const std::string& fontName, unsigned int renderSize );18 static ResourceFont createFromString(const std::string& loadString );17 ResourceFont(const std::string& fontName, unsigned int renderSize, const Resources::KeepLevel& keepLevel = Resources::KeepLevel()); 18 static ResourceFont createFromString(const std::string& loadString, const Resources::KeepLevel& keepLevel = Resources::KeepLevel()); 19 19 20 20 private:
Note: See TracChangeset
for help on using the changeset viewer.