blob: 0092da9e9d23f1fa9aa0f059ee4b0cfd29f7908d (
plain)
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
|
#ifndef GUIELEMENT_H
#define GUIELEMENT_H
#include "Runtime/GameCode/Behaviour.h"
#include "Runtime/Math/Rect.h"
class Vector2f;
// Base class for all GUI elements.
// Registers itself with the GUILayer when enabled.
class GUIElement : public Behaviour
{
public:
REGISTER_DERIVED_ABSTRACT_CLASS (GUIElement, Behaviour)
GUIElement (MemLabelId label, ObjectCreationMode mode);
virtual void RenderGUIElement (const Rectf& cameraRect) = 0;
virtual Rectf GetScreenRect (const Rectf& cameraRect) = 0;
bool HitTest (const Vector2f& screenSpaceCoordinates, const Rectf& cameraRect);
private:
virtual void AddToManager ();
virtual void RemoveFromManager ();
};
#endif
|