I want to research a way of defining graph like tracks and switches and how they relate.
Then the result of this needs to be passed to a layout function which looks at the amount of different heights and widths that we need and creates the most optimum layout for this track.
It might be that we need to manually pass some offsets as well (maybe we don't want a certain track or switch to be drawn with a huge size for readibility). I want to seperate the worker logic from the UI logic. Slint has some cool features and it is also possible to compile slint code from the backend but that would require all UI to be compiled and run which I don't like.
I do like the for loop drawing which Slint can do though, so if I can create a structure which contains proper offsets for all the elements, the drawing should be fine.
Create elements from our graph structure using our tracks/switches
Look at total amount of switches / splits to determine height levels for drawing
We left Slint for Egui for now. This allows us to simply pass our entire TrainSystem struct which will have some handy methods for possible routes and connections.
I want to research a way of defining graph like tracks and switches and how they relate. Then the result of this needs to be passed to a layout function which looks at the amount of different heights and widths that we need and creates the most optimum layout for this track.
It might be that we need to manually pass some offsets as well (maybe we don't want a certain track or switch to be drawn with a huge size for readibility). I want to seperate the worker logic from the UI logic. Slint has some cool features and it is also possible to compile slint code from the backend but that would require all UI to be compiled and run which I don't like. I do like the for loop drawing which Slint can do though, so if I can create a structure which contains proper offsets for all the elements, the drawing should be fine.