123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
-
-
- #ifndef _GLSTRING_H_
- #define _GLSTRING_H_
-
-
- typedef struct gl_string_s {
- int x;
- int y;
- float scale;
- char *text;
- bool active;
- unsigned short int len;
- } gl_string_t;
-
-
- class GLString {
- public:
-
-
-
- GLString();
-
-
-
- ~GLString();
-
-
-
- void Init(unsigned int max_strings);
-
-
-
- void SetChar(unsigned int string, unsigned int pos, char c);
-
-
-
- unsigned int GetStringLen(unsigned int string);
-
-
-
- char *GetBuffer(unsigned int string);
-
-
- void setActive(unsigned int string, bool active);
-
-
-
- void SetString(unsigned int string, const char *s, ...);
-
-
-
- void Scale(float scale);
-
-
-
- int glPrintf(int x, int y, const char *string, ...);
-
-
-
- void Render();
-
-
-
- gl_string_t *GetString(unsigned int id);
-
-
- private:
- unsigned int _num_string_max;
- unsigned int _num_string;
- gl_string_t *_string;
- float _scale;
- };
-
- #endif
|