-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathloading_view.h
61 lines (43 loc) · 1.21 KB
/
loading_view.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
52
53
54
55
56
57
58
59
60
61
#ifndef LOADING_VIEW_H
#define LOADING_VIEW_H
#ifndef LOGIC_ONLY
#include <SFML/Graphics.hpp>
#include "game_resources.h"
#include "resource_loader.h"
#include "game_options.h"
#include "physical_controllers.h"
/// Loading screen
class loading_view
{
public:
loading_view(
const game_options& go,
const physical_controllers& cs
);
/// Run the loading, until the user quits
void exec();
auto& get_resources() noexcept { return m_resources; }
auto& get_window() noexcept { return m_window; }
/// Set the text to a uniform style
void set_text_style(sf::Text& t);
private:
/// The initial game options, as can be set in the command-line
game_options m_game_options;
/// The initial physical controllers, as can be set in the command-line
physical_controllers m_physical_controllers;
/// For loading the resources in steps
resource_loader m_resource_loader;
/// Resources
game_resources m_resources;
/// The window to draw to
sf::RenderWindow m_window;
/// Run the menu
void exec_menu();
/// Process all events
/// @return if the user wants to quit
bool process_events();
/// Show the loading on-screen
void show();
};
#endif // LOGIC_ONLY
#endif // LOADING_VIEW_H