forked from funkey/gui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWindowMode.h
46 lines (33 loc) · 822 Bytes
/
WindowMode.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
#ifndef WINDOW_MODE_H__
#define WINDOW_MODE_H__
#include <util/point.hpp>
using namespace util;
namespace gui {
struct WindowMode {
WindowMode(
int width = 320,
int height = 240,
int x = 0,
int y = 0,
int depth_ = 32,
bool fullscreen_ = false) :
size(width, height),
position((fullscreen_ ? 0 : x), (fullscreen_ ? 0 : y)),
depth(depth_),
fullscreen(fullscreen_) {}
WindowMode(
const point<int>& size_,
const point<int>& position_ = point<int>(0, 0),
int depth_ = 32,
bool fullscreen_ = false) :
size(size_),
position(fullscreen_ ? point<int>(0, 0) : position_),
depth(depth_),
fullscreen(fullscreen_) {}
point<int> size;
point<int> position;
int depth;
bool fullscreen;
};
} // namespace gui
#endif // WINDOW_MODE_H__