inda19plusplus / logik

Logisim clone
MIT License
2 stars 5 forks source link

Update component drawings #32

Closed weerox closed 4 years ago

weerox commented 4 years ago

The Buffer, And, Or and Xor gates has been given proper toolbuttons, the component drawing has been updated, the toolbutton image matches the component drawing and the I/O ports are now drawn according to the vector values of GetPorts().

weerox commented 4 years ago

There is still some work left to do on the icons and drawings, the buffer should be a little smaller and the Not gate has to be updated (both the GetPorts() thing and the look of it to match the buffer), but maybe we could still merge this and I'll create some issues?

weerox commented 4 years ago

Yep, I'll fix that, I did feel a little weird having the mouse float in the center of the component.

weerox commented 4 years ago

I also now realize that is how it works in the schematics software I've been using, weird that I didn't catch that before.

weerox commented 4 years ago

@NogginBops I'm fixing the mouse origin now and I noticed that orientating a component might be more intuitive without PR #33. When I changed that (which was when the mouse origin was at the center of the component) I thought that it'd be more intuitive to have the component "point" with the output pin in the direction I was pressing, i.e. left arrow should have the component pointing to the left, but now that I've changed the origin to be on the output pin, I'm tempted to orient the component as "on this side of the mouse pointer", i.e. left arrow should switch the component to the left side of the mouse pointer (pointing to the right).

What do you think? What should happen when we add components that doesn't look like it is pointing in a certain direction (i.e. Flip-Flops)? (This is what makes me think that the "left arrow -> point right" might be the way to go)

NogginBops commented 4 years ago

@weerox I'm used to the way logisim does it where the direction you pick is where the connection point at the mouse should be pointing to the direction you pressed.

I don't know if one way or the other is more intuitive, but if nothing else, people that have used logisim will be used to the way we have atm so that can be an argument for doing it that way (We could provide an option for it though).

Here is an illustration of how the direction thing works for more complex components (green ring is mouse pos with direction): image

weerox commented 4 years ago

In both those images you've pressed the right arrow?

weerox commented 4 years ago

I removed the NOT gate and replaced it with the Buffer, didn't we talk about having the NOT gate as the not-version of the buffer (as with AND and NAND) when pressing n?

NogginBops commented 4 years ago

Yeah we said that the should be the case but I still think that the not-gate should be in the toolbar because that is a lot more common to use than a buffer. So if anything we should switch the buffer in the toolbar to be a not gate.

weerox commented 4 years ago

I have updated the component origins to be at the output port and created an issue for swapping the buffer for a NOT gate. (The reason why I'd like to postpone the NOT gate swap is that I'd like to create all of the NOT versions at the same time, which might take a while)

weerox commented 4 years ago

Also, just to be completely sure, does the orientation in the master branch behave as you'd expect it to, or should they be flipped?

NogginBops commented 4 years ago

The orientations in the master branch should be correct iirc. Will check this pr later today.

weerox commented 4 years ago

Yeah, I mentioned a couple of other things above that also has to be changed, I'll create a couple of issues.