diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-01-20 22:07:49 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-01-20 22:07:49 (GMT) |
| commit | c8073657fcbfd1bfa72538d7babe4964857e7101 (patch) | |
| tree | f3488e993c9828121b2f89ed2f639d2ebbe54dc9 /src/interface/Label.h | |
| parent | c5e8b345219cd7d8ca4b0aa638f59a1fed2cd83b (diff) | |
| download | powder-c8073657fcbfd1bfa72538d7babe4964857e7101.zip powder-c8073657fcbfd1bfa72538d7babe4964857e7101.tar.gz | |
More stuff, need to fix memory leak
Diffstat (limited to 'src/interface/Label.h')
| -rw-r--r-- | src/interface/Label.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/interface/Label.h b/src/interface/Label.h index e56852e..9b5a454 100644 --- a/src/interface/Label.h +++ b/src/interface/Label.h @@ -4,20 +4,28 @@ #include <string> #include "Component.h" +#include "Misc.h" namespace ui { class Label : public Component { + std::string text; + ui::Point textPosition; + HorizontalAlignment textHAlign; + VerticalAlignment textVAlign; public: Label(Window* parent_state, std::string labelText); - Label(Point position, Point size, std::string labelText); - Label(std::string labelText); virtual ~Label(); - std::string LabelText; + void TextPosition(); + void SetText(std::string text); + HorizontalAlignment GetHAlignment() { return textHAlign; } + VerticalAlignment GetVAlignment() { return textVAlign; } + void SetAlignment(HorizontalAlignment hAlign, VerticalAlignment vAlign) { textHAlign = hAlign; textVAlign = vAlign; TextPosition(); } + virtual void Draw(const Point& screenPos); }; |
