summaryrefslogtreecommitdiff
path: root/ui/toolbar.h
blob: ea560f55a602750fc161652af2950f6a9d946aae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#pragma once

#include "collection.h"
#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;
};