summaryrefslogtreecommitdiff
path: root/src/interface/Button.h
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-01-23 22:53:57 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-01-23 22:53:57 (GMT)
commitdf72f2580f68a7d0055fcf20dcd65c0be90c52dd (patch)
treeada3c6d3fdc2009f5236ec2a39d661c0bfaaf3e5 /src/interface/Button.h
parent2bd571e1598e6baffc717bcb086d89d01929604b (diff)
downloadpowder-df72f2580f68a7d0055fcf20dcd65c0be90c52dd.zip
powder-df72f2580f68a7d0055fcf20dcd65c0be90c52dd.tar.gz
Better element buttons, Save preview WIP
Diffstat (limited to 'src/interface/Button.h')
-rw-r--r--src/interface/Button.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/interface/Button.h b/src/interface/Button.h
index bff54c9..fe4e9f9 100644
--- a/src/interface/Button.h
+++ b/src/interface/Button.h
@@ -11,6 +11,7 @@
#include <string>
#include "Misc.h"
#include "Component.h"
+#include "Colour.h"
namespace ui
{
@@ -56,12 +57,22 @@ public:
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(int colr, int colg, int colb) { this->colr = colr; this->colg = colg; this->colb = colb; }
+
+ 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; }
protected:
- int colr, colg, colb;
+ Colour background, activeBackground;
+ Colour border, activeBorder;
+ Colour text, activeText;
+
bool isButtonDown, state, isMouseInside, isTogglable, toggle;
ButtonAction * actionCallback;
ui::Point textPosition;