Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 3, 2005, 9:55:33 PM (19 years ago)
Author:
bensch
Message:

orxonox/branches/textEngine: added bind-node ability, so now the text tries to follow a given PNode (currently trackNode)
the work is not finished, so do not expect too much

File:
1 edited

Legend:

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

    r3714 r3715  
    1010#include "SDL_ttf.h"
    1111
    12 // FORWARD DECLARATION
     12#include "vector.h"
     13
     14// FORWARD DECLARATION
     15class PNode;
    1316template<class T> class tList;
     17
    1418
    1519/* some default values */
     
    2024#define FONT_DEFAULT_COLOR_B    256                  //!< the default red blue (color) of the text
    2125#define FONT_NUM_COLORS         256                  //!< The number of colors.
    22 
    2326
    2427
     
    5760  virtual ~GLFont();
    5861
     62  // general
    5963  static void enableFonts(void);
    6064  static void disableFonts(void);
    6165
     66  // font
    6267  bool setFont(const char* fontFile);
    63   void setText(const char* text);
    64 
    65   void setStyle(char* renderStyle);
    6668  void setSize(unsigned int fontSize);
    6769  void setColor(Uint8 r, Uint8 g, Uint8 b);
     70
     71  // text
     72  void setBindNode(PNode* bindNode);
     73  void setText(const char* text);
     74  void setStyle(char* renderStyle);
    6875  void setPosition(int x, int y);
    69 
    7076  void createTexture(void);
    7177 
     
    7379
    7480 private:
     81  // general purpose
     82  GLdouble projMat[16];             //!< The Projection Matrix
     83
    7584  // information about the Font
    7685  TTF_Font* font;                  //!< The font we use for this.
     
    8897    SDL_Rect textPosSize;            //!< An SDL-Rectangle representing the position and size of the Text on the screen.
    8998    int renderStyle;                 //!< The Renderstyle
     99
     100    PNode* bindNode;                 //!< A node the Text is bind to. (if NULL thr node will not be bound to anything.)
    90101  };
    91102  tList<Text>* textList;
     
    113124};
    114125
     126void m_inverse(const float *m, float *out);
     127Vector mvMult(const float *mat, const Vector* vec);
    115128#endif /* _GLFONT_H */
Note: See TracChangeset for help on using the changeset viewer.