Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 10, 2005, 12:39:21 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: new Way to load and unload Text

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/text_engine/text_engine.cc

    r5343 r5344  
    2323
    2424#include "text_engine.h"
     25#include "text.h"
     26#include "font.h"
    2527
    2628using namespace std;
     
    3436#include "class_list.h"
    3537
    36 #include "p_node.h"
    37 #include "vector.h"
    3838#include "debug.h"
    3939#include "list.h"
     
    126126
    127127/**
    128  *  creates a new Text with a certain font.
    129  * @see Font::Font
    130  * @see Text::Text
    131 */
    132 Text* TextEngine::createText(const char* fontFile, unsigned int fontSize, int textType)
    133 {
    134   Font* tmpFont;
    135   Text* newText;
    136   Vector tmpVec;
    137 
    138   tmpFont = (Font*)ResourceManager::getInstance()->load(fontFile, TTF, RP_GAME, &fontSize);
    139   if (!tmpFont)
    140     {
    141       PRINTF(2)("Font %s could not be loaded, probably file not found\n", fontFile);
    142       return NULL;
    143     }
    144   else
    145     return new Text(tmpFont, TEXT_RENDER_DYNAMIC);
    146 }
    147 
    148 /**
    149128 *  outputs some nice Debug information
    150129
Note: See TracChangeset for help on using the changeset viewer.