Skip to content

Commit

Permalink
Fog-curve visual fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MihailRis committed Nov 17, 2023
1 parent 76e57c4 commit 1ed7b10
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/frontend/screens.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#include "screens.h"

#include <iomanip>
#include <iostream>
#include <memory>
#include <sstream>
#include <glm/glm.hpp>
#include <filesystem>
#include <stdexcept>
Expand Down Expand Up @@ -179,7 +181,7 @@ Panel* create_settings_panel(Engine* engine) {
std::to_wstring(engine->getSettings().chunks.loadDistance);
}));

TrackBar* trackbar = new TrackBar(0, 64, 10);
TrackBar* trackbar = new TrackBar(3, 66, 10);
trackbar->supplier([=]() {
return engine->getSettings().chunks.loadDistance;
});
Expand All @@ -191,8 +193,10 @@ Panel* create_settings_panel(Engine* engine) {

/* Fog Curve setting track bar */{
panel->add((new Label(L""))->textSupplier([=]() {
return L"Fog Curve: " +
std::to_wstring(engine->getSettings().graphics.fogCurve);
std::wstringstream ss;
ss << std::fixed << std::setprecision(1);
ss << engine->getSettings().graphics.fogCurve;
return L"Fog Curve: " + ss.str();
}));

TrackBar* trackbar = new TrackBar(1.0, 6.0, 1.0, 0.1, 2);
Expand Down

0 comments on commit 1ed7b10

Please sign in to comment.