aboutsummaryrefslogtreecommitdiffstats
path: root/src/demos
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-09-24 05:46:52 +0200
committerSven Gothel <[email protected]>2023-09-24 05:46:52 +0200
commitbcb71a24ff6c211ea67b4916bd7e43e502f7bfe5 (patch)
tree7e9c6913d2e6ebe2629f4cd6881a7a38c51b9550 /src/demos
parent55b0c752721b782295e856dda5b2791c879cec87 (diff)
Bug 1460 - GraphUI Shape: Allow keeping aspect-ratio at resize
For certain shapes the aspect-ratio shall be kept, e.g. MediaButton etc.
Diffstat (limited to 'src/demos')
-rw-r--r--src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo20.java4
1 files changed, 1 insertions, 3 deletions
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 a66531a68..f002212a6 100644
--- a/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo20.java
+++ b/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo20.java
@@ -701,8 +701,7 @@ public class UISceneDemo20 implements GLEventListener {
mPlayer.setAudioChannelLimit(1); // enforce mono to enjoy spatial 3D position effects
button = new MediaButton(renderModes, buttonRWidth, buttonRHeight, mPlayer);
button.setName(BUTTON_MOVIE);
- ((MediaButton)button).setVerbose(false);
- ((MediaButton)button).addDefaultEventListener();
+ ((MediaButton)button).setVerbose(false).addDefaultEventListener().setFixedARatioResize(true);
button.setToggleable(true);
button.setToggle(true); // toggle == false -> mute audio
button.setToggleOffColorMod(0f, 1f, 0f, 1.0f);
@@ -752,7 +751,6 @@ public class UISceneDemo20 implements GLEventListener {
return false;
}
});
-
buttonsRight.addShape(button);
mPlayer.playStream(filmURL, GLMediaPlayer.STREAM_ID_AUTO, GLMediaPlayer.STREAM_ID_AUTO, GLMediaPlayer.TEXTURE_COUNT_DEFAULT);
}