mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-30 23:40:29 +01:00
feat(editor): labels for a layman, light at the start; whole sceneries fitted to the terrain model
Labels: - every button, field, tooltip and message of the editor reread for a beginner: short nouns for the fields with the sentence in the tooltip, the less used options under More settings, one glossary (field of work, template, track, grade), sides told from directions, degrees and per mille as signs, messages built from one format string - plural forms through STR_P; the last entry of a po file is read too, and the Polish plural rule is in the header - lang/editor_pl.po: the code pass entries merged, 391 entries no code uses and 3 duplicates dropped - roads: the notes and errors naming a road translated; the build options and the layout fold the texture length, kerb sizes, traffic share, roundabout part, height over the ground and junction speed limit under More settings, the lanes start folded Grade lines fitted to the terrain model (NMT), a line or the whole scenery at once: - fit_ground: a robust fit on nodes 5 m apart; the ground parting from the line (a bridge, a viaduct, a wall) is gone past rather than followed, the bends keep off the switches as far as their curves reach, a run of bends the same way is one point of intersection, a curve with no room is as sharp as the room lets it be - the ends of the line and the other paths of its switches leading into lines fitted already bound the line by what the tracks between can climb; ends meeting in the plan, laid apart in height by hand, are joined before the run - apply_profile: the paths are split where split_path takes the parameter (a straight was cut in the wrong place, into pieces of a few centimetres the game takes for zero length), no piece shorter than the margin; the paths off the ends of the route are brought to its height - Bytom: 1600 lines, grade breaks at the joints 89 -> 20; Tarnowskie Gory: 848 lines, 223 -> 3; no step over 2 cm
This commit is contained in:
@@ -83,7 +83,7 @@ inline std::string narrowed(std::vector<segment_data> const &Pieces, editor_trac
|
||||
|
||||
inline std::string describe(editor_track::straight const &Line)
|
||||
{
|
||||
return format("L %.2f m az %.4f deg i %.2f per mille %zu paths", Line.length, Line.azimuth, Line.grade * 1000.0, Line.tracks.size());
|
||||
return format(STR_C("L %.2f m azimuth %.4f deg grade %.2f per mille %zu paths"), Line.length, Line.azimuth, Line.grade * 1000.0, Line.tracks.size());
|
||||
}
|
||||
|
||||
inline char const *point_label(editor_track::point_kind const Kind)
|
||||
@@ -107,6 +107,7 @@ double const kLineReach{2000.0}; // how far each way the Curve tab follows the l
|
||||
double const kDigitizeFit{0.5};
|
||||
double const kDrawnReach{100000.0};
|
||||
double const kJointRange{400.0}; // the ends of the paths are drawn for the tracks this close to the camera
|
||||
double const kDotsRange{500.0}; // m, the dots of the ends of the tracks are drawn this close to the camera in the 3D view
|
||||
ImU32 const kJointColor{IM_COL32(255, 255, 255, 200)};
|
||||
int const kRailCategory{1};
|
||||
|
||||
@@ -151,7 +152,7 @@ inline double switch_from(editor_track::straight const &Line, double const Lengt
|
||||
|
||||
inline std::string link_summary(editor_track::snap_target const &Target, editor_track::branch_link const &Link, double const Switchradius)
|
||||
{
|
||||
auto const name{Target.track != nullptr && false == Target.track->name().empty() ? Target.track->name() : std::string{"(noname)"}};
|
||||
auto const name{Target.track != nullptr && false == Target.track->name().empty() ? Target.track->name() : std::string{STR_C("(no name)")}};
|
||||
auto text{Link.reverse ? format(STR_C("The branch leads into %s with reverse curves R %.0f m"), name.c_str(), Link.radius) :
|
||||
Link.radius > 0.0 ? format(STR_C("The branch leads into %s with an R %.0f m curve"), name.c_str(), Link.radius) : format(STR_C("The branch leads straight into %s"), name.c_str())};
|
||||
if (Link.insert > 0.0)
|
||||
@@ -226,7 +227,7 @@ inline char const *type_name(TTrack const &Track)
|
||||
case tt_Cross: return "cross";
|
||||
case tt_Table: return "turntable";
|
||||
case tt_Tributary: return "tributary";
|
||||
default: return "unknown";
|
||||
default: return "unknown type";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user