Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3772 in orxonox.OLD for orxonox/branches/textEngine/src/lib


Ignore:
Timestamp:
Apr 11, 2005, 12:28:02 AM (20 years ago)
Author:
bensch
Message:

orxonox/branches/textEngine: deletion process is better now

Location:
orxonox/branches/textEngine/src/lib/graphics/font
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/textEngine/src/lib/graphics/font/text_engine.cc

    r3771 r3772  
    5757Text::~Text(void)
    5858{
    59 
     59  TextEngine::getInstance()->deleteText(this);
    6060}
    6161
     
    787787  else
    788788    PRINTF(4)("Fonts already initialized\n");
    789      
    790789}
    791790
     
    826825}
    827826
     827/**
     828   \brief removes a Text from the List
     829   \param the text to delete
     830*/
     831void TextEngine::deleteText(Text* text)
     832{
     833  ResourceManager::getInstance()->unload(text->font);
     834  textList->remove(text);
     835
     836}
     837
     838/**
     839   \brief draws all the Texts that have been initialized
     840*/
    828841void TextEngine::draw(void)
    829842{
  • orxonox/branches/textEngine/src/lib/graphics/font/text_engine.h

    r3770 r3772  
    197197                   Uint8 g = FONT_DEFAULT_COLOR_G,
    198198                   Uint8 b = FONT_DEFAULT_COLOR_B);
     199 
     200  void deleteText(Text* text);
    199201
    200202  void draw(void);
Note: See TracChangeset for help on using the changeset viewer.