-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIDisplayableComponent.hpp
50 lines (42 loc) · 1.16 KB
/
IDisplayableComponent.hpp
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*
** EPITECH PROJECT, 2024
** arcade-shared
** File description:
** IDisplaybleComponent
*/
#pragma once
#include "IPositionableComponent.hpp"
#include "../IGame.hpp"
#include "../../types/Vector.hpp"
namespace shared::games::components {
class IDisplayableComponent;
}
/**
* @brief Interface of a displayable component
*
*/
class shared::games::components::IDisplayableComponent : public virtual IPositionableComponent {
public:
virtual ~IDisplayableComponent() = default;
/**
* @brief Get Z index that is usefull for display prioroty
*
* @return Z index of the entity
*/
virtual unsigned int &getZIndex() noexcept = 0;
/**
* @brief On click event handler for the entity
* @param ctx Context of the game
*/
virtual void onMousePress(std::shared_ptr <IGame> ctx) = 0;
/**
* @brief On release event handler for the entity
* @param ctx Context of the game
*/
virtual void onMouseRelease(std::shared_ptr <IGame> ctx) = 0;
/**
* @brief On hover event handler for the entity
* @param ctx Context of the game
*/
virtual void onMouseHover(std::shared_ptr <IGame> ctx) = 0;
};