maj00r
4ea2f4f13f
feat(editor): the kept alignments and switches after a drag of the gizmo or of a point: a line all of whose paths are moved or turned as a whole takes its kept design along; paths pulled out of a kept design, or given another cant, are told about on the status line with the way back; a switch moved or turned as a whole keeps its type and its record follows it, with its km; a switch bent out of the shape of its type loses it and is told about (//$r records keep the shape of the switch); all of it in the same undo step as the drag; Polish translation
2026-10-11 21:33:28 +02:00
maj00r
ddb637a3f5
feat(editor): undo and redo take back the kept alignments and switches together with the paths: each step of the history keeps the //$h and //$r records from before it; a deleted switch or slip forgets its record in the same step, so undoing the deletion brings it back; edits of the switch number, rail and km and forgetting a kept design stay outside the history; self-test commands deleting paths
2026-10-11 21:33:28 +02:00
maj00r
b466755a0f
feat(editor): single slip (Rkp 1:9 R190/R300) joining the pair of tracks on the side of the click, and crossing (Skrz 1:9, 1:12) of two straights, placed as the double slip is, at a crossing of two straights, and kept in the scenery as //$r records with their parts; the list of the slip switches and crossings; Polish translation
2026-10-11 21:33:27 +02:00
maj00r
0bfb8a4e7c
feat(editor): switches kept in the scenery as //$r lines: type (Rz, arc Rlj/Rld, slip Rkpd), rail, R, 1:n, side, a, b, R of the main track, the parts of a slip, km and number, catalogue or measured; recorded as they are placed on a straight, in a curve (one-sided when diverging to the side the curve turns to), as a double slip, and when their geometry is replaced or flipped; the switch panel shows the kept type and the R of the diverging track bent with the main one, with the number, rail and km to edit (km from the kept horizontal alignment); the speed check of a diverging track takes its R from the kept type; records follow renamed switches and go with removed ones on save; editor records stay out of the terrain files (.txtf), and those written there by hand go with them into .btf; the side of the diverging track shown as seen; self-test commands for placing switches, the kept switches and the .btf conversion; Polish translation
2026-10-11 21:33:27 +02:00
maj00r
572daeb274
feat(editor): the horizontal alignment designed in the route design kept in the scenery as //$h lines: its vertices and the elements they make (straight, transition, arc, with the radius at the start and the end and the cant), so the paths laid by it are known again without guessing from their curvature; a curve read from the paths takes the radius, the transitions, the cant and the compound arcs of the kept design when its paths lie on it within 2 cm, the other way round too; the whole line design taken back when the fragment has its ends; a curve redesigned alone taken into the line it belongs to; km of the start kept with the design and carried on to the vertical profile of the same paths; paths which no longer follow the kept design shown in the route window, with the kept design to take or to forget; self-test commands for the route design and the kept alignments; Polish translation
2026-10-11 21:33:27 +02:00
maj00r
f0ccd375a0
feat(editor): a switch joined to a track goes along with it as a whole when the gizmo moves, turns or tilts the track
...
The switch, with the switches joined to it, keeps its shape and one grade over its whole length: it is moved,
turned and tilted to the end of the track, and the tracks at its other ends follow it.
2026-10-11 21:33:27 +02:00
maj00r
fe9d78b172
fix(editor): a switch takes the cant set by the gizmo on a track joined to it
...
Canting a track at its joint with a switch cants the whole switch, its diverging path goes onto the new cone,
and the tracks joined at the other ends of the switch follow it and take the cant at their joints.
2026-10-11 21:33:27 +02:00
maj00r
c722e4e419
fix(editor): the gizmo keeps the diverging path of a switch on the surface of its main path
...
The diverging path p3-p4 takes its heights, grades at the ends and cant from the main path p1-p2 (the cone of
its cant) after every gizmo change: grade and cant rings, moving an end and editing a control vector. The tracks
joined to it follow its ends and grades. The grade ring measures along the main path and the gizmo stands in its
middle; the start vector of the diverging path slides along the main one and turns with it.
2026-10-11 21:33:27 +02:00
maj00r
34941822ff
fix(editor): the cant ring works on a control vector, it cants the end of the vector and the tracks joined there
2026-10-11 21:33:27 +02:00
maj00r
a756beb34b
feat(editor): track gizmo rings along the track: direction, grade and cant
...
The rotate gizmo stands along the track. The cross ring changes the grade about the middle or the selected
end, the joined tracks take the grade at the joints; the ring along the track changes the cant of the track
or of the selected end, the joined tracks take it at the joints and ramp it. On a control vector the cross
ring tilts it up or down. Ctrl steps by 5 degrees, 1 per mille, 5 mm.
2026-10-11 21:33:27 +02:00
maj00r
b486eb33d5
fix(editor): a track lengthened past 90 degrees goes on as new tracks instead of hidden paths
...
A regular track draws and saves only its first path; the pieces of a lengthened curve past the first
are now tracks of their own, made and dropped while dragging, taken back by one undo.
2026-10-11 21:33:27 +02:00
maj00r
89678ead3e
feat(editor): track gizmo turns, lengthens and edits the control vectors, joined tracks keep the tangent
...
W turns the track (about its middle or the selected end) and a selection of tracks, the joined tracks follow.
E lengthens the track at its free end: a straight stays straight, an arc keeps its radius, cant and grade.
The gizmo on a control point moves, turns or lengthens the vector; the control point of the track joined
there turns with it, at a switch the vector only slides along the switch. Straight neighbours dragged along
keep their tangents and become straight again when nothing bent them.
2026-10-11 21:33:27 +02:00
maj00r
2beae15390
feat(editor): laying with no ground under the cursor takes the height of the ground around
...
- with nothing under the cursor the height is the mean of the ground found on the nearest ring around the point, 10 to 400 m out, plus the depth of the ballast, instead of 0; the ray of the cursor meets that height
- the ground under the cursor is looked for up to the height of the camera, not only 50 m over the last point
2026-10-11 21:33:27 +02:00
maj00r
0f3004a64c
fix(editor): no crash laying track with the mouse outside the window
...
- with no position of the mouse the ray gave NaN and the ground under it was looked up in a grid cell out of range; the lay and drag tools keep the last cursor then, the ground is not asked about points which are not numbers
2026-10-11 21:33:27 +02:00
maj00r
6284f4e0d3
feat(editor): laid track follows the ground between the clicks
...
- the height along the new track is a smooth curve through points on the ground under the foot of the ballast, added where the track would hang or sink more than 0.1 m, at least 10 m apart; the paths are cut there, each joint keeps one grade on both sides
- the clicked ends and the free ends joined keep their height and grade as before; no grade limits
- self-test layclicks: how far the foot of the ballast goes over and under the ground along the paths laid
2026-10-11 21:33:27 +02:00
maj00r
cfc2b2c64a
feat(editor): laid track stands on the ground with the foot of its ballast
...
- each click of the lay tool and the end of a drag out of a free end take the height of the ground under the lower foot of the ballast plus its depth, the rails never under the ground at the axis
- heights between the clicks follow a curve which keeps the grade of the track laid from at the joint and leaves with the grade of the chord, onto a free end with the grade of that track; no grade limits
- the cursor follows the ground along its ray instead of the level of the last point
- self-test layclicks: heights of the ground and the track, grades and grade breaks at the joints
2026-10-11 21:33:27 +02:00
maj00r
3a549e76a9
feat(editor): Shift no longer forces a straight while laying
...
- laying, dragging out of a free end and the curve of a switch go on with the shape chosen; a straight is the straight layout on Shift+wheel, at a diverging end of a switch it also stops the crossover
- hints without Shift: straight
2026-10-11 21:33:27 +02:00
maj00r
55bb48e8bd
feat(editor): laying from the ground goes on like laying from a free end
...
- the second click of the lay tool lays a straight from the first point and goes on from its end, each next click lays the shape chosen (arc then straight, straight then arc, arc through the cursor, straight) with the radius on Ctrl+wheel, as from a free end; no polyline of vertices cut into pieces of the longest path any more
- a track started on the ground and ended at a free end is the shape pulled out of that end towards the start point, one path per up to 90 degrees of arc
- hints and readout the same for both; self-test command layclicks
2026-10-11 21:33:27 +02:00
maj00r
16c1ac4c7b
feat(editor): two free ends joined without loops or forced curves, the shape from a free end on the wheel
...
- the join of two free ends (a drag from one onto the other, or a click of the lay tool on it) tries in turn: a straight when the joints check can't see the kinks (half its angle), one circular arc through both ends (a piece cut out of a curve comes back as it was, its cant kept), a curve with straights where the tangents meet, a reverse curve, and only then a free Bezier curve; a curve turning more than it needs to, sharper than 10 m or longer than three chords is never taken
- the transition curves eased out of a curved neighbour only when there's room for them between the ends, never crossing each other into a loop
- cant and transition curves recommended for the radius the curve really gets, at the speed of the joined track or of the tool and never above what the radius allows; the circular arc keeps at least max(20 m, 0.4 V) between the transitions, the cant lowered to what the shortened transitions can ramp, transitions under 1 m left out
- shapes from a free end: arc then straight, straight then arc, arc through the cursor, straight; Ctrl+wheel steps the radius, Shift+wheel the shape (at a free end: the other joins), the plain wheel still zooms; a click of the lay tool from a free end lays the shape and goes on from its end
- self-test commands join, layto and joints; Polish translation
2026-10-11 21:33:27 +02:00
maj00r
e910615bf6
removed draw limit in track editor
2026-10-09 15:37:23 +02:00
5160ffb87d
Windows macro fixes
2026-10-09 13:30:21 +02:00
ff25e71e90
Merge branch 'feat/modern-editor' into feat/mini-generation
2026-10-09 13:13:33 +02:00
3e3317d26f
feat(editor): the toolbar as buttons with icons and names, the chosen tool standing out as the chosen field of work does, the names left out when the row is too narrow for them; the fields of work with icons of their own (surroundings, tracks, roads, terrain) and both rows captioned at their left end (work modes, tools); the tools of the toolbar and of the left edge of the 3d view from one list; Polish translation
2026-10-09 12:49:45 +02:00
f2e73812d9
feat(editor): View menu with the top view, the lanes of the roads, the structure gauge and a window of the weather and time (time of day, day of the year, visibility, clouds, air temperature, seen in the editor only); the orthophoto settings in a window of their own again; the tracks and roads menus left out, their tools being in the row of the field of work; End drops the models onto the same ground the insert puts them on, the terrain tile models and the terrain patches of the editor included; the loading screen kept in the main window; Polish translation
2026-10-09 11:46:42 +02:00
f94100ffe7
feat(editor): more models selected at once (Shift+LMB), moved and turned by the gizmo together, undone in one step; Ctrl+C / Ctrl+V copy the selected models with their groups and paste them at the cursor; Ctrl+G groups the selection, Ctrl+Shift+G takes a group apart, groups written to the scenery as group ... endgroup and loaded as groups of their own; End drops each model of the selection and of their groups onto the ground; menu of the selection at the cursor on Ctrl+RMB; Edit menu with undo, redo, the clipboard, grouping, deleting; Help > Keyboard shortcuts (F1) with the keys of every field of work, F2-F5 choose the fields of work, the tracks menu lists the track tools with their keys, the keys and descriptions in the menus and tooltips; self-test commands for the selection; Polish translation
2026-10-09 01:12:46 +02:00
791d5d052c
feat(editor): fields of work in a row of their own over the toolbar (surroundings, tracks, roads, terrain), twice as high, with bigger bold text, and the tools of the one chosen in the toolbar under it: the edit modes of the node bank, the track tools in groups with the vehicle and the structure gauge, the road tools with what the place tool puts, the terrain tools (sculpt, smooth, chunks, orthophoto); the tool options window keeps the settings of the tool; the node bank shows a big preview of the entry pointed at for a moment, with its model and skin; the green colours by default again; Polish translation
2026-10-09 00:42:17 +02:00
4e69d8f86c
feat(editor): fields of work chosen in the toolbar, one at a time: edit modes, tracks, signals, vehicle, roads, terrain; Toolset split into Tool options (tools of the field of work and the gizmo), Inspector (what it has selected: node with array and bend, path, road) and Node bank (list only); Scene window with the models of the scenery by layer and group, filtered by name or uuid, a click selects, a double click flies the camera to it; track window replaced by a palette of the track tools in groups (build, by the track, checks) with the tools under it, the selected path in the inspector, results of the speed, joints and infrastructure checks in a docked window; road window split into the tools in tool options and the selection in the inspector; terrain tools moved out of the editor settings into tool options together with the orthophoto settings (map menu opens them), leaving the terrain puts sculpting and chunk editing away; default layout: tool options and scene on the left, inspector on the right, node bank and checks at the bottom; Polish translation
2026-10-08 22:41:51 +02:00
maj00r
c3dc7511e1
widen parallel snap and show 4 / 4.5 / 4.75 m
2026-10-08 22:17:48 +02:00
maj00r
95d4581da2
pan ortho view with middle mouse
2026-10-08 22:00:04 +02:00
maj00r
7618dcda59
hint parallel snap while shifting a straight
2026-10-08 21:59:36 +02:00
maj00r
4d7f5f0f0c
move parallel track to lay and selection
2026-10-08 21:56:28 +02:00
60c7250683
feat(editor): docked layout: windows of the editor docked around the 3d view (dockspace over the main window, default layout built when there's none or on Mode windows > Reset window layout), menu shown all the time, toolbar with the edit modes, track and road windows, gizmo operations and the top view, status bar with the outcome of the last operation and the selected node; dockspace submitted also when the frame was started by the ui of another mode, so docked windows don't come undocked on the change of mode; stable ids of the editor windows, no auto resize of the dockable ones; hints of the track and road tools placed in the part of the window the 3d view is seen in; Polish translation
2026-10-08 21:39:31 +02:00
maj00r
c186b82e5a
lay track - better visual info about curvature
2026-10-08 21:05:16 +02:00
476f3bf1b7
feat(ui): panels can be docked together and dragged out of the simulator window into windows of their own (imgui multi-viewports, ui.viewports yes by default, off where the renderer or the platform can't do it, e.g. wayland); imgui coordinates kept relative to the main window by the glfw backend, so the overlays, picking and gizmo of the editor work unchanged; overlays of the 3d view drawn on the main viewport; keys pressed in the separate windows passed on to the simulator, so the shortcuts of the editor work there too
2026-10-08 21:04:58 +02:00
maj00r
14e916e81f
prevent collecting all switches from scenery at start of tool
2026-10-08 19:35:28 +02:00
maj00r
b02fe0ac2b
feat(editor): Signals mode of the Tracks window (H): semaphores, block, warning, shunting, stop, substitute signals and repeaters placed by the track from the templates of the scenery, described by //$e signal: (kind, mount, lamps, lean, the event the train reads them by) which tools/editor/signal_headers.py writes into them; a click by a track puts the signal on that side 2.25 m from the axis at the rail heads, facing the trains which have it on their right, a drag along turns it to the trains going the way of the drag; its (p1)_sem_info goes to event1 or event2 of the path, warning signals and repeaters, which the train doesn't read, get none; a head leaning away from the track swapped for its counterpart; the plate named like the signal; signals dragged along the track with their event, removed with it, renamed in the node properties with it, each a single step of the undo history; Polish translation
2026-10-08 03:12:16 +02:00
maj00r
01949425ac
feat(editor): track laid on past the diverging end of a switch keeps the cant of its end along with its radius and grade
2026-10-08 01:54:29 +02:00
maj00r
898b4fcaf7
feat(editor): switch drive placed with a switch leans with the grade and the cant of the track at the points, raised as the simulation raises a canted track
2026-10-08 01:53:34 +02:00
maj00r
095dae91b6
fix(editor): track laid on past the diverging end of a switch goes on with the radius of the real diverging path, a switch placed into a curve stores the radius its diverging path really has instead of the one of the template
2026-10-08 01:50:00 +02:00
maj00r
a5ade3258f
fix(editor): a curve with a switch in it read as one curve through the main track of the switch, the switch placed into a curve on the part around the click; the diverging path of a switch placed into a canted curve lies on the conical surface of the cant along its whole length, not only at its ends; platforms by a switch keep the cant of the track for their height, the gauge of the other path only sets them back
2026-10-08 01:39:35 +02:00
maj00r
d4791f6a29
feat(editor): a model or an include standing by a track bent along it (B, or the Bend along the track section of the toolset): it stays where it stood and follows the track, through the joined tracks as far as it reaches; reference point at its start, origin, middle, end or a point picked on the model, across at its origin, the side facing the track, the far side or its middle, up at its origin, bottom, top or the top of its edge by the track; the blue cross of a bent model dragged for its offset, with Shift for its height and with Ctrl along the track, the values shown at the cursor; a bent model clicked to edit; one step of the undo history; scale of the model kept, parts lit only at night left out; edges of platforms told by the name of the model and by the overhang of their edge over the foot: put 1.725 m from the axis at the height the name gives, turned with the edge to the track when they stood the other way; platforms stand on the plane of the rail heads carried on to their edge (PKP PLK ST-T2), the gauge widening led in from the tracks beyond the ends and from the other path of a switch; gaps between the pieces of a sweep filled with the paths which join them; Platforms and models tab left out of the track editor; laid track eased into the curvature of the one it joins with a transition curve; File > Open scenery... starts the editor again with the scenery picked from a list; the camera saved with the scenery; T and Shift+T turn each turntable to its next and previous position by event launchers written on each save; a turntable track deleted with its template; a scenery with no trainset gets a WMB10 on its first track; vehicle placed where the track is clicked; gauge check takes in the bent models; Polish translation of the editor
2026-10-08 00:51:40 +02:00
maj00r
24923dd472
feat(editor): track editor driven by what the cursor is over: the outline and a label show what a click or a drag does, snapping to free ends on the screen, handles and ends dragged directly, no rotation gizmo; laying from a free end the same in every mode, straight with Shift, the curve of a switch going on past its diverging end; height 0 where there's no terrain; placed switch leaves the switch mode, double slips listed apart, a drive of the switch placed with it by the //$e switch description of its template; compound curves of any number of radii; dragged end of a straight fits the curve beside it; name of a path, followed by the memory cells and the includes taking it; turntable placed from a template described as one, tracks led out of it and the tracks around fitted to it, its positions written to the include; infrastructure bound to the path whose events read its memory cell; terrain made where the route has none and shaped to the formation under the ballast; models along the track over the selected path and on along the joined ones while dragged, rarely used settings folded; vehicles and trainsets placed on any path, switches included, facing the way the arrow shows; joined paths spread into the selection; New scenery in the File menu starts the editor again with the wizard; ortho zoom towards the cursor; scripted self tests; Polish translation
2026-10-06 22:19:54 +02:00
maj00r
3731520e33
feat(tracks): track editor in one movable Tracks window with exclusive modes, a guide of what can be done in the current step and the rarely used fields folded; vertical profile window with the ground of the scenery triangles; plain pieces added at a free end, freehand only on request; curve mode edits the single curve clicked
2026-10-05 01:21:11 +02:00
maj00r
9bd8226c51
Fix the GCC 13 and MSVC builds: no brace-initialised reference from reference_wrapper, no near/far names
2026-10-04 02:49:05 +02:00
maj00r
d57215877f
feat: structure gauge window in the menu bar, gauge tunnel around the hit, fixed reach
2026-10-04 01:54:17 +02:00
maj00r
b0c363b586
feat: structure gauge along the line of the selected path in the OpenGL view
2026-10-04 01:27:41 +02:00
maj00r
661c211b2e
feat(editor): tooltips of the track fields, textures applied on leaving the field
2026-10-04 01:04:41 +02:00
maj00r
17725b6527
feat(editor): mode bar of the track window, key hints and values of the change at the cursor
2026-10-04 01:01:49 +02:00
maj00r
c95c374082
refactor(editor): split the route design panel
2026-10-04 00:47:00 +02:00
maj00r
0879f1528e
refactor(editor): named overlay colours
2026-10-04 00:43:41 +02:00