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

build 190514. partial usage of utf8 in the ui, timetable panel appeaance improvements

This commit is contained in:
tmj-fstate
2019-05-14 20:15:01 +02:00
parent 1626224dc8
commit 9cdce2d346
10 changed files with 144 additions and 55 deletions

View File

@@ -480,14 +480,14 @@ bool TTrainParameters::LoadTTfile(std::string scnpath, int iPlus, double vmax)
{
if ((TimeTable[i].Ah >= 0))
{
adjustedtime = clamp_circular( TimeTable[i].Ah * 60 + TimeTable[i].Am + timeoffset, 24.0 * 60.0 ); // nowe minuty
TimeTable[i].Am = (int(60 * adjustedtime) % 3600) / 60.0;
adjustedtime = clamp_circular<float>( TimeTable[i].Ah * 60 + TimeTable[i].Am + timeoffset, 24 * 60 ); // nowe minuty
TimeTable[i].Am = (int(60 * adjustedtime) % 3600) / 60.f;
TimeTable[i].Ah = int((adjustedtime) / 60) % 24;
}
if ((TimeTable[i].Dh >= 0))
{
adjustedtime = clamp_circular( TimeTable[i].Dh * 60 + TimeTable[i].Dm + timeoffset, 24.0 * 60.0 ); // nowe minuty
TimeTable[i].Dm = (int(60 * adjustedtime) % 3600) / 60.0;
adjustedtime = clamp_circular<float>( TimeTable[i].Dh * 60 + TimeTable[i].Dm + timeoffset, 24 * 60 ); // nowe minuty
TimeTable[i].Dm = (int(60 * adjustedtime) % 3600) / 60.f;
TimeTable[i].Dh = int((adjustedtime) / 60) % 24;
}
}