aboutsummaryrefslogtreecommitdiffstats
path: root/src/graphui/classes/com/jogamp/graph/ui/widgets/RangedGroup.java
diff options
context:
space:
mode:
authorSven Göthel <[email protected]>2024-02-07 03:25:27 +0100
committerSven Göthel <[email protected]>2024-02-07 03:25:27 +0100
commit29697eaac78bdc0c1a6cfb8547516c614dc1db8e (patch)
treec3fc6ca20df251aa150022c7b519d6a12f0053dc /src/graphui/classes/com/jogamp/graph/ui/widgets/RangedGroup.java
parent5bacb8e6887b55ab2053dc5ed76bebcc0743a45e (diff)
GraphUI Shape: Add MouseEvent to MoveListener; RangeSlider: Add rel obj position + NEWT MouseEvent to listener, renamed {Slider->Change}Listener and add PeekListener for mouse-over events
Diffstat (limited to 'src/graphui/classes/com/jogamp/graph/ui/widgets/RangedGroup.java')
-rw-r--r--src/graphui/classes/com/jogamp/graph/ui/widgets/RangedGroup.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/graphui/classes/com/jogamp/graph/ui/widgets/RangedGroup.java b/src/graphui/classes/com/jogamp/graph/ui/widgets/RangedGroup.java
index e22b67c7f..0ebe3a258 100644
--- a/src/graphui/classes/com/jogamp/graph/ui/widgets/RangedGroup.java
+++ b/src/graphui/classes/com/jogamp/graph/ui/widgets/RangedGroup.java
@@ -41,6 +41,7 @@ import com.jogamp.math.geom.AABBox;
import com.jogamp.math.geom.Cube;
import com.jogamp.math.geom.Frustum;
import com.jogamp.math.util.PMVMatrix4f;
+import com.jogamp.newt.event.MouseEvent;
import com.jogamp.opengl.GL2ES2;
import com.jogamp.opengl.GLProfile;
import com.jogamp.opengl.util.texture.TextureSequence;
@@ -103,7 +104,7 @@ public class RangedGroup extends Widget {
horizSlider = new RangeSlider(renderModes, horizSliderParam.size,
new Vec2f(0, content.getBounds().getWidth()), horizSliderParam.unitSize, contentSize.x(), 0).setInverted(horizSliderParam.inverted);
addShape(horizSlider);
- horizSlider.addSliderListener((final RangeSlider w, final float old_val, final float val, final float old_val_pct, final float val_pct) -> {
+ horizSlider.addChangeListener((final RangeSlider w, final float old_val, final float val, final float old_val_pct, final float val_pct, Vec3f pos, MouseEvent e) -> {
final Vec3f oldPos = content.getPosition();
if( horizSlider.isInverted() ) {
content.moveTo(contentPosZero.x()-val, oldPos.y(), oldPos.z());
@@ -118,7 +119,7 @@ public class RangedGroup extends Widget {
vertSlider = new RangeSlider(renderModes, vertSliderParam.size,
new Vec2f(0, content.getBounds().getHeight()), vertSliderParam.unitSize, contentSize.y(), 0).setInverted(vertSliderParam.inverted);
addShape(vertSlider);
- vertSlider.addSliderListener((final RangeSlider w, final float old_val, final float val, final float old_val_pct, final float val_pct) -> {
+ vertSlider.addChangeListener((final RangeSlider w, final float old_val, final float val, final float old_val_pct, final float val_pct, Vec3f pos, MouseEvent e) -> {
final Vec3f oldPos = content.getPosition();
if( vertSlider.isInverted() ) {
content.moveTo(oldPos.x(), contentPosZero.y()+val, oldPos.z());