00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef _LABEL_
00019 #define _LABEL_
00020
00021 #include <string>
00022
00023 #include "ui/AbstractScreenElement.h"
00024 #include "util/Colour.h"
00025 #include "util/Vector2.h"
00026
00027 class Label : public AbstractScreenElement
00028 {
00029 private:
00030 std::wstring m_text;
00031 std::string m_textFont;
00032 Colour m_colour;
00033 int m_nTextSize;
00034 int m_nTextAlignment;
00035 Vector2 m_position;
00036 public:
00037 Label(const std::wstring& text, const std::string& textFont, const Vector2& position, const Colour& colour, const int nTextSize, const int nTextAlignment);
00038 virtual ~Label() { }
00039
00040 virtual void Update(const int nDelta) { }
00041 virtual void Render(AbstractRenderer* pRenderer, const int nDelta);
00042
00043 void SetText(const std::wstring& text) {m_text = text; }
00044 const std::wstring & GetText() const { return m_text; }
00045
00046 void SetTextAlignment(const int nTextAlignment) { m_nTextAlignment = nTextAlignment; }
00047 int GetTextAlignment() const { return m_nTextAlignment; }
00048
00049 void SetTextSize(int nSize) { m_nTextSize = nSize; }
00050 int GetTextSize() const { return m_nTextSize; }
00051
00052 void SetPosition(const Vector2& position) { m_position = position; }
00053 const Vector2 & GetPosition() const { return m_position; }
00054
00055 void SetFont(const std::string& font) { m_textFont = font; }
00056 const std::string & GetFont() const { return m_textFont; }
00057
00058 void SetColour(const Colour& colour) { m_colour = colour; }
00059 const Colour & GetColour() const { return m_colour; }
00060 };
00061
00062 #endif