summaryrefslogtreecommitdiff
path: root/ui/toolbar.h
diff options
context:
space:
mode:
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