This repository has been archived by the owner on Jan 18, 2024. It is now read-only.
forked from rpbpolis/spic-prj-api
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathUIObject.hpp
68 lines (56 loc) · 1.79 KB
/
UIObject.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#ifndef UIOBJECT_H_
#define UIOBJECT_H_
#include "GameObject.hpp"
#if __has_include("UIObject_includes.hpp")
#include "UIObject_includes.hpp"
#endif
namespace spic {
/**
* @brief Base class for a user interface object like Button or Text.
* @spicapi
*/
class UIObject : public GameObject {
public:
/**
* @brief Constructor.
* @param name The name for the game object.
* @param tag The tag for the game object.
* @param layer The layer for the game object.
* @param width The width of the UI object.
* @param height The height of the UI object.
* @sharedapi
*/
UIObject(const std::string& name, const std::string& tag, int layer, double width, double height);
/**
* @brief Get the width of the UIObject
* @return The width of the UIObject
* @sharedapi
*/
double Width() const;
/**
* @brief Set the width of the UIObject
* @param newWidth The new width of the UIObject
* @sharedapi
*/
void Width(double newWidth);
/**
* @brief Get the height of the UIObject
* @return The height of the UIObject
* @sharedapi
*/
double Height() const;
/**
* @brief Set the height of the UIObject
* @param newHeight The new height of the UIObject
* @sharedapi
*/
void Height(double newHeight);
private:
double width;
double height;
#if __has_include("UIObject_private.hpp")
#include "UIObject_private.hpp"
#endif
};
}
#endif // UIOBJECT_H_