-
Notifications
You must be signed in to change notification settings - Fork 0
/
Window.hpp
40 lines (33 loc) · 827 Bytes
/
Window.hpp
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
#pragma once
#include <string>
#include <SFML/Window.hpp>
#include <SFML/System.hpp>
#include <SFML/Graphics.hpp>
#include "EventManager.hpp"
class Window{
public:
Window();
Window(const std::string& title, const sf::Vector2u& size);
~Window();
void BeginDraw();
void EndDraw();
void Update();
bool IsDone();
bool IsFullscreen();
bool IsFocused();
void ToggleFullscreen(EventDetails* l_details);
void Close(EventDetails* l_details = nullptr);
sf::RenderWindow* GetRenderWindow();
EventManager* GetEventManager();
sf::Vector2u GetWindowSize();
private:
void Setup(const std::string& title, const sf::Vector2u& size);
void Create();
sf::RenderWindow m_window;
EventManager m_eventManager;
sf::Vector2u m_windowSize;
std::string m_windowTitle;
bool m_isDone;
bool m_isFullscreen;
bool m_isFocused;
};