-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUserInterface.h
More file actions
53 lines (35 loc) · 1020 Bytes
/
UserInterface.h
File metadata and controls
53 lines (35 loc) · 1020 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
#pragma once
#include <SFML/System.hpp>
#include <SFML/Graphics.hpp>
#include <SFML/Window.hpp>
#include <SFML/Audio.hpp>
#include <iostream>
#include <sstream>
class UserInterface
{
private:
public:
UserInterface();
UserInterface(float resolutionWidth, float resolutionHeight);
~UserInterface();
sf::Font fonts;
sf::Text titleText;
sf::Text inGameText;
sf::Text endGameText;
sf::Text tryAgainText;
sf::Text winGameText;
sf::Text easyModeText;
sf::Text normalModeText;
sf::Text hardModeText;
sf::RectangleShape easyButton;
sf::RectangleShape normalButton;
sf::RectangleShape hardButton;
sf::RectangleShape tryAgainButton;
float resolutionWidth;
void initFont();
void initText(float resolutionWidth, float resolutionHeight);
void initButtons(float resolutionWidth, float resolutionHeight);
void updateGUI(bool winGame, bool gameOver, int playerPoints, int playerHP);
void renderGUI(const bool& startGame, const bool& gameOver,
const bool& winGame, sf::RenderTarget& target);
};