Uranus  1.0.1.0
Uranus is a GameEngine written in C++
Loading...
Searching...
No Matches
Button.hpp
1/*
2** EPITECH PROJECT, 2023
3** Button.hpp
4** File description:
5** Button.hpp
6*/
7
8#ifndef URANUS_BUTTON_HPP
9#define URANUS_BUTTON_HPP
10
11#include "uranus/engine/Engine.hpp"
12
13namespace ui {
14
15 class Button : public engine::Base {
16 public:
17 Button(const std::string &uniqueName, uranus::ecs::component::Position pos, std::shared_ptr<engine::Texture> &texture,
18 const std::function<void()> &callbackPressed);
19
20 void loop(size_t);
21
22 void handleKeyboard(size_t entity, const engine::Event event);
23
24 private:
25 std::function<void()> _callbackPressed;
26 engine::Clock _clockPressed;
27 bool _hover;
28 bool _pressed;
29 };
30
31} // namespace ui
32
33#endif // URANUS_BUTTON_HPP
Definition: Base.hpp:15
Definition: Clock.hpp:14
Definition: Event.hpp:14
Definition: Button.hpp:15
Definition: Components.hpp:22