In this devlog I only added things that I felt were missing. I implemented exporting the complete circuit to JSON for each component (type, position, color, inversion state) and specific properties (battery voltage, resistance value, switch state, multimeter mode), plus the wires and probes, all referenced by indexes so that everything can be reconstructed later quickly and without errors. I also implemented reverse loading; it reads the JSON, recreates all the components and ends first, then connects the wires between them in the correct order.
Shortcuts I defined: S to save, L to load.
I had left the saving and loading only sending an output to the terminal with print(), but I preferred to replace that with a visual notification on the screen itself. It’s basically a small box with a message that appears at the top saying “circuit saved” and “Circuit loaded” (in the printouts these messages still appear all in Portuguese because it’s my native language, but later in the project I intend to add support for other languages). This message disappears automatically after 2 seconds, so the user always knows that something has happened without having to look at the terminal.
With this update, I think the simulator is getting a really well-made graphical interface. Now I’ll probably work on adding the “Learn” mode, which currently only exists in the “initial” phase, which is through the terminal.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.