diff --git a/VERSION b/VERSION
index f80b3b0..0eb2224 100644
--- a/VERSION
+++ b/VERSION
@@ -1,3 +1,8 @@
+0.2.3
+November 30, 2021
+- Add support for custom model view layer, per-channel view settings
+- Add generic support for dynamic modulator classes, both global and per-device
+
0.2.2
November 22, 2021
- Refactor to LXFixture output layer
diff --git a/assets/icons/icon-view.psd b/assets/icons/icon-view.psd
new file mode 100644
index 0000000..267bd9e
Binary files /dev/null and b/assets/icons/icon-view.psd differ
diff --git a/build/ant-contrib-1.0b3.jar b/build/ant-contrib-1.0b3.jar
deleted file mode 100644
index 0625376..0000000
Binary files a/build/ant-contrib-1.0b3.jar and /dev/null differ
diff --git a/build/build.properties b/build/build.properties
deleted file mode 100644
index 49361e0..0000000
--- a/build/build.properties
+++ /dev/null
@@ -1,157 +0,0 @@
-# Create libraries for the Processing open source programming language and
-# environment (http://www.processing.org)
-#
-# Customize the build properties to make the ant-build-process work for your
-# environment. How? Please read the comments below.
-#
-# The default properties are set for OSX, for Windows-settings please refer to
-# comments made under (1) and (2).
-
-
-# (1)
-# Where is your Processing sketchbook located?
-# If you are not sure, check the sketchbook location in your Processing
-# application preferences.
-# ${user.home} points the compiler to your home directory.
-# For windows the default path to your sketchbook would be
-# ${user.home}/My Documents/Processing (make adjustments below).
-
-sketchbook.location=${user.home}/Documents/Processing
-
-
-
-# (2)
-# Where are the jar files located that are required for compiling your library
-# such as e.g. core.jar?
-# By default the local classpath location points to folder libs inside Eclipse's
-# workspace (by default found in your home directory).
-# For Windows the default path would be ${user.home}/workspace/libs (make
-# adjustments below).
-
-classpath.local.location=classpath
-
-
-# For OSX users.
-# The following path will direct you into Processing's application source code
-# folder in case you put Processing inside your Applications folder.
-# Uncommenting the line below will overwrite the classpath.local.location from
-# above.
-
-#classpath.local.location=/Applications/Processing.app/Contents/Resources/Java/
-
-
-# Add all jar files that are required for compiling your project to the local
-# and project classpath, use a comma as delimiter. These jar files must be
-# inside your classpath.local.location folder.
-
-classpath.local.include=core-3.5.4.jar,jogl-all-2.3.2.jar
-
-
-# Add processing's libraries folder to the classpath.
-# If you don't need to include the libraries folder to your classpath, comment
-# out the following line.
-
-classpath.libraries.location=${sketchbook.location}/libraries
-
-
-
-# (3)
-# Set the java version that should be used to compile your library.
-java.target.version=1.8
-
-
-# (4)
-# Project details.
-# Give your library a name.
-
-project.name=P3LX
-
-# (5)
-# The following items are properties that will be used to make changes to the
-# web document templates. Values of properties will be inserted into the
-# documents automatically.
-# If you need more control, you can edit web/index.html and
-# web/library.properties directly.
-
-author.name=Mark C. Slee
-author.url=http://mcslee.com
-
-
-# Set the web page for your library.
-# This is NOT a direct link to where to download it.
-
-library.url=http://lx.studio
-
-
-# Set the category of your library. This must be one (or many) of the following:
-# "3D" "Animation" "Compilations" "Data"
-# "Fabrication" "Geometry" "GUI" "Hardware"
-# "I/O" "Language" "Math" "Simulation"
-# "Sound" "Utilities" "Typography" "Video & Vision"
-# If a value other than those listed is used, your library will listed as
-# "Other".
-
-library.categories=Animation, 3D, GUI, Simulation, LED
-
-
-# A short sentence (or fragment) to summarize the library's function. This will
-# be shown from inside the PDE when the library is being installed. Avoid
-# repeating the name of your library here. Also, avoid saying anything redundant
-# like mentioning that it's a library. This should start with a capitalized
-# letter, and end with a period.
-
-library.sentence=A library for procedural animation on 3-D LED structures.
-
-
-# Additional information suitable for the Processing website. The value of
-# 'sentence' always will be prepended, so you should start by writing the
-# second sentence here. If your library only works on certain operating systems,
-# mention it here.
-
-library.paragraph=
-
-
-# Set the source code repository for your project.
-# Recommendations for storing your source code online are Google Code or GitHub.
-
-source.host=Github
-source.url=https://github.com/heronarts/P3LX
-source.repository=https://github.com/heronarts/P3LX/tree/master/
-
-
-# The current version of your library.
-# This number must be parsable as an int. It increments once with each release.
-# This is used to compare different versions of the same library, and check if
-# an update is available.
-
-library.version=0
-
-
-# The version as the user will see it.
-# If blank, the library.version attribute will be used here.
-
-library.prettyVersion=0.1.1
-
-# The min and max revision of Processing compatible with your Library.
-# Note that these fields use the revision and not the version of Processing,
-# parsable as an int. For example, the revision number for 2.2.1 is 227.
-# Only use maxRevision (or minRevision), when your Library is known to
-# You can find the revision numbers in the change log: https://raw.githubusercontent.com/processing/processing/master/build/shared/revisions.txt
-# break in a later (or earlier) release. Otherwise, use the default value 0.
-
-compatible.minRevision=0
-compatible.maxRevision=0
-
-library.copyright=(C) 2012-
-library.dependencies=?
-library.keywords=?
-
-tested.platform=osx,windows
-tested.processingVersion=3.0.1
-
-
-# Include javadoc references into your project's javadocs.
-
-javadoc.java.href=http://docs.oracle.com/javase/8/docs/api/
-javadoc.processing.href=https://processing.github.io/processing-javadocs/core/
-javadoc.gson.href=https://static.javadoc.io/com.google.code.gson/gson/2.8.9/
diff --git a/build/build.xml b/build/build.xml
deleted file mode 100644
index 72fd074..0000000
--- a/build/build.xml
+++ /dev/null
@@ -1,266 +0,0 @@
-
-
-
-
-
- This is used to build the P3LX project. Requires a local copy of the LX project in adjacent folder.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ${line}
- Building the Processing library ${project.name} ${library.version}
-${line}
- lx src path ${project.src.lx}
- p3lx src path ${project.src.p3lx}
- bin path ${project.bin}
- classpath.local ${classpath.local.location}
- sketchbook ${sketchbook.location}
- java version ${java.target.version}
-${line}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-${line}
-Name ${project.name}
-Version ${library.prettyVersion} (${library.version})
-Sketchbook ${sketchbook.location}
-${line}
-done, finished.
-${line}
-
-
-
-
-
-
-
-
-
-
diff --git a/build/library.properties b/build/library.properties
deleted file mode 100644
index 4c7704a..0000000
--- a/build/library.properties
+++ /dev/null
@@ -1,58 +0,0 @@
-# More on this file here: http://code.google.com/p/processing/wiki/LibraryBasics
-# UTF-8 supported.
-
-# The name of your library as you want it formatted.
-name = ##library.name##
-
-# List of authors. Links can be provided using the syntax [author name](url).
-authorList = [##author.name##](##author.url##)
-
-# A web page for your library, NOT a direct link to where to download it.
-url = ##library.url##
-
-# The category of your library, must be one (or many) of the following:
-# "3D" "Animation" "Compilations" "Data"
-# "Fabrication" "Geometry" "GUI" "Hardware"
-# "I/O" "Language" "Math" "Simulation"
-# "Sound" "Utilities" "Typography" "Video & Vision"
-#
-# If a value other than those listed is used, your library will listed as
-# "Other".
-categories = ##library.categories##
-
-# A short sentence (or fragment) to summarize the library's function. This will
-# be shown from inside the PDE when the library is being installed. Avoid
-# repeating the name of your library here. Also, avoid saying anything redundant
-# like mentioning that it's a library. This should start with a capitalized
-# letter, and end with a period.
-sentence = ##library.sentence##
-
-# Additional information suitable for the Processing website. The value of
-# 'sentence' always will be prepended, so you should start by writing the
-# second sentence here. If your library only works on certain operating systems,
-# mention it here.
-paragraph = ##library.paragraph##
-
-# Links in the 'sentence' and 'paragraph' attributes can be inserted using the
-# same syntax as for authors.
-# That is, [here is a link to Processing](http://processing.org/)
-
-
-# A version number that increments once with each release. This is used to
-# compare different versions of the same library, and check if an update is
-# available. You should think of it as a counter, counting the total number of
-# releases you've had.
-version = ##library.version## # This must be parsable as an int
-
-# The version as the user will see it. If blank, the version attribute will be
-# used here.
-prettyVersion = ##library.prettyVersion## # This is treated as a String
-
-# The min and max revision of Processing compatible with your Library.
-# Note that these fields use the revision and not the version of Processing,
-# parsable as an int. For example, the revision number for 2.2.1 is 227.
-# You can find the revision numbers in the change log: https://raw.githubusercontent.com/processing/processing/master/build/shared/revisions.txt
-# Only use maxRevision (or minRevision), when your Library is known to
-# break in a later (or earlier) release. Otherwise, use the default value 0.
-minRevision = ##compatible.minRevision##
-maxRevision = ##compatible.maxRevision##
\ No newline at end of file
diff --git a/classpath/jogl-all-2.3.2.jar b/classpath/jogl-all-2.3.2.jar
deleted file mode 100644
index f73174f..0000000
Binary files a/classpath/jogl-all-2.3.2.jar and /dev/null differ
diff --git a/pom.xml b/pom.xml
index c9f80a8..b9b3bf4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
com.heronartsp3lx
- 0.2.2
+ 0.2.3jarP3LX
diff --git a/src/main/java/heronarts/p3lx/ui/UITheme.java b/src/main/java/heronarts/p3lx/ui/UITheme.java
index 0eaab4f..bc2f2ef 100644
--- a/src/main/java/heronarts/p3lx/ui/UITheme.java
+++ b/src/main/java/heronarts/p3lx/ui/UITheme.java
@@ -94,6 +94,7 @@ public class UITheme {
public final PImage iconOpen;
public final PImage iconKeyboard;
public final PImage iconPreferences;
+ public final PImage iconView;
UITheme(PApplet applet) {
// this.controlFont = applet.loadFont("ArialUnicodeMS-10.vlw");
@@ -120,6 +121,7 @@ public class UITheme {
this.iconOpen = applet.loadImage("icon-open.png");
this.iconKeyboard = applet.loadImage("icon-keyboard.png");
this.iconPreferences = applet.loadImage("icon-preferences.png");
+ this.iconView = applet.loadImage("icon-view.png");
LX.initProfiler.log("P3LX: UI: Theme: Icons");
}
diff --git a/src/main/java/heronarts/p3lx/ui/component/UIDropMenu.java b/src/main/java/heronarts/p3lx/ui/component/UIDropMenu.java
index 4ce4d3c..ea1b5a2 100644
--- a/src/main/java/heronarts/p3lx/ui/component/UIDropMenu.java
+++ b/src/main/java/heronarts/p3lx/ui/component/UIDropMenu.java
@@ -177,8 +177,13 @@ public void onDraw(UI ui, PGraphics pg) {
pg.fill(this.enabled ? ui.theme.getControlTextColor() : ui.theme.getControlDisabledTextColor());
pg.textAlign(PConstants.LEFT, PConstants.TOP);
pg.text(clipTextToWidth(pg, text, this.width - 12), 4 + this.textOffsetX, 2 + this.textOffsetY);
- pg.textAlign(PConstants.RIGHT, PConstants.TOP);
- pg.text("\u25BC", this.width-4, 2 + this.textOffsetY);
+
+ pg.noStroke();
+ pg.beginShape(PConstants.TRIANGLES);
+ pg.vertex(this.width-4, this.height / 2 + this.textOffsetY - 2);
+ pg.vertex(this.width-10, this.height / 2 + this.textOffsetY - 2);
+ pg.vertex(this.width-7, this.height / 2 + this.textOffsetY + 2);
+ pg.endShape();
}
private void toggleExpanded() {
diff --git a/src/main/java/heronarts/p3lx/ui/component/UITextBox.java b/src/main/java/heronarts/p3lx/ui/component/UITextBox.java
index e04c197..627fe17 100644
--- a/src/main/java/heronarts/p3lx/ui/component/UITextBox.java
+++ b/src/main/java/heronarts/p3lx/ui/component/UITextBox.java
@@ -36,9 +36,13 @@
public class UITextBox extends UIInputBox implements UICopy, UIPaste {
private final static String NO_VALUE = "-";
+ private static final String VALID_CHARACTERS =
+ "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ ,.<>?;':\"[]{}-=_+`~!@#$%^&*()|1234567890/\\";
private String value = NO_VALUE;
private StringParameter parameter = null;
+ private boolean isEmptyValueAllowed = false;
+ private String validCharacters = VALID_CHARACTERS;
private final LXParameterListener parameterListener = (p) -> {
setValue(this.parameter.getString(), false);
@@ -90,6 +94,11 @@ protected String getEditBufferValue() {
return this.value;
}
+ public UITextBox setEmptyValueAllowed(boolean isEmptyValueAllowed) {
+ this.isEmptyValueAllowed = isEmptyValueAllowed;
+ return this;
+ }
+
public UITextBox setValue(String value) {
return setValue(value, true);
}
@@ -121,13 +130,21 @@ public UITextBox setValue(String value, boolean pushToParameter) {
@Override
protected void saveEditBuffer() {
String value = this.editBuffer.trim();
- if (value.length() > 0) {
+ if (this.isEmptyValueAllowed || (value.length() > 0)) {
setValue(value);
}
}
- private static final String VALID_CHARACTERS =
- "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ ,.<>?;':\"[]{}-=_+`~!@#$%^&*()|1234567890/\\";
+ /**
+ * Set a custom list of valid characters for this text box
+ *
+ * @param validCharacters Valid characters
+ * @return this
+ */
+ public UITextBox setValidCharacters(String validCharacters) {
+ this.validCharacters = validCharacters;
+ return this;
+ }
public static boolean isValidTextCharacter(char keyChar) {
return VALID_CHARACTERS.indexOf(keyChar) >= 0;
@@ -135,7 +152,7 @@ public static boolean isValidTextCharacter(char keyChar) {
@Override
protected boolean isValidCharacter(char keyChar) {
- return isValidTextCharacter(keyChar);
+ return this.validCharacters.indexOf(keyChar) >= 0;
}
@Override
diff --git a/src/main/resources/data/icon-view.png b/src/main/resources/data/icon-view.png
new file mode 100644
index 0000000..1acb15f
Binary files /dev/null and b/src/main/resources/data/icon-view.png differ