Skip to content

Commit

Permalink
v2.11.3.0, snap for shapes by default
Browse files Browse the repository at this point in the history
  • Loading branch information
LogisimIt committed Nov 29, 2017
1 parent 42b57a5 commit 1bf507d
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 18 deletions.
Binary file removed Compiled/Logisim-Fork-test.jar
Binary file not shown.
Binary file modified Compiled/Logisim-Fork.exe
Binary file not shown.
Binary file modified Compiled/Logisim-Fork.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion Logisim-Fork/com/cburch/draw/tools/CurveTool.java
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ private Curve updateMouse(Canvas canvas, int mx, int my, int mods) {
lastMouseY = my;

boolean shiftDown = (mods & InputEvent.SHIFT_DOWN_MASK) != 0;
boolean ctrlDown = (mods & InputEvent.CTRL_DOWN_MASK) != 0;
boolean ctrlDown = (mods & InputEvent.CTRL_DOWN_MASK) == 0;
boolean altDown = (mods & InputEvent.ALT_DOWN_MASK) != 0;
Curve ret = null;
switch (state) {
Expand Down
4 changes: 2 additions & 2 deletions Logisim-Fork/com/cburch/draw/tools/LineTool.java
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public void mousePressed(Canvas canvas, MouseEvent e) {
int x = e.getX();
int y = e.getY();
int mods = e.getModifiersEx();
if ((mods & InputEvent.CTRL_DOWN_MASK) != 0) {
if ((mods & InputEvent.CTRL_DOWN_MASK) == 0) {
x = canvas.snapX(x);
y = canvas.snapY(y);
}
Expand Down Expand Up @@ -159,7 +159,7 @@ private void updateMouse(Canvas canvas, int mx, int my, int mods) {
newEnd = Location.create(mx, my);
}

if ((mods & InputEvent.CTRL_DOWN_MASK) != 0) {
if ((mods & InputEvent.CTRL_DOWN_MASK) == 0) {
int x = newEnd.getX();
int y = newEnd.getY();
x = canvas.snapX(x);
Expand Down
4 changes: 2 additions & 2 deletions Logisim-Fork/com/cburch/draw/tools/PolyTool.java
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public void mousePressed(Canvas canvas, MouseEvent e) {
lastMouseX = mx;
lastMouseY = my;
int mods = e.getModifiersEx();
if ((mods & InputEvent.CTRL_DOWN_MASK) != 0) {
if ((mods & InputEvent.CTRL_DOWN_MASK) == 0) {
mx = canvas.snapX(mx);
my = canvas.snapY(my);
}
Expand Down Expand Up @@ -217,7 +217,7 @@ private void updateMouse(Canvas canvas, int mx, int my, int mods) {
} else {
newLast = Location.create(mx, my);
}
if ((mods & InputEvent.CTRL_DOWN_MASK) != 0) {
if ((mods & InputEvent.CTRL_DOWN_MASK) == 0) {
int lastX = newLast.getX();
int lastY = newLast.getY();
lastX = canvas.snapX(lastX);
Expand Down
2 changes: 1 addition & 1 deletion Logisim-Fork/com/cburch/draw/tools/RectangularTool.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ private Bounds computeBounds(Canvas canvas, int mx, int my, int mods) {
return Bounds.EMPTY_BOUNDS;
}

boolean ctrlDown = (mods & InputEvent.CTRL_DOWN_MASK) != 0;
boolean ctrlDown = (mods & InputEvent.CTRL_DOWN_MASK) == 0;
if (ctrlDown) {
x0 = canvas.snapX(x0);
y0 = canvas.snapY(y0);
Expand Down
2 changes: 1 addition & 1 deletion Logisim-Fork/com/cburch/draw/tools/SelectTool.java
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ private void setMouse(Canvas canvas, int mx, int my, int mods) {
lastMouseX = mx;
lastMouseY = my;
boolean shift = (mods & InputEvent.SHIFT_DOWN_MASK) != 0;
boolean ctrl = (mods & InputEvent.CTRL_DOWN_MASK) != 0;
boolean ctrl = (mods & InputEvent.CTRL_DOWN_MASK) == 0;
Location newEnd = Location.create(mx, my);
dragEnd = newEnd;

Expand Down
2 changes: 1 addition & 1 deletion Logisim-Fork/com/cburch/logisim/std/wiring/Wiring.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class Wiring extends Library {
private static Tool[] ADD_TOOLS = { new AddTool(SplitterFactory.instance), new AddTool(Pin.FACTORY),
new AddTool(Probe.FACTORY), new AddTool(Tunnel.FACTORY), new AddTool(PullResistor.FACTORY),
new AddTool(Clock.FACTORY),
new AddTool(ProgrammableGenerator.FACTORY), new AddTool(Constant.FACTORY), };
/*new AddTool(ProgrammableGenerator.FACTORY),*/ new AddTool(Constant.FACTORY), };

private static FactoryDescription[] DESCRIPTIONS = {
new FactoryDescription("Power", Strings.getter("powerComponent"), "power.gif", "Power"),
Expand Down
20 changes: 14 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ This is an italian fork based on the original Logisim version.<br>
## Changelog
* Italian translation!
* Possibility to use french translations already done (not very well)
* Autoupdates!
* New components:
* TTL gates (7400, 7402, 7404, 7408, 7432, 7447, 7485, 7486, 74165, 74283, 747266)
* I/O->Digital Oscilloscope
Expand All @@ -22,20 +23,27 @@ This is an italian fork based on the original Logisim version.<br>
* Controlled Buffer / Inverter: Negate Control Input
* Press ESC or DEL to cancel "Add Tool" action
* TTY and Keyboard components can use 16-bit values (UTF-16)
* Clock custom frequency
* Joystick facing attribute
* Added 7-Segment Display input names
* Added missing tooltips
* Zoom in and out using mouse wheel where you're pointing at
* Autoupdates!
* Big fixes to Log menu and Log output file
* Added Label Color attribute for each component with Label attribute
* Increased output limit in Analyze Circuit to 32
* Fixed empty template bug introduced in Logisim 2.7.0
* Default gates attributes: narrow, 2 inputs
* Anti Aliasing option
* Look and Feel preference
* Fixed input positions in wide gates with 4 inputs
* Changed some default value
* Anti Aliasing and Look and Feel preference
* Graphical changes
* Includes some fix from original early version 2.7.2.255
## Features we want to add
* Move to Java 9
* Solve propagation bugs not solved in the original Logisim
* Programmable clock
* Programmable Generator (95% done)
* Buzzer (75% done)
* Add a SEL input in some component
* Add a new type of library
* Draw also in circuits
* Suggest us everything at logisimit@gmail.com
## Retro-compatibility
Due to a bug in the original Logisim, wide gates with 4 inputs had a bad positioning of the ports.
Expand Down
10 changes: 6 additions & 4 deletions version.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
<!DOCTYPE xml>
<logisim>
<jar_file>https://github.com/LogisimIt/Logisim/raw/master/Compiled/Logisim-Fork.jar</jar_file>
<jar_version>2.11.2.5</jar_version>
<jar_version>2.11.3.0</jar_version>
<exe_file>https://github.com/LogisimIt/Logisim/raw/master/Compiled/Logisim-Fork.exe</exe_file>
<exe_version>2.11.2.5</exe_version>
<exe_version>2.11.3.0</exe_version>
<changelog>
* Label and Text Tool -> Added color attribute
* Added a warnin message if you open an old file with wide gates that have 4 inputs
* Added Label Color attribute for each component with Label attribute
* Analyze Circuit: max output pin limit increased to 32
* In Edit Layout window snap for shapes is now by default and CTRL disables it
* Maybe fixed some problem with Java 9
</changelog>
</logisim>

0 comments on commit 1bf507d

Please sign in to comment.