-
Notifications
You must be signed in to change notification settings - Fork 0
/
GUI_Widget.cpp
43 lines (31 loc) · 934 Bytes
/
GUI_Widget.cpp
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
#include "GUI_Widget.h"
//--------------------------------------------------------------------------------
GUI_Widget::GUI_Widget(int _x, int _y, int _width, int _height)
{
x = _x;
y = _y;
width = _width;
height = _height;
parent = NULL;
container = SDL_CreateRGBSurface(SDL_SWSURFACE, width, height, 32, 0, 0, 0, 0);
}
//--------------------------------------------------------------------------------
GUI_Widget::~GUI_Widget(void)
{
SDL_FreeSurface(container);
}
//--------------------------------------------------------------------------------
void GUI_Widget::ProcessEvent(SDL_Event *event)
{
}
//--------------------------------------------------------------------------------
void GUI_Widget::SetPosition(int dx, int dy)
{
x = dx;
y = dy;
}
//--------------------------------------------------------------------------------
void GUI_Widget::SetParent(GUI_Window *par)
{
parent = par;
}