libsegl/glgui/textlabel.h

37 lines
684 B
C
Raw Normal View History

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"
#include "../color.h"
2008-02-09 13:43:23 +01:00
#include "../glfontengine.h"
namespace segl {
2008-02-09 13:43:23 +01:00
class GLGuiTextLabel : public GLGuiObject{
protected:
GLFontEngine fontengine;
std::string text;
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);
void setColor(Color);
2008-02-09 13:43:23 +01:00
void setPos(int _x, int _y);
virtual void render();
};
} // namespace segl
2008-02-09 13:43:23 +01:00
#endif