Skip to content

Commit

Permalink
WIP #12: Selection/hover minor refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobmaxfrank committed Jan 30, 2016
1 parent ca21ce9 commit 1a11189
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions src/com/brindyblitz/artemis/engconsole/ui/damcon/Damcon.java
Original file line number Diff line number Diff line change
Expand Up @@ -283,15 +283,9 @@ public void mouseClicked(MouseEvent e) {
InternalSelectable internal = pick(e);

if (e.getButton() == 1) {
// Clear existing selection state
// Update selection state
for (InternalSelectable i : nodesToSelectabls.values()) {
i.setSelected(false);
}

// Set new selection state
if (internal != null) {
internal.setSelected(true);
System.out.println("Selecting " + internal);
i.setSelected(internal != null && i.equals(internal));
}
}
}
Expand Down Expand Up @@ -408,15 +402,10 @@ private static double clampRotationAxis(double r, double max) {
public void mouseMoved(MouseEvent e) {
InternalSelectable internal = pick(e);

// Clear existing hover state
// Update hover state
for (InternalSelectable i : nodesToSelectabls.values()) {
i.setHovered(internal != null && i.equals(internal));
}

// Set new hover state
/*if (internal != null) {
internal.setHovered(true);
}*/
}

@Override
Expand Down

0 comments on commit 1a11189

Please sign in to comment.