summaryrefslogtreecommitdiff
path: root/src/interface/Button.h
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-05-15 17:13:17 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-05-15 17:13:17 (GMT)
commit136675b56a8a1862afb41ccee5c14e93e483b964 (patch)
tree8f679477c5e1c0984a5cb9c169e339c1ca0d6e0c /src/interface/Button.h
parent45563e97e813cfd21724ad1111e5de3e04679e1a (diff)
downloadpowder-136675b56a8a1862afb41ccee5c14e93e483b964.zip
powder-136675b56a8a1862afb41ccee5c14e93e483b964.tar.gz
Move style into Component
Diffstat (limited to 'src/interface/Button.h')
-rw-r--r--src/interface/Button.h21
1 files changed, 1 insertions, 20 deletions
diff --git a/src/interface/Button.h b/src/interface/Button.h
index 6f485cb..61430ad 100644
--- a/src/interface/Button.h
+++ b/src/interface/Button.h
@@ -29,7 +29,6 @@ public:
Button(Point position = Point(0, 0), Point size = Point(0, 0), std::string buttonText = "");
virtual ~Button();
- Icon icon;
bool Toggleable;
bool Enabled;
@@ -42,6 +41,7 @@ public:
virtual void Draw(const Point& screenPos);
+ virtual void TextPosition();
inline bool GetState() { return state; }
virtual void DoAction(); //action of button what ever it may be
void SetTogglable(bool isTogglable);
@@ -50,34 +50,15 @@ public:
inline void SetToggleState(bool state);
void SetActionCallback(ButtonAction * action);
ButtonAction * GetActionCallback() { return actionCallback; }
- void TextPosition();
void SetText(std::string buttonText);
-
- HorizontalAlignment GetHAlignment() { return textHAlign; }
- VerticalAlignment GetVAlignment() { return textVAlign; }
- void SetAlignment(HorizontalAlignment hAlign, VerticalAlignment vAlign) { textHAlign = hAlign; textVAlign = vAlign; TextPosition(); }
-
- void SetBackgroundColour(Colour background) { this->background = background; }
- void SetActiveBackgroundColour(Colour background) { this->activeBackground = background; }
- void SetBorderColour(Colour border) { this->border = border; }
- void SetActiveBorderColour(Colour border) { this->activeBorder = border; }
- void SetTextColour(Colour text) { this->text = text; }
- void SetActiveTextColour(Colour text) { this->activeText = text; }
-
void SetIcon(Icon icon);
protected:
- Colour background, activeBackground;
- Colour border, activeBorder;
- Colour text, activeText;
std::string buttonDisplayText;
std::string ButtonText;
bool isButtonDown, state, isMouseInside, isTogglable, toggle;
ButtonAction * actionCallback;
- ui::Point textPosition;
- HorizontalAlignment textHAlign;
- VerticalAlignment textVAlign;
};
}