mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-19 07:39:19 +02:00
Merge branch 'tmj-dev' into milek-dev
This commit is contained in:
13
uilayer.cpp
13
uilayer.cpp
@@ -116,6 +116,7 @@ ui_layer::on_key( int const Key, int const Action ) {
|
||||
case GLFW_KEY_F8:
|
||||
case GLFW_KEY_F9:
|
||||
case GLFW_KEY_F10:
|
||||
case GLFW_KEY_F11:
|
||||
case GLFW_KEY_F12: { // ui mode selectors
|
||||
|
||||
if( ( true == Global.ctrlState )
|
||||
@@ -303,11 +304,17 @@ ui_layer::update() {
|
||||
|
||||
if( Global.iScreenMode[ Global.iTextMode - GLFW_KEY_F1 ] == 1 ) {
|
||||
// detail mode on second key press
|
||||
auto const speedlimit { static_cast<int>( std::floor( driver->VelDesired ) ) };
|
||||
uitextline2 +=
|
||||
" Speed: " + std::to_string( static_cast<int>( std::floor( mover->Vel ) ) ) + " km/h"
|
||||
+ " (limit: " + std::to_string( static_cast<int>( std::floor( driver->VelDesired ) ) ) + " km/h"
|
||||
+ ", next limit: " + std::to_string( static_cast<int>( std::floor( controlled->Mechanik->VelNext ) ) ) + " km/h"
|
||||
+ " in " + to_string( controlled->Mechanik->ActualProximityDist * 0.001, 1 ) + " km)";
|
||||
+ " (limit: " + std::to_string( speedlimit ) + " km/h";
|
||||
auto const nextspeedlimit { static_cast<int>( std::floor( controlled->Mechanik->VelNext ) ) };
|
||||
if( nextspeedlimit != speedlimit ) {
|
||||
uitextline2 +=
|
||||
", new limit: " + std::to_string( nextspeedlimit ) + " km/h"
|
||||
+ " in " + to_string( controlled->Mechanik->ActualProximityDist * 0.001, 1 ) + " km";
|
||||
}
|
||||
uitextline2 += ")";
|
||||
uitextline3 +=
|
||||
" Pressure: " + to_string( mover->BrakePress * 100.0, 2 ) + " kPa"
|
||||
+ " (train pipe: " + to_string( mover->PipePress * 100.0, 2 ) + " kPa)";
|
||||
|
||||
Reference in New Issue
Block a user