mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-18 12:39:18 +02:00
feat(editor): laying track for a beginner: Ctrl+Z and Backspace during a chain of laid pieces go back to the end of the piece before instead of carrying on from a removed track (Ctrl+Y ends the chain); every warning of the laid shape and of a join is shown by the cursor for 4 s after the click, also when the radius chosen on the wheel didn't reach the cursor and the arc goes through it, the preview of a shape with a warning is orange as it is laid anyway; the switch type stays chosen after a switch is placed; the status says each click lays a piece; a "First steps" window (Help menu, opens with the editor until unticked) with eight steps ticked off as they are done; an empty scenery opens in Tracks with the camera over its origin and a grid where there is no ground under the cursor; F1 lists the laying gestures (Ctrl/Shift+wheel, drag from a free end, typed length); self-test command laychain; Polish translation
This commit is contained in:
@@ -252,6 +252,11 @@ class editor_mode : public application_mode, private editor_track::observer
|
||||
void render_help_menu();
|
||||
void render_shortcuts_window();
|
||||
bool m_shortcuts_open{false};
|
||||
enum class first_step { tracks, lay, laid, wheel, join, turnout, undo, save, count };
|
||||
void render_first_steps();
|
||||
void first_step_done(first_step const Step);
|
||||
bool m_first_steps_open{false};
|
||||
std::array<bool, static_cast<std::size_t>(first_step::count)> m_first_steps_done{};
|
||||
// deletes what's selected: a road piece or point, a signal, an include of a scenery template, a model, tracks (Del)
|
||||
void delete_selected();
|
||||
void delete_model(TAnimModel *Model, bool const Joined);
|
||||
@@ -1092,8 +1097,17 @@ class editor_mode : public application_mode, private editor_track::observer
|
||||
bool copy_selected{false};
|
||||
editor_track::path_style style;
|
||||
std::string status;
|
||||
double status_time{-100.0};
|
||||
struct step
|
||||
{
|
||||
editor_track::snap_target start;
|
||||
glm::dvec3 point{0.0};
|
||||
};
|
||||
std::vector<step> chain;
|
||||
};
|
||||
lay_tool m_lay;
|
||||
void lay_after_history(bool const Undo);
|
||||
void lay_back();
|
||||
void render_lay_ui();
|
||||
void render_lay_status();
|
||||
void lay_click();
|
||||
|
||||
Reference in New Issue
Block a user