tibia-client/src/framework/ui/uilabel.h

36 lines
778 B
C
Raw Normal View History

2011-04-08 07:10:00 +02:00
#ifndef UILABEL_H
#define UILABEL_H
2011-07-13 23:12:36 +02:00
#include <global.h>
2011-04-17 21:14:24 +02:00
#include <ui/uielement.h>
#include <graphics/font.h>
2011-04-08 07:10:00 +02:00
class UILabel;
typedef std::shared_ptr<UILabel> UILabelPtr;
2011-04-08 07:10:00 +02:00
class UILabel : public UIElement
{
public:
2011-04-11 22:06:03 +02:00
UILabel() :
2011-04-17 02:36:58 +02:00
UIElement(UI::Label),
2011-05-13 01:24:57 +02:00
m_align(AlignLeftCenter) { }
2011-04-10 02:51:35 +02:00
static UILabelPtr create() { return UILabelPtr(new UILabel); }
2011-04-23 22:04:49 +02:00
void setText(const std::string& text);
2011-07-17 08:56:57 +02:00
std::string getText() const { return m_text; }
2011-04-10 02:51:35 +02:00
2011-05-12 00:16:11 +02:00
void setAlign(AlignmentFlag align) { m_align = align; }
AlignmentFlag getAlign() const { return m_align; }
2011-04-17 02:36:58 +02:00
virtual const char *getLuaTypeName() const { return "UILabel"; }
2011-04-22 00:44:30 +02:00
2011-04-10 02:51:35 +02:00
private:
std::string m_text;
2011-05-12 00:16:11 +02:00
AlignmentFlag m_align;
2011-04-08 07:10:00 +02:00
};
typedef std::shared_ptr<UILabel> UILabelPtr;
2011-04-10 02:51:35 +02:00
2011-04-08 07:10:00 +02:00
#endif // UILABEL_H