The reason I had to disable the dragging in the last one, was to get the children of a module (the ones it’s plugged into), I put a function call in the drawConnection function that collects the modules you’re passing it to connect. So, for instance, when you create a connection between box1 and box2, […]
Continue readingAuthor: sambaker
LED and Button
I’ve begun diversifying the Module class with two subclasses, LED and Button. LED will light up and button will cause its connected classes to toggle when pressed. The green module is the button and the top red one is the LED. Press the button to light the LED. The bottom two modules are just vanilla […]
Continue readingVery close to NeatTools and a new class
This seems to me to be very close to the way NeatTools handles the drawing of wires. The behavior may not be ideal, but, first step is to duplicate the existing interface. Also, I’ve started creating subclasses of the Module class. The LED class is the first example of this, and for the moment the […]
Continue readingCode Revision
I realized I was trying to implement my improvements before I’d even finished duplicating the original functionality, so for the moment, I’m removing the following two conditions case m2.x <= m1cord[2] && m2cord[1] > m1cord[5]: case m2.x <= m1cord[2] && m2cord[5] < m1cord[1]: and replacing them with with the single case: case m2.x <= m1cord[2] […]
Continue readingConnections
This is the meat of the connection method. modules (m) are referred to as m1 and m2. m1 is the sender, m2 is the receiver. the delta’s are the midpoints between modules. The coordinates of the corners of each module are held in an array (m1cord and m2cord). Starting in the top left corner and […]
Continue reading