mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-21 11:19:19 +02:00
Merge remote-tracking branch 'manul-public/master' into manul-staging
This commit is contained in:
@@ -485,11 +485,13 @@ timetable_panel::render() {
|
||||
| ImGuiWindowFlags_NoCollapse
|
||||
| ( size.x > 0 ? ImGuiWindowFlags_NoResize : 0 );
|
||||
|
||||
// HACK: Make sure the timetable window is of correct width when using a larger font size.
|
||||
float horizontalScale = Global.ui_fontsize / 13;
|
||||
if( size.x > 0 ) {
|
||||
ImGui::SetNextWindowSize( ImVec2S( size.x, size.y ) );
|
||||
ImGui::SetNextWindowSize( ImVec2S( size.x * horizontalScale, size.y ) );
|
||||
}
|
||||
if( size_min.x > 0 ) {
|
||||
ImGui::SetNextWindowSizeConstraints( ImVec2S( size_min.x, size_min.y ), ImVec2S( size_max.x, size_max.y ) );
|
||||
ImGui::SetNextWindowSizeConstraints( ImVec2S( size_min.x * horizontalScale, size_min.y ), ImVec2S( size_max.x * horizontalScale, size_max.y ) );
|
||||
}
|
||||
auto const panelname { (
|
||||
title.empty() ?
|
||||
@@ -657,15 +659,29 @@ debug_panel::render_section_scenario() {
|
||||
{
|
||||
auto fogrange = std::log( Global.fFogEnd );
|
||||
if( ImGui::SliderFloat(
|
||||
( to_string( std::exp( fogrange ), 0, 5 ) + " m###fogend" ).c_str(), &fogrange, std::log( 10.0f ), std::log( 25000.0f ), "Fog distance" ) ) {
|
||||
( to_string( std::exp( fogrange ), 0, 5 ) + " m###fogend" ).c_str(), &fogrange, std::log( 10.0f ), std::log( 50000.0f ), "Fog distance" ) ) {
|
||||
command_relay relay;
|
||||
relay.post(
|
||||
user_command::setweather,
|
||||
clamp( std::exp( fogrange ), 10.0f, 25000.0f ),
|
||||
clamp( std::exp( fogrange ), 10.0f, 50000.0f ),
|
||||
Global.Overcast,
|
||||
GLFW_PRESS, 0 );
|
||||
}
|
||||
}
|
||||
{
|
||||
auto Airtemperature = Global.AirTemperature;
|
||||
if (ImGui::SliderFloat(
|
||||
(to_string(Airtemperature, 1) + " deg C###Airtemperature").c_str(),
|
||||
&Airtemperature, -35.0f, 40.0f, "Air Temperature"))
|
||||
{
|
||||
command_relay relay;
|
||||
relay.post(
|
||||
user_command::settemperature,
|
||||
clamp(Airtemperature, -35.0f, 40.0f),
|
||||
Global.Overcast,
|
||||
GLFW_PRESS, 0 );
|
||||
}
|
||||
}
|
||||
// cloud cover slider
|
||||
{
|
||||
if( ImGui::SliderFloat(
|
||||
@@ -1286,7 +1302,7 @@ debug_panel::update_section_scenario( std::vector<text_line> &Output ) {
|
||||
|
||||
Output.emplace_back( textline, Global.UITextColor );
|
||||
// current luminance level
|
||||
textline = "Light level: " + to_string( Global.fLuminance, 3 ) + ( Global.FakeLight ? "(*)" : "" );
|
||||
textline = "Light level: " + to_string( Global.fLuminance, 3 ) + ( Global.FakeLight ? "(*)" : "" )+ to_string(Global.SunAngle,2);
|
||||
textline +=
|
||||
"\nWind: azimuth "
|
||||
+ to_string( simulation::Environment.wind_azimuth(), 0 ) // ma być azymut, czyli 0 na północy i rośnie na wschód
|
||||
|
||||
Reference in New Issue
Block a user