Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 2, 2005, 11:24:45 PM (19 years ago)
Author:
bensch
Message:

orxonox/branches/textEngine: packed some parameters for texts into a Struct, to build a List of texts.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/textEngine/src/lib/graphics/font/glfont.h

    r3707 r3714  
    1010#include "SDL_ttf.h"
    1111
     12// FORWARD DECLARATION
     13template<class T> class tList;
    1214
    1315/* some default values */
     
    7476  TTF_Font* font;                  //!< The font we use for this.
    7577  char* fontFile;                  //!< The fontfile from whitch the font was loaded.
    76   char* text;                      //!< The text to display
    77   unsigned int fontSize;           //!< The size of the font in pixels
    78   SDL_Color color;                 //!< The color of the font.
     78  unsigned int fontSize;           //!< The size of the font in pixels. each Font has one size.
    7979
    80   // placement in openGL
    81   GLuint texture;                  //!< A GL-texture to hold the text
    82   SDL_Rect textPosSize;            //!< An SDL-Rectangle representing the position and size of the Text on the screen.
    83   int renderStyle;                 //!< The Renderstyle
    84   TexCoord texCoord;               //!< Texture-coordinates \todo fix this to have a struct
     80  //! Represents one textElement.
     81  struct Text
     82  {
     83    char* text;                      //!< The text to display
     84    SDL_Color color;                 //!< The color of the font.
     85    // placement in openGL
     86    GLuint texture;                  //!< A GL-texture to hold the text
     87    TexCoord texCoord;               //!< Texture-coordinates \todo fix this to have a struct
     88    SDL_Rect textPosSize;            //!< An SDL-Rectangle representing the position and size of the Text on the screen.
     89    int renderStyle;                 //!< The Renderstyle
     90  };
     91  tList<Text>* textList;
     92  Text* currentText;
    8593
    8694  bool init(const char* fontFile, unsigned int fontSize = FONT_DEFAULT_SIZE);
Note: See TracChangeset for help on using the changeset viewer.