From a811486b538aec91113193461c65f36c18092780 Mon Sep 17 00:00:00 2001 From: maj00r Date: Thu, 22 Oct 2026 17:55:05 +0200 Subject: [PATCH] fix(editor): the pin of the signal under the mouse in the list of the signal heads stands over its name, clear of its lamps; the routes name the switches they turn off the straight at, a plural for several, and the Polish of the tooltip reads plainer --- application/editormodesrk.cpp | 10 ++++++---- lang/editor_pl.po | 15 +++++++++------ 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/application/editormodesrk.cpp b/application/editormodesrk.cpp index 5ba0c5f4..ffb08000 100644 --- a/application/editormodesrk.cpp +++ b/application/editormodesrk.cpp @@ -772,11 +772,13 @@ void srk_tool::draw_overlay() const if (m_head_hover >= 0 && m_head_hover < static_cast(m_heads.size())) { auto const &head{m_heads[m_head_hover]}; - ImVec2 foot, top; - if (projection.project(head.position, foot) && projection.project(head.position + glm::dvec3{0.0, 6.0, 0.0}, top)) + ImVec2 label; + if (projection.project(head.position + glm::dvec3{0.0, 7.0, 0.0}, label)) { + ImVec2 const foot{label.x, label.y - ImGui::GetTextLineHeight() - 8.0f}; + ImVec2 const top{label.x, foot.y - 30.0f}; drawlist->AddLine(foot, top, kHovered, 3.0f); - drawlist->AddCircle(top, 9.0f, kHovered, 0, 3.0f); + drawlist->AddCircle(ImVec2(top.x, top.y - 9.0f), 9.0f, kHovered, 0, 3.0f); } } } @@ -1193,7 +1195,7 @@ void srk_tool::render_heads() for (auto const *turnout : route.turnouts) turnouts += (turnouts.empty() ? "" : ", ") + without_stem(turnout->name(), stem_of_open()); if (false == turnouts.empty()) - text += ", " + format(STR_C("turning at %s"), turnouts.c_str()); + text += ", " + format(STR_P("off the straight at switch %s", "off the straight at switches %s", route.turnouts.size()), turnouts.c_str()); if (route.warning >= 0) text += ", " + STR("past a warning disc"); ImGui::BulletText("%s", text.c_str()); diff --git a/lang/editor_pl.po b/lang/editor_pl.po index 8b55cf7a..4202c641 100644 --- a/lang/editor_pl.po +++ b/lang/editor_pl.po @@ -10961,7 +10961,7 @@ msgid "To the end of the tracks: %.0f m" msgstr "Do końca torów: %.0f m" msgid "No signal within %.0f m" -msgstr "Żadnego semafora przez %.0f m" +msgstr "Brak semafora na %.0f m" msgid "%d km/h through the switches" msgstr "%d km/h przez rozjazdy" @@ -10969,8 +10969,11 @@ msgstr "%d km/h przez rozjazdy" msgid "%.0f km/h" msgstr "%.0f km/h" -msgid "turning at %s" -msgstr "zwrot na %s" +msgid "off the straight at switch %s" +msgid_plural "off the straight at switches %s" +msgstr[0] "w bok na rozjeździe %s" +msgstr[1] "w bok na rozjazdach %s" +msgstr[2] "w bok na rozjazdach %s" msgid "past a warning disc" msgstr "za tarczą ostrzegawczą" @@ -10991,13 +10994,13 @@ msgid "No template of its kind and mount has these lights" msgstr "Żaden szablon tego rodzaju i mocowania nie ma tych świateł" msgid "Its lights don't show all of it: %s does" -msgstr "Jego światła nie pokażą wszystkiego, %s pokaże" +msgstr "Brakuje mu świateł, pasuje %s" msgid "It has more lights than it needs: %s will do" msgstr "Ma więcej świateł, niż trzeba: wystarczy %s" msgid "LMB: fly to it" -msgstr "LPM: leć do niego" +msgstr "LPM: pokaż go w scenerii" msgid "disc" msgstr "tarcza" @@ -11033,7 +11036,7 @@ msgid "No template has the lights %s need, they got the one chosen in the Signal msgstr "Żaden szablon nie ma świateł potrzebnych dla %s, dostały ten wybrany w narzędziu Sygnalizatory: zobacz Komory semaforów" msgid "No main signal within %.0f m ahead of it to tell of" -msgstr "Przez %.0f m przed nią nie ma semafora, który by zapowiadała" +msgstr "Na %.0f m przed nią nie ma semafora do zapowiadania" msgid "It stands %.0f m before %s, less than the braking distance of %.0f m: the trains don't stop by the signal in time" msgstr "Stoi %.0f m przed %s, mniej niż droga hamowania %.0f m: pociąg nie zdąży się zatrzymać przed semaforem"