aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo20.java2
-rw-r--r--src/demos/com/jogamp/opengl/demos/graph/ui/UIShapeDemo01.java2
-rw-r--r--src/demos/com/jogamp/opengl/demos/graph/ui/util/Tooltips.java2
-rw-r--r--src/graphui/classes/com/jogamp/graph/ui/shapes/Button.java18
-rw-r--r--src/graphui/classes/com/jogamp/graph/ui/widgets/MediaPlayer.java2
5 files changed, 18 insertions, 8 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 eaff6bf78..ef45465cd 100644
--- a/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo20.java
+++ b/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo20.java
@@ -602,7 +602,7 @@ public class UISceneDemo20 implements GLEventListener {
((Button)button).setSpacing(symSpacing, fixedSymSize);
button.setID(BUTTON_QUIT);
button.setColor(0.7f, 0.3f, 0.3f, 1.0f);
- ((Button)button).setLabelColor(1.2f, 1.2f, 1.2f);
+ ((Button)button).setLabelColor(1.2f, 1.2f, 1.2f, 1.0f);
button.setPressedColorMod(1.1f, 0.0f, 0.0f, 1.0f);
button.addMouseListener(new Shape.MouseGestureAdapter() {
@Override
diff --git a/src/demos/com/jogamp/opengl/demos/graph/ui/UIShapeDemo01.java b/src/demos/com/jogamp/opengl/demos/graph/ui/UIShapeDemo01.java
index 61f420d81..a7909a169 100644
--- a/src/demos/com/jogamp/opengl/demos/graph/ui/UIShapeDemo01.java
+++ b/src/demos/com/jogamp/opengl/demos/graph/ui/UIShapeDemo01.java
@@ -180,7 +180,7 @@ public class UIShapeDemo01 implements GLEventListener {
final float sz1_w = 1/8f;
final float sz2 = 1/20f;
button = new Button(renderModes, font, "Click me!", sz1_w, sz1_w/2f);
- button.setLabelColor(0.0f,0.0f,0.0f);
+ button.setLabelColor(0.0f,0.0f,0.0f, 1.0f);
/** Button defaults !
button.setLabelColor(1.0f,1.0f,1.0f);
button.setButtonColor(0.6f,0.6f,0.6f);
diff --git a/src/demos/com/jogamp/opengl/demos/graph/ui/util/Tooltips.java b/src/demos/com/jogamp/opengl/demos/graph/ui/util/Tooltips.java
index fc3b75009..2152a6ad0 100644
--- a/src/demos/com/jogamp/opengl/demos/graph/ui/util/Tooltips.java
+++ b/src/demos/com/jogamp/opengl/demos/graph/ui/util/Tooltips.java
@@ -81,7 +81,7 @@ public class Tooltips {
.setPerp().scale(l_sxy, l_sxy, 1).move(0, 0, 10*zEps)
.setColor(0.97f, 0.97f, 0.97f, 0.92f).setBorder(0.05f).setBorderColor(0, 0, 0, 1)
.setInteractive(false);
- buttonLabel.setLabelColor(0, 0, 0);
+ buttonLabel.setLabelColor(0, 0, 0, 1.0f);
buttonLabel.setSpacing(Button.DEFAULT_SPACING_X, Button.DEFAULT_SPACING_X);
final Shape s = buttonLabel;
scene.invoke(false, (final GLAutoDrawable drawable) -> {
diff --git a/src/graphui/classes/com/jogamp/graph/ui/shapes/Button.java b/src/graphui/classes/com/jogamp/graph/ui/shapes/Button.java
index 60cdec7fa..635da98ce 100644
--- a/src/graphui/classes/com/jogamp/graph/ui/shapes/Button.java
+++ b/src/graphui/classes/com/jogamp/graph/ui/shapes/Button.java
@@ -332,11 +332,21 @@ public class Button extends BaseButton {
return labelNow.getColor();
}
- /** Sets the label color. */
- public final Button setLabelColor(final float r, final float g, final float b) {
- labelOff.setColor(r, g, b, 1.0f);
+ /** Sets the label color, consider using alpha 1 */
+ public final Button setLabelColor(final Vec4f c) {
+ labelOff.setColor(c);
if( null != labelOn ) {
- labelOn.setColor(r, g, b, 1.0f);
+ labelOn.setColor(c);
+ }
+ markShapeDirty();
+ return this;
+ }
+
+ /** Sets the label color, consider using alpha 1 */
+ public final Button setLabelColor(final float r, final float g, final float b, final float a) {
+ labelOff.setColor(r, g, b, a);
+ if( null != labelOn ) {
+ labelOn.setColor(r, g, b, a);
}
markShapeDirty();
return this;
diff --git a/src/graphui/classes/com/jogamp/graph/ui/widgets/MediaPlayer.java b/src/graphui/classes/com/jogamp/graph/ui/widgets/MediaPlayer.java
index 0ceb9aaa9..2cde62668 100644
--- a/src/graphui/classes/com/jogamp/graph/ui/widgets/MediaPlayer.java
+++ b/src/graphui/classes/com/jogamp/graph/ui/widgets/MediaPlayer.java
@@ -233,7 +233,7 @@ public class MediaPlayer extends Widget {
getMultilineTime(Clock.currentMillis(), mPlayer), CtrlButtonWidth, CtrlButtonHeight, zEpsilon);
timeLabel.setName("mp.time");
timeLabel.setPerp().setColor(CtrlCellCol);
- timeLabel.setLabelColor(1, 1, 1);
+ timeLabel.setLabelColor(1, 1, 1, 1.0f);
}
scene.addGLEventListener(new GLEventAdapter() {
long t0 = 0;