Quick refactor of the config system to make it easier to refactor config.cpp/hpp later.
This commit is contained in:
parent
47f659ae8e
commit
e523aa8b02
29 changed files with 138 additions and 140 deletions
|
|
@ -11,12 +11,15 @@ namespace gui {
|
|||
|
||||
MainUI::MainUI(sf::RenderWindow& window) :
|
||||
$window(window),
|
||||
$rayview(std::make_shared<Raycaster>(RAY_VIEW_WIDTH, RAY_VIEW_HEIGHT)),
|
||||
$hand(textures::get_sprite("female_hand")),
|
||||
$hand_anim(animation::load("female_hand"))
|
||||
$rayview(std::make_shared<Raycaster>(RAY_VIEW_WIDTH, RAY_VIEW_HEIGHT))
|
||||
{
|
||||
$window.setVerticalSyncEnabled(VSYNC);
|
||||
$window.setFramerateLimit(FRAME_LIMIT);
|
||||
|
||||
auto config = settings::get("config");
|
||||
|
||||
$hand = textures::get_sprite(config["player"]["hands"]);
|
||||
$hand_anim = animation::load(config["player"]["hands"]);
|
||||
}
|
||||
|
||||
void MainUI::dirty() {
|
||||
|
|
@ -34,7 +37,6 @@ namespace gui {
|
|||
$overlay_ui.init();
|
||||
}
|
||||
|
||||
|
||||
void MainUI::render() {
|
||||
if($needs_render) $rayview->render();
|
||||
$rayview->draw($window);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue