summaryrefslogtreecommitdiff
path: root/src/game/ToolButton.h
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-01-30 16:03:18 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-01-30 16:03:18 (GMT)
commit1d297cb57a338f2a9e34d0f16642afc6a83c1041 (patch)
tree7d5514be702ff98f9b1e53eecdbf0c67096d76f6 /src/game/ToolButton.h
parent259fc2bcf75d754af043a5d3fa39b6ee0c0b1dec (diff)
downloadpowder-1d297cb57a338f2a9e34d0f16642afc6a83c1041.zip
powder-1d297cb57a338f2a9e34d0f16642afc6a83c1041.tar.gz
Line and rect drawing
Diffstat (limited to 'src/game/ToolButton.h')
-rw-r--r--src/game/ToolButton.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/game/ToolButton.h b/src/game/ToolButton.h
new file mode 100644
index 0000000..60a1c7c
--- /dev/null
+++ b/src/game/ToolButton.h
@@ -0,0 +1,26 @@
+/*
+ * ToolButton.h
+ *
+ * Created on: Jan 30, 2012
+ * Author: Simon
+ */
+
+#ifndef TOOLBUTTON_H_
+#define TOOLBUTTON_H_
+
+#include "interface/Button.h"
+
+class ToolButton: public ui::Button {
+ int currentSelection;
+ std::string selectionText;
+public:
+ ToolButton(ui::Point position, ui::Point size, std::string text_);
+ virtual void OnMouseUp(int x, int y, unsigned int button);
+ virtual void OnMouseClick(int x, int y, unsigned int button);
+ virtual void Draw(const ui::Point& screenPos);
+ void SetSelectionState(int state);
+ int GetSelectionState();
+ virtual ~ToolButton();
+};
+
+#endif /* TOOLBUTTON_H_ */