2008-02-09 13:43:23 +01:00
|
|
|
#ifndef __GLGUITEXTLABEL_H
|
|
|
|
#define __GLGUITEXTLABEL_H
|
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
#include <string>
|
2008-09-19 17:34:01 +02:00
|
|
|
#include <SDL.h>
|
|
|
|
#include <SDL_opengl.h>
|
2008-02-09 13:43:23 +01:00
|
|
|
|
|
|
|
#include "object.h"
|
2008-08-10 17:14:54 +02:00
|
|
|
#include "../color.h"
|
2008-02-09 13:43:23 +01:00
|
|
|
#include "../glfontengine.h"
|
|
|
|
|
2008-08-10 17:14:54 +02:00
|
|
|
namespace segl {
|
|
|
|
|
2008-02-09 13:43:23 +01:00
|
|
|
class GLGuiTextLabel : public GLGuiObject{
|
|
|
|
protected:
|
|
|
|
GLFontEngine fontengine;
|
|
|
|
std::string text;
|
|
|
|
|
2008-08-10 17:14:54 +02:00
|
|
|
Color col;
|
2008-02-09 13:43:23 +01:00
|
|
|
int x, y;
|
|
|
|
bool center;
|
|
|
|
int wrap;
|
|
|
|
public:
|
|
|
|
GLGuiTextLabel(int _x, int _y, bool _center=false, int _wrap=0);
|
|
|
|
GLGuiTextLabel(std::string, int _x, int _y, bool _center=false, int _wrap=0);
|
|
|
|
|
|
|
|
void setText(std::string str);
|
2008-08-10 17:14:54 +02:00
|
|
|
void setColor(Color);
|
2008-02-09 13:43:23 +01:00
|
|
|
void setPos(int _x, int _y);
|
|
|
|
virtual void render();
|
|
|
|
};
|
|
|
|
|
2008-08-10 17:14:54 +02:00
|
|
|
} // namespace segl
|
|
|
|
|
2008-02-09 13:43:23 +01:00
|
|
|
#endif
|