blob: 709854ab0a8652d5572eddfe620c96a12e3d34f5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#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;
std::function<void()> on_click;
public:
virtual int get_instances_max() const { return 1; }
};
}
|