-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainMenu.h
51 lines (39 loc) · 882 Bytes
/
MainMenu.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
49
50
51
#ifndef MAIN_MENU_H
#define MAIN_MENU_H
#include"stdafx.h"
#include"Image.h"
#include"Cursor.h"
namespace menu {
class Button {
private:
img::ImageFile img;
std::string fileName = "images/MainMenu/Button/";
public:
Button();
void setButtonPoint(sf::Vector2f point);
sf::Vector2u getButtonSize();
void update();
void render(sf::RenderTarget* target);
};
class MainMenu {
private:
img::ImageFile img;
std::string linkName;
std::string fileName;
sf::RenderWindow* renderWindow;
cursor::Cursor cursor;
Button start;
Button Exit;
bool bRunning = true;
void pollEvent();
public:
void setLinkName(std::string name);
void setFileName(std::string name);
void makeButton();
void setRenderWindow(sf::RenderWindow* renderWindow);
void render(sf::RenderTarget* target);
void update();
bool getRunning();
};
}
#endif//MAIN_MENU_H