summaryrefslogtreecommitdiffstats
path: root/src/net/java/joglutils/msg/elements/BlendElement.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/java/joglutils/msg/elements/BlendElement.java')
-rw-r--r--src/net/java/joglutils/msg/elements/BlendElement.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/net/java/joglutils/msg/elements/BlendElement.java b/src/net/java/joglutils/msg/elements/BlendElement.java
index 2a0d488..422811f 100644
--- a/src/net/java/joglutils/msg/elements/BlendElement.java
+++ b/src/net/java/joglutils/msg/elements/BlendElement.java
@@ -63,6 +63,11 @@ public class BlendElement extends Element {
BlendElement tmp = new BlendElement();
defaultState.setElement(tmp.getStateIndex(), tmp);
}
+ /** Indicates whether this element is enabled in the given default
+ state for a particular action. */
+ public static boolean isEnabled(State state) {
+ return (state.getDefaults().getElement(index) != null);
+ }
// These defaults match those in the Blend node -- is there a better way of factoring them out?