aboutsummaryrefslogtreecommitdiffstats
path: root/src/graphui
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-09-24 02:39:00 +0200
committerSven Gothel <[email protected]>2023-09-24 02:39:00 +0200
commit9f900c7f88d70808e24ed8b48087126dad0c3188 (patch)
tree13a27a15da1a42a23b7d2bdf0dc7411f57d90b40 /src/graphui
parent2e52e801cfb14a96c60bf3e003af221efeddf3c3 (diff)
Bug 1454 - GraphUI Scene: Make active ZOffset scale configurable
Diffstat (limited to 'src/graphui')
-rw-r--r--src/graphui/classes/com/jogamp/graph/ui/Scene.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/graphui/classes/com/jogamp/graph/ui/Scene.java b/src/graphui/classes/com/jogamp/graph/ui/Scene.java
index 25733a21d..16e650124 100644
--- a/src/graphui/classes/com/jogamp/graph/ui/Scene.java
+++ b/src/graphui/classes/com/jogamp/graph/ui/Scene.java
@@ -925,7 +925,7 @@ public final class Scene implements Container, GLEventListener {
private void setActiveShape(final Shape shape) {
if( activeShape != shape ) {
releaseActiveShape();
- lastActiveZOffset = zOffsetScale * getZEpsilon(16);
+ lastActiveZOffset = activeZOffsetScale * getZEpsilon(16);
if( null != shape && !FloatUtil.isZero(lastActiveZOffset) ) {
shape.move(0, 0, +lastActiveZOffset);
}
@@ -933,7 +933,12 @@ public final class Scene implements Container, GLEventListener {
activeShape = shape;
}
private float lastActiveZOffset = 0f;
- private static final float zOffsetScale = 10f;
+ private float activeZOffsetScale = 10f;
+
+ /** Returns the active {@link Shape} Z-Offset scale, defaults to {@code 10.0}. */
+ public float getActiveShapeZOffsetScale() { return activeZOffsetScale; }
+ /** Sets the active {@link Shape} Z-Offset scale, defaults to {@code 10.0}. */
+ public void setActiveShapeZOffsetScale(final float v) { activeZOffsetScale = v; }
private final class SBCGestureListener implements GestureHandler.GestureListener {
@Override