Initial start of the refactoring of gui.cpp into two classes, the gui::FSM will be used to controll all of the other UIs in the game, and evetnually will be pretty dumb.
This commit is contained in:
parent
4a1a8a7d65
commit
a7a60ad35c
6 changed files with 78 additions and 58 deletions
20
main_ui.hpp
Normal file
20
main_ui.hpp
Normal file
|
@ -0,0 +1,20 @@
|
|||
#pragma once
|
||||
#include "levelmanager.hpp"
|
||||
#include <SFML/Graphics/RenderWindow.hpp>
|
||||
|
||||
namespace gui {
|
||||
|
||||
class MainUI {
|
||||
public:
|
||||
GameLevel $level;
|
||||
sf::RenderWindow $window;
|
||||
|
||||
MainUI(GameLevel level) :
|
||||
$level(level),
|
||||
$window(sf::VideoMode({SCREEN_WIDTH, SCREEN_HEIGHT}), "Zed's Raycaster Thing")
|
||||
{
|
||||
$window.setVerticalSyncEnabled(VSYNC);
|
||||
$window.setFramerateLimit(FRAME_LIMIT);
|
||||
}
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue