This repository was archived by the owner on Jul 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathWindow.h
More file actions
54 lines (41 loc) · 1.21 KB
/
Copy pathWindow.h
File metadata and controls
54 lines (41 loc) · 1.21 KB
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
#pragma once
#include "../Rendering/WindowsTypes.h"
#include <SDL2/SDL.h>
#include <string>
enum class RendererMode;
class GameWindow
{
public:
bool Create(RendererMode mode, std::string title, int width, int height, int bufferWidth, int bufferHeight);
bool Destroy();
void ResizeWindow(int width, int height);
void ResizeBuffer(int width, int height);
bool ShouldResizeRenderer();
void HandleResizeRenderer();
SDL_Window *GetWindow() const;
int GetWidth() const;
int GetHeight() const;
int GetBufferWidth() const;
int GetBufferHeight() const;
float GetWidthScale();
float GetHeightScale();
void SetScaleOutput(bool value);
bool IsScaleOutput() const;
void SetWindowTitle(std::string &title);
void SetWindowSubTitle(std::string &subTitle);
static GameWindow *GetInstance();
static void Release();
private:
GameWindow();
~GameWindow();
static GameWindow *s_instance;
bool m_scaleOutput;
bool m_resizeRenderer;
int m_width;
int m_height;
int m_bufferWidth;
int m_bufferHeight;
std::string m_mainTitle;
std::string m_subTitle;
SDL_Window *m_window;
};