summaryrefslogtreecommitdiff
path: root/ui/toolbar.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-12-22 12:16:38 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2021-12-22 12:16:38 +0000
commite806d41c8703ddc4bcaf2186d0c1701bd1e1ada3 (patch)
tree1612baf22456c0b5a1bef82980177afb34b2756c /ui/toolbar.h
parentWindow handles UIComponent rendering (diff)
downloadilt-e806d41c8703ddc4bcaf2186d0c1701bd1e1ada3.tar.bz2
ilt-e806d41c8703ddc4bcaf2186d0c1701bd1e1ada3.tar.xz
ilt-e806d41c8703ddc4bcaf2186d0c1701bd1e1ada3.zip
Initial commit with some basic UI
Diffstat (limited to 'ui/toolbar.h')
-rw-r--r--ui/toolbar.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/ui/toolbar.h b/ui/toolbar.h
new file mode 100644
index 0000000..28aba6c
--- /dev/null
+++ b/ui/toolbar.h
@@ -0,0 +1,26 @@
+#ifndef TOOLBAR_H
+#define TOOLBAR_H
+
+#include "collection.hpp"
+#include "iconButton.h"
+#include "uiComponent.h"
+#include <initializer_list>
+#include <string>
+#include <utility>
+
+class UIShader;
+union SDL_Event;
+
+class Toolbar : public UIComponent {
+public:
+ using InitInfo = std::pair<std::string, UIEvent>;
+ explicit Toolbar(const std::initializer_list<InitInfo> & initInfo);
+
+ void render(const UIShader & uiShader, const Position & parentPos) const override;
+
+ bool handleInput(const SDL_Event & e, const Position & parentPos) override;
+
+ Collection<IconButton, false> icons;
+};
+
+#endif