summaryrefslogtreecommitdiff
path: root/src/interface/Button.h
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-01-19 13:44:59 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-01-19 13:44:59 (GMT)
commit44639a6423c03552a3c0faafab27ef8f395f73a6 (patch)
tree1a4fc49a56060759fcbec6f18e9159cf126e8606 /src/interface/Button.h
parent4a60b97c700c2f1843b7e99313554cb89fb5da4e (diff)
downloadpowder-44639a6423c03552a3c0faafab27ef8f395f73a6.zip
powder-44639a6423c03552a3c0faafab27ef8f395f73a6.tar.gz
Some folder changes, started search and client
Diffstat (limited to 'src/interface/Button.h')
-rw-r--r--src/interface/Button.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/interface/Button.h b/src/interface/Button.h
index 5f2d71f..aabca91 100644
--- a/src/interface/Button.h
+++ b/src/interface/Button.h
@@ -9,7 +9,7 @@
#define BUTTON_H_
#include <string>
-
+#include "Misc.h"
#include "Component.h"
namespace ui
@@ -51,10 +51,18 @@ public:
inline bool GetToggleState();
inline void SetToggleState(bool state);
void SetActionCallback(ButtonAction * action);
-
+ 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(); }
protected:
bool isButtonDown, state, isMouseInside, isTogglable, toggle;
ButtonAction * actionCallback;
+ ui::Point textPosition;
+ HorizontalAlignment textHAlign;
+ VerticalAlignment textVAlign;
+
};
}
#endif /* BUTTON_H_ */