-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWindow.h
48 lines (37 loc) · 1.02 KB
/
Window.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
46
47
48
//
// Created by Sebastian2 on 1/22/23.
//
#ifndef SNAKE_GAME_WINDOW_H
#define SNAKE_GAME_WINDOW_H
#include <string>
#include <SFML/Graphics.hpp>
class Window
{
public:
// Constructors & Deconstructor
Window();
Window(const std::string& l_title, const sf::Vector2u& l_size);
~Window();
// Methods
void BeginDraw(); // Clear window
void EndDraw(); // Display changes
void Update();
void ToggleFullScreen();
void Draw(sf::Drawable& l_drawable);
bool IsDone();
bool isFullScreen();
sf::RenderWindow* GetRenderWindow();
sf::Vector2u GetWindowSize();
private:
// Methods
void Setup(const std::string& l_title, const sf::Vector2u l_size);
void Destroy();
void Create();
// Variables
sf::RenderWindow window;
sf::Vector2u windowSize;
std::string windowTitle;
bool isDone;
bool m_isFullScreen;
};
#endif //SNAKE_GAME_WINDOW_H