17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-29 03:27:30 +01:00

feat(editor): zoomed in from above, the curves are labelled with their radius and length and the switches with their name and type

In the top view at a metre a pixel or closer, each curved track of 5 m or more gets "R 600  L 120" by its middle and each
switch its name and its type from the kept switch record ("Rz 60E1-300-1:9 P") by its start, on a dark plate as on a plan.
A label which would cover another one is left out, the switches going first and then the sharper curves. View > Track labels
in the top view switches them off.
This commit is contained in:
maj00r
2026-10-21 17:51:45 +02:00
parent 6a5f0d735d
commit 8171bdc7d5
4 changed files with 76 additions and 0 deletions

View File

@@ -1574,6 +1574,9 @@ class editor_mode : public application_mode, private editor_track::observer, pri
enum class track_colouring { plain, radius, speed, grade };
track_colouring m_track_colouring{track_colouring::plain};
void draw_track_legend() const;
// the radii and lengths of the curves and the names and types of the switches written by them, from above, as on a plan
bool m_track_labels{true};
void draw_track_labels() const;
void draw_track_hover() const;
struct track_intent
{