diff options
Diffstat (limited to 'src/demos/com/jogamp')
-rw-r--r-- | src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo10.java | 9 | ||||
-rw-r--r-- | src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo20.java | 8 |
2 files changed, 7 insertions, 10 deletions
diff --git a/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo10.java b/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo10.java index f1bdb1e08..9d7a2cc87 100644 --- a/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo10.java +++ b/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo10.java @@ -126,13 +126,10 @@ public class UISceneDemo10 { scene.setPMVMatrixSetup(new MyPMVMatrixSetup()); scene.setClearParams(new float[] { 1f, 1f, 1f, 1f}, GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT); - shape.onMove(new Shape.Listener() { - @Override - public void run(final Shape shape) { + shape.onMove((final Shape s, final Vec3f origin, Vec3f dest) -> { final Vec3f p = shape.getPosition(); - System.err.println("Shape moved: "+p); - } - }); + System.err.println("Shape moved: "+origin+" -> "+p); + } ); shape.addMouseListener(new Shape.MouseGestureAdapter() { @Override public void mouseMoved(final MouseEvent e) { diff --git a/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo20.java b/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo20.java index 1879240ab..18ce9c0e6 100644 --- a/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo20.java +++ b/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo20.java @@ -744,12 +744,12 @@ public class UISceneDemo20 implements GLEventListener { } }); - button.onMove( (final Shape shape) -> { + button.onMove((final Shape shape, final Vec3f origin, final Vec3f dest) -> { final ALAudioSink aSink = alAudioSink[0]; if( null != aSink ) { setSoundPosition(shape, aSink.getContext(), aSink.getSource()); } - }); + } ); button.onInit( (final Shape shape) -> { final ALAudioSink aSink = alAudioSink[0]; if( null != aSink ) { @@ -821,9 +821,9 @@ public class UISceneDemo20 implements GLEventListener { System.err.println("Sine "+sineSound); } } ); - final Shape.Listener setAudioPosition = new Shape.Listener() { + final Shape.MoveListener setAudioPosition = new Shape.MoveListener() { @Override - public void run(final Shape shape) { + public void run(final Shape shape, final Vec3f origin, final Vec3f dest) { setSoundPosition(shape, aSink.getContext(), aSource); } }; |