aboutsummaryrefslogtreecommitdiffstats
path: root/src/demos
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-09-26 05:46:02 +0200
committerSven Gothel <[email protected]>2023-09-26 05:46:02 +0200
commite0664688e45c07b8bc082f960b6790e592dd2034 (patch)
tree3dee02e6c0f644fc608925bb827b0e0f207a63b4 /src/demos
parent893903d2ece1193aa87257bd6162754dfb89f9f9 (diff)
GraphUI Demo UISceneDemo20: Give 'Show FPS' a toggle text 'Hide FPS' .. and have the text resize being of fixed aspect-ratio (like the movie)
Diffstat (limited to 'src/demos')
-rw-r--r--src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo20.java3
1 files changed, 2 insertions, 1 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 beda2d528..56aeb861c 100644
--- a/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo20.java
+++ b/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo20.java
@@ -498,7 +498,7 @@ public class UISceneDemo20 implements GLEventListener {
button.addMouseListener(dragZoomRotateListener);
buttonsLeft.addShape(button);
- button = new Button(renderModes, fontButtons, "Show fps", buttonLWidth, buttonLHeight);
+ button = new Button(renderModes, fontButtons, "Show fps", "Hide fps", buttonLWidth, buttonLHeight, Button.DEFAULT_LABEL_ZOFFSET);
button.setName(BUTTON_FPS);
button.setToggleable(true);
button.setToggle(fpsLabel.isEnabled());
@@ -1125,6 +1125,7 @@ public class UISceneDemo20 implements GLEventListener {
labels[currentText].setScale(sceneHeight, sceneHeight, 1f);
labels[currentText].setColor(0.1f, 0.1f, 0.1f, 1.0f);
labels[currentText].setEnabled(enableOthers);
+ labels[currentText].setFixedARatioResize(true);
labels[currentText].validate(gl);
labels[currentText].move(dxMiddle,
dyTop - jogampLabel.getScaledLineHeight()