16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-21 13:39:18 +02:00

fog range slider

This commit is contained in:
tmj-fstate
2020-01-24 17:26:44 +01:00
parent f14b2c1343
commit 0526833e42
4 changed files with 11 additions and 5 deletions

View File

@@ -543,6 +543,12 @@ debug_panel::render() {
render_section( "Vehicle AI", m_ailines );
render_section( "Vehicle Scan Table", m_scantablelines );
if( true == render_section( "Scenario", m_scenariolines ) ) {
// fog slider
auto fogrange = std::log( Global.fFogEnd );
if( ImGui::SliderFloat(
( to_string( std::exp( fogrange ), 0 ) + " m###fogend" ).c_str(), &fogrange, std::log( 10.0f ), std::log( 25000.0f ), "Fog distance" ) ) {
Global.fFogEnd = clamp( std::exp( fogrange ), 10.0f, 25000.0f );
}
// cloud cover slider
if( ImGui::SliderFloat(
( to_string(Global.Overcast, 2 ) + " (" + Global.Weather + ")###overcast" ).c_str(), &Global.Overcast, 0.0f, 2.0f, "Cloud cover" ) ) {