17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-09 18:22:15 +01:00

fix: the bugs and vulnerabilities SonarCloud reports on PR #216

This commit is contained in:
2026-11-07 22:11:08 +01:00
parent 8e85def98f
commit 7667e5b2ec
65 changed files with 910 additions and 121 deletions

View File

@@ -5658,8 +5658,14 @@ void tutorial_signal_sketch(ImDrawList &List, ImVec2 const Low, ImVec2 const Hig
// the track seen from above: sleepers and the two rails
auto const middle{at(0.0f, 0.5f).y};
auto const gauge{height * 0.07f};
for (float x = 0.02f; x < 1.0f; x += 0.025f)
List.AddLine(ImVec2(at(x, 0.0f).x, middle - gauge * 1.6f), ImVec2(at(x, 0.0f).x, middle + gauge * 1.6f), IM_COL32(110, 90, 70, 255), 3.0f);
{
float x{0.02f};
while (x < 1.0f)
{
List.AddLine(ImVec2(at(x, 0.0f).x, middle - gauge * 1.6f), ImVec2(at(x, 0.0f).x, middle + gauge * 1.6f), IM_COL32(110, 90, 70, 255), 3.0f);
x += 0.025f;
}
}
List.AddLine(ImVec2(Low.x, middle - gauge), ImVec2(High.x, middle - gauge), IM_COL32(200, 200, 205, 255), 2.0f);
List.AddLine(ImVec2(Low.x, middle + gauge), ImVec2(High.x, middle + gauge), IM_COL32(200, 200, 205, 255), 2.0f);
auto const line{ImGui::GetTextLineHeight()};