summaryrefslogtreecommitdiff
path: root/ui/toolbar.h
blob: 28aba6ca05c3f3140e2f656c5c8e736c2b0cf042 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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