-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathModuleWindow.h
More file actions
54 lines (39 loc) · 900 Bytes
/
ModuleWindow.h
File metadata and controls
54 lines (39 loc) · 900 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
#ifndef __ModuleWindow_H__
#define __ModuleWindow_H__
#include "Module.h"
#include "SDL/include/SDL.h"
class Application;
enum WindowMode {
FULLSCREEN,
RESIZABLE,
BORDERLESS,
FULLSCREEN_DESKTOP
};
class ModuleWindow : public Module
{
public:
ModuleWindow(Application* app, bool start_enabled = true);
// Destructor
virtual ~ModuleWindow();
bool Init();
bool CleanUp();
void Save(JSON_file& config);
void Load(JSON_file& config);
void SetTitle(const char* title);
void SetWindowsSize(int value);
void SetWindowMode(int mode);
bool ChangeWindow();
public:
SDL_Window* window = nullptr;
SDL_Surface* screen_surface = nullptr;
// config saved variables
WindowMode win_mode = RESIZABLE;
int screen_width = 800;
int screen_height = 600;
float screen_size = 1.0f;
private:
int win_size;
int window_option;
JSON_file* config = nullptr;
};
#endif // __ModuleWindow_H__