-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathui.h
More file actions
executable file
·56 lines (39 loc) · 779 Bytes
/
ui.h
File metadata and controls
executable file
·56 lines (39 loc) · 779 Bytes
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
#ifndef _UI_H_
#define _UI_H_
#include "predef.h"
#include "stringutil.h"
#include "canvas.h"
#include <list>
class CuiBase
{
public :
CuiBase() {} ;
virtual ~CuiBase() {};
virtual void Render(Canvas *canvas) = 0;
};
//////////////////////////////////////////////////////////////////////////
class Box : public CuiBase
{
public :
Box(int w, int h);
~Box();
void Render(Canvas *canvas);
void SetText(const wchar *text);
protected :
int x,y;
int width;
int heght;
String str;
};
//////////////////////////////////////////////////////////////////////////
class UI
{
public:
UI();
~UI();
void Render(Canvas *canvas);
void AddUI(CuiBase *ui);
private:
std::list<CuiBase *> uilist;
};
#endif