aboutsummaryrefslogtreecommitdiffstats
path: root/src/demos/com/jogamp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-09-24 12:01:53 +0200
committerSven Gothel <[email protected]>2023-09-24 12:01:53 +0200
commit0c8700589abffe13e42f18d3c755541268d44a34 (patch)
treedb8adf22d8cee7ebd1f9d0aa646ba9035eb5c951 /src/demos/com/jogamp
parent652cfd2f307e0a34537ff8ec5ae2d023cfc2ce5d (diff)
Graph Fonts: Add 'Material Icons Round-Regular' (APL-2 license) and use it in UISceneDemo03 via hard coded unicode symbol numbers
Diffstat (limited to 'src/demos/com/jogamp')
-rw-r--r--src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo03.java13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo03.java b/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo03.java
index 4a42209ae..ef492a207 100644
--- a/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo03.java
+++ b/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo03.java
@@ -177,6 +177,7 @@ public class UISceneDemo03 {
// final Font font = FontFactory.get(IOUtil.getResource("jogamp/graph/font/fonts/ubuntu/Ubuntu-R.ttf",FontSetDemos.class.getClassLoader(), FontSetDemos.class).getInputStream(), true);
System.err.println("Font: " + font.getFullFamilyName());
final Font fontStatus = FontFactory.get(IOUtil.getResource("fonts/freefont/FreeMono.ttf", FontSetDemos.class.getClassLoader(), FontSetDemos.class).getInputStream(), true);
+ final Font fontSymbols = FontFactory.get(FontFactory.SYMBOLS).getDefault();
final Scene scene = new Scene(options.graphAASamples);
scene.setClearParams(new float[] { 1f, 1f, 1f, 1f }, GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
@@ -600,12 +601,14 @@ public class UISceneDemo03 {
final Group buttonsRight = new Group();
final Font fontButtons = FontFactory.get(FontFactory.UBUNTU).getDefault();
+ final Font fontSymbols = FontFactory.get(FontFactory.SYMBOLS).getDefault();
+
final float buttonWidth = sceneBox.getWidth() * 0.09f;
final float buttonHeight = buttonWidth / 3.0f;
buttonsRight.setLayout(new GridLayout(buttonWidth, buttonHeight, Alignment.Fill, new Gap(buttonHeight*0.50f, buttonWidth*0.10f), 7));
{
- final Button button = new Button(options.renderModes, fontButtons, " Pause ", buttonWidth, buttonHeight);
+ final Button button = new Button(options.renderModes, fontSymbols, " \uE034 ", buttonWidth, buttonHeight); // pause
button.setToggleable(true);
button.addMouseListener(new Shape.MouseGestureAdapter() {
@Override
@@ -623,7 +626,7 @@ public class UISceneDemo03 {
buttonsRight.addShape(button);
}
{
- final Button button = new Button(options.renderModes, fontButtons, " Next ", buttonWidth, buttonHeight);
+ final Button button = new Button(options.renderModes, fontSymbols, " \uE01F ", buttonWidth, buttonHeight); // next (ffwd)
button.addMouseListener(new Shape.MouseGestureAdapter() {
@Override
public void mouseClicked(final MouseEvent e) {
@@ -635,7 +638,7 @@ public class UISceneDemo03 {
buttonsRight.addShape(button);
}
{
- final Button button = new Button(options.renderModes, fontButtons, " Rotate ", buttonWidth, buttonHeight);
+ final Button button = new Button(options.renderModes, fontSymbols, " \uE042 ", buttonWidth, buttonHeight); // rotate
button.setToggleable(true);
button.addMouseListener(new Shape.MouseGestureAdapter() {
@Override
@@ -684,7 +687,7 @@ public class UISceneDemo03 {
buttonsRight.addShape(button);
}
{
- final Button button = new Button(options.renderModes, fontButtons, " Snap ", buttonWidth, buttonHeight);
+ final Button button = new Button(options.renderModes, fontSymbols, " \uE3AF ", buttonWidth, buttonHeight); // snapshot (camera)
button.addMouseListener(new Shape.MouseGestureAdapter() {
@Override
public void mouseClicked(final MouseEvent e) {
@@ -694,7 +697,7 @@ public class UISceneDemo03 {
buttonsRight.addShape(button);
}
{
- final Button button = new Button(options.renderModes, fontButtons, " Quit ", buttonWidth, buttonHeight);
+ final Button button = new Button(options.renderModes, fontSymbols, " \uE8AC ", buttonWidth, buttonHeight); // exit (power off)
button.setColor(0.7f, 0.3f, 0.3f, 1.0f);
button.addMouseListener(new Shape.MouseGestureAdapter() {
@Override