-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathApplication.cpp
More file actions
42 lines (30 loc) · 833 Bytes
/
Copy pathApplication.cpp
File metadata and controls
42 lines (30 loc) · 833 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
#include "Application.hpp"
Application::Application():
window(sf::VideoMode(634, 694), "Black Wolf")
{
window.setFramerateLimit(60);
desktop.LoadThemeFromFile("gui.theme");
//icon.loadFromFile("Graphics/Boardbrown.jpg");
//window.setIcon(32,32,icon.getPixelsPtr());
}
void Application::run()
{
BoardMaster boss(window, desktop);
window.resetGLStates();
sf::Clock clock;
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
desktop.HandleEvent(event);
if (event.type == sf::Event::Closed)
window.close();
}
desktop.Update(clock.restart().asSeconds());
window.clear();
boss.display();
sfgui_.Display(window);
window.display();
}
}