Highlighting of wires
When working with a complicated circuit containing many wire connections it can be difficult to see exactly where wires go from A to B.
So I added a feature where all the wires to and from a part are highlighted in orange as the mouse is passed over it.
This needed quite a lot of code and the creation of new functions and refactoring of others. Also, I tried a couple of other ways to do it such as placing controls over each pin to make use of the signals of a Control
node. Unfortunately, we cannot access the pins as nodes.
It was really difficult and time-consuming to come up with a good way to place these controls over the pins. They ended up being a Contol
node with a child ColorRect
node. But it caused problems with the operation of making connections to the GraphNode
. Especially when zoomed in. Something to do with fighting over the signals I guess.
One of the difficulties was to maintain the precise size of the rectangle of the control since parent nodes try to resize the children.
In the end it was best to simply respond to mouse_entered
and mouse_exited
signals on the part and give up trying to highlight individual wires.
Highlighting individual wires is possible, but you need to translate the mouse coordinates to the nearest pin location, and then simulate entered
and exit
conditions. This is how I started out, but it seems very inefficient to me.
More Devlog entries
Most recent first
- 2021 10 02 New Release of Digital Logic Simulator
- 2021 08 28 Nested Sub Blocks
- 2021 08 27 Debugging with a log file
- 2021 08 26 Testing Circuit Blocks
- 2021 08 24 Bug Fixing with Blocks
- 2021 08 22 Debugging Circuit Blocks
- 2021 08 21 Circuit Blocks Update
- 2021 08 18 Circuit Blocks
- 2021 08 12 Adding Tutorial Content
- 2021 08 07 Numbers Scene
- 2021 08 06 Numbers Tabbed Scene
- 2021 08 04 Number Display Widget
- 2021 07 26 Logic Simulator Update
- 2021 07 24 - Launch of V1.0
- 2021 07 23 - Truth Tables
- 2021 07 22 Progress Update
- 2021 07 21 - Simple Computer Simulation
- 2021 07 16 - Community Forum
- 2021 07 15 - Community News
- 2021 07 11 - Save and Load ROM Data
- 2021 07 09 - Documentation About The Logic Simulator
- 2021 07 08 - Big Progress
- 2021 07 07 - RAM and ROM Testing Complete
- 2021 07 06 - Implementing Tests
- 2021 07 05 - Cool algorithm for binary text string
- 2021 07 04 - Debugging Complex Situations
- 2021 06 30 - End of June - Refactoring Continues
- 2021 06 29 Community
- 2021 06 28 Implementing More OOP
- 2021 06 27 Memory Parts
- 2021 06 26 Improving the Memory Manager
- 2021 06 25 Memory Data
- 2021 06 24 Memory Management
- 2021 06 23 First Devlog Entry