mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-29 04:37:30 +01:00
feat(editor): laying and editing the track as a beginner meets them: the points clicked and not laid yet named at the top of the panel with Lay (Enter) and Drop the points, Enter shown by the bar at the bottom while there are some, and a first Esc over them only warning, the second one dropping them; the readout by the cursor kept in the 3d view, on the other side of the cursor where the view ends, with only the first warning of a curve and how many more the panel lists; the grid, the labels and the lines drawn over the view no longer seen through the docks; the gizmo in the tracks hidden until Q, W or E or its buttons above the view bring it out, an arrow there hiding it again, so a selected track isn't moved by chance; the radius of the curves at the bends headed so in the panel, the laid line told in metres and pieces, the hints of the select tool and of a straight shifted around an obstacle translated. An empty scenery opens facing north, the top view with the north up as the compass and the orthophoto have it (on LK2 Warszawa Wschodnia left, Rembertow right). The tutorial tells the laying as it works now: the bends clicked and Enter, the curves made at them and orange where too sharp for the speed, Tab for a curve traced, the radius by Ctrl+wheel when joining, the gizmo by Q W E, the terrain model loaded and fitted from the panel of the tracks, signals by I; its texts wrap to a dock it's put in, new clips of laying and of the curves, recorded with the selftest badge drawing the mouse or the key in use; the empty scenery and the shortcuts say the same
This commit is contained in:
@@ -810,6 +810,8 @@ class editor_mode : public application_mode, private editor_track::observer, pri
|
||||
void choose_work_area(work_area const Area);
|
||||
void render_workspaces();
|
||||
bool m_gizmo_enabled{true}; // master switch for the in-viewport gizmo
|
||||
bool m_track_gizmo_on{false}; // the gizmo in the tracks: off until Q, W or E, so a track isn't moved by chance
|
||||
bool gizmo_shown() const; // the switch of the field of work in use
|
||||
bool m_gizmo_using{false}; // tracks an ongoing drag, so a single undo snapshot is taken per drag
|
||||
bool m_gizmo_local{false}; // manipulate in the object's local space instead of world space
|
||||
gizmo_operation m_gizmo_op{gizmo_operation::translate}; // current transform mode (translate/rotate/scale)
|
||||
@@ -1479,6 +1481,7 @@ class editor_mode : public application_mode, private editor_track::observer, pri
|
||||
std::string status;
|
||||
double status_time{-100.0};
|
||||
std::string skew; // what Alt turned the straight to
|
||||
double escape_time{-100.0}; // when Esc was pressed over points not laid: the second Esc drops them
|
||||
struct step
|
||||
{
|
||||
editor_track::snap_target start;
|
||||
@@ -1494,6 +1497,8 @@ class editor_mode : public application_mode, private editor_track::observer, pri
|
||||
TTrack const *skew_reference(glm::dvec3 const &From, glm::dvec3 const &To, double const Reach) const;
|
||||
void lay_after_history(bool const Undo);
|
||||
void lay_back();
|
||||
void lay_escape();
|
||||
std::size_t lay_pending() const; // the points clicked and not laid yet
|
||||
void render_lay_ui();
|
||||
void render_lay_status();
|
||||
void lay_click();
|
||||
@@ -2323,6 +2328,8 @@ class editor_mode : public application_mode, private editor_track::observer, pri
|
||||
int wait{0};
|
||||
bool quitting{false};
|
||||
scripted_input input;
|
||||
std::string badge; // the mouse or the keys drawn over the view, for the clips of the tutorial
|
||||
glm::vec2 badge_at{0.0f}; // its bottom left corner, in the pixels of the window
|
||||
};
|
||||
selftest m_selftest;
|
||||
using selftest_result = editor_selftest_result;
|
||||
|
||||
Reference in New Issue
Block a user