-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathWindow.h
46 lines (39 loc) · 774 Bytes
/
Window.h
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
#pragma once
#include "Box.h"
class Window : public Object
{
public :
Box box;
int *x;
int *y;
int *width;
int *height;
string name;
Window( const char * _name = "Window", int _x = 0, int _y = 0, int _w=10, int _h =3):Object("Window")
{
name.assign(_name);
box.pos.x = _x;
box.pos.y = _y;
box.width = _w;
box.height= _h;
x = &(box.pos.x);
y = &(box.pos.y);
width = &(box.width);
height = &(box.height);
}
~Window(){}
void Init( char * _name, int _x = 0, int _y = 0, int _w=10, int _h =3)
{
name.assign(_name);
box.pos.x = _x;
box.pos.y = _y;
box.width = _w;
box.height= _h;
x = &(box.pos.x);
y = &(box.pos.y);
width = &(box.width);
height = &(box.height);
}
virtual void Update(){}
virtual void Render(){}
};