aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/Button.h
blob: f5334520dd2a4916ec49f8d27b64600b5d4efd11 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#pragma once
#include <functional>

#include "Component.h"
#include "api/EventHandler.h"
#include "api/UiObject.h"
namespace crepe {
class Button : public UiObject{
public:
	Button(game_object_id_t id) : UiObject(id){};
	bool interactable = true;
	bool is_toggle = false;
	bool is_pressed = false;
	bool hover = false;
	std::function<void()> on_click;
public:
virtual int get_instances_max() const { return 1; }
};
}