17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-25 12:49:47 +01: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:
maj00r
2026-10-12 01:21:50 +02:00
parent 866f626668
commit f28640dd44
9 changed files with 333 additions and 23 deletions

View File

@@ -102,6 +102,8 @@ bool editorSettings::load()
parse(value, m_nodebank_card);
else if (key == "colours")
parse(value, m_palette);
else if (key == "first_steps")
m_first_steps = (value == "1");
else if (key.rfind(origin_prefix, 0) == 0)
{
// northing;easting
@@ -145,6 +147,7 @@ bool editorSettings::save()
stream << "nodebank_previews " << (m_nodebank_previews ? 1 : 0) << "\n";
stream << "nodebank_card " << m_nodebank_card << "\n";
stream << "colours " << m_palette << "\n";
stream << "first_steps " << (m_first_steps ? 1 : 0) << "\n";
stream << std::fixed << std::setprecision(3);
for (auto const &origin : m_orthophoto_origins)
stream << origin.first << " " << origin.second.first << ";" << origin.second.second << "\n";

View File

@@ -54,6 +54,9 @@ public:
int palette() const { return m_palette; }
void palette(int Palette) { m_palette = Palette; }
bool first_steps() const { return m_first_steps; }
void first_steps(bool Show) { m_first_steps = Show; }
private:
movement_scheme m_movement{movement_scheme::wsad};
orthophoto_settings m_orthophoto;
@@ -63,6 +66,7 @@ private:
bool m_nodebank_previews{true};
int m_nodebank_card{96};
int m_palette{0};
bool m_first_steps{true};
};
// global editor settings instance