-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from heronarts/dev
Merge release 0.2.1
- Loading branch information
Showing
24 changed files
with
585 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/** | ||
* Copyright 2018- Mark C. Slee, Heron Arts LLC | ||
* | ||
* This file is part of the LX Studio software library. By using | ||
* LX, you agree to the terms of the LX Studio Software License | ||
* and Distribution Agreement, available at: http://lx.studio/license | ||
* | ||
* Please note that the LX license is not open-source. The license | ||
* allows for free, non-commercial use. | ||
* | ||
* HERON ARTS MAKES NO WARRANTY, EXPRESS, IMPLIED, STATUTORY, OR | ||
* OTHERWISE, AND SPECIFICALLY DISCLAIMS ANY WARRANTY OF | ||
* MERCHANTABILITY, NON-INFRINGEMENT, OR FITNESS FOR A PARTICULAR | ||
* PURPOSE, WITH RESPECT TO THE SOFTWARE. | ||
* | ||
* ##library.name## | ||
* ##library.sentence## | ||
* ##library.url## | ||
* | ||
* @author ##author## | ||
* @modified ##date## | ||
* @version ##library.prettyVersion## (##library.version##) | ||
*/ | ||
|
||
package heronarts.p3lx.ui; | ||
|
||
import processing.core.PConstants; | ||
import processing.event.KeyEvent; | ||
|
||
public class UIKeyEvent { | ||
// Should never be instantiated | ||
private UIKeyEvent() {} | ||
|
||
public static boolean isCommand(KeyEvent keyEvent) { | ||
return keyEvent.isMetaDown() || keyEvent.isControlDown(); | ||
} | ||
|
||
public static boolean isDelete(KeyEvent keyEvent, int keyCode) { | ||
// NOTE(mcslee): there is serious hackiness under here, P3D surface uses | ||
// JOGL key codes, and Processing remaps the character values but not the | ||
// key codes... | ||
// | ||
// See PSurfaceJOGL hackToChar: | ||
// https://github.com/processing/processing/blob/4cc297c66908899cd29480c202536ecf749854e8/core/src/processing/opengl/PSurfaceJOGL.java#L1187 | ||
return | ||
(keyCode == java.awt.event.KeyEvent.VK_BACK_SPACE) || | ||
(keyEvent.getKey() == PConstants.DELETE); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/** | ||
* Copyright 2018- Mark C. Slee, Heron Arts LLC | ||
* | ||
* This file is part of the LX Studio software library. By using | ||
* LX, you agree to the terms of the LX Studio Software License | ||
* and Distribution Agreement, available at: http://lx.studio/license | ||
* | ||
* Please note that the LX license is not open-source. The license | ||
* allows for free, non-commercial use. | ||
* | ||
* HERON ARTS MAKES NO WARRANTY, EXPRESS, IMPLIED, STATUTORY, OR | ||
* OTHERWISE, AND SPECIFICALLY DISCLAIMS ANY WARRANTY OF | ||
* MERCHANTABILITY, NON-INFRINGEMENT, OR FITNESS FOR A PARTICULAR | ||
* PURPOSE, WITH RESPECT TO THE SOFTWARE. | ||
* | ||
* ##library.name## | ||
* ##library.sentence## | ||
* ##library.url## | ||
* | ||
* @author ##author## | ||
* @modified ##date## | ||
* @version ##library.prettyVersion## (##library.version##) | ||
*/ | ||
|
||
package heronarts.p3lx.ui; | ||
|
||
import processing.event.MouseEvent; | ||
|
||
public class UIMouseEvent { | ||
private UIMouseEvent() {} | ||
|
||
public static boolean isCommand(MouseEvent mouseEvent) { | ||
return mouseEvent.isMetaDown() || mouseEvent.isControlDown(); | ||
} | ||
|
||
public static boolean isMultiSelect(MouseEvent mouseEvent) { | ||
return mouseEvent.isMetaDown() || mouseEvent.isControlDown(); | ||
} | ||
|
||
public static boolean isRangeSelect(MouseEvent mouseEvent) { | ||
return mouseEvent.isShiftDown(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.