fix: backlight setting not applying on change

This commit is contained in:
MihailRis
2024-10-15 04:58:46 +03:00
parent 4dfa235f12
commit d59fac61bb
6 changed files with 20 additions and 0 deletions
+2
View File
@@ -45,12 +45,14 @@ LevelScreen::LevelScreen(Engine* engine, std::unique_ptr<Level> level)
keepAlive(settings.graphics.backlight.observe([=](bool) {
controller->getLevel()->chunks->saveAndClear();
worldRenderer->clear();
}));
keepAlive(settings.camera.fov.observe([=](double value) {
controller->getPlayer()->camera->setFov(glm::radians(value));
}));
keepAlive(Events::getBinding(BIND_CHUNKS_RELOAD).onactived.add([=](){
controller->getLevel()->chunks->saveAndClear();
worldRenderer->clear();
}));
animator = std::make_unique<TextureAnimator>();