diff options
Diffstat (limited to 'src/graphui/classes/com/jogamp/graph/ui/shapes')
3 files changed, 14 insertions, 8 deletions
diff --git a/src/graphui/classes/com/jogamp/graph/ui/shapes/BaseButton.java b/src/graphui/classes/com/jogamp/graph/ui/shapes/BaseButton.java index 83835a913..45ebbe58c 100644 --- a/src/graphui/classes/com/jogamp/graph/ui/shapes/BaseButton.java +++ b/src/graphui/classes/com/jogamp/graph/ui/shapes/BaseButton.java @@ -115,9 +115,11 @@ public class BaseButton extends GraphShape { } public BaseButton setSize(final float width, final float height) { - this.width = width; - this.height = height; - markShapeDirty(); + if( this.width != width || this.height != height ) { + this.width = width; + this.height = height; + markShapeDirty(); + } return this; } diff --git a/src/graphui/classes/com/jogamp/graph/ui/shapes/ImageButton.java b/src/graphui/classes/com/jogamp/graph/ui/shapes/ImageButton.java index a6c5bda34..2cb21e268 100644 --- a/src/graphui/classes/com/jogamp/graph/ui/shapes/ImageButton.java +++ b/src/graphui/classes/com/jogamp/graph/ui/shapes/ImageButton.java @@ -61,6 +61,8 @@ public class ImageButton extends TexSeqButton { setToggleOnColorMod(0.8f, 0.8f, 0.8f, 1f); } + public ImageSequence getImageSequence() { return (ImageSequence)texSeq; } + public final void setCurrentIdx(final int idx) { ((ImageSequence)texSeq).setCurrentIdx(idx); markStateDirty(); @@ -69,7 +71,7 @@ public class ImageButton extends TexSeqButton { @Override public void draw(final GL2ES2 gl, final RegionRenderer renderer) { super.draw(gl, renderer); - if( !((ImageSequence)texSeq).getManualStepping() ) { + if( ((ImageSequence)texSeq).isSequenceAnimating() ) { markStateDirty(); // keep on going } }; diff --git a/src/graphui/classes/com/jogamp/graph/ui/shapes/Rectangle.java b/src/graphui/classes/com/jogamp/graph/ui/shapes/Rectangle.java index ae2af3960..b90c7670a 100644 --- a/src/graphui/classes/com/jogamp/graph/ui/shapes/Rectangle.java +++ b/src/graphui/classes/com/jogamp/graph/ui/shapes/Rectangle.java @@ -122,10 +122,12 @@ public class Rectangle extends GraphShape { markShapeDirty(); } public void setDimension(final float width, final float height, final float lineWidth) { - this.width = width; - this.height = height; - this.lineWidth = lineWidth; - markShapeDirty(); + if( this.width != width || this.height != height || this.lineWidth != lineWidth ) { + this.width = width; + this.height = height; + this.lineWidth = lineWidth; + markShapeDirty(); + } } public void setBounds(final AABBox abox, final float lineWidth) { setPosition(abox.getMinX(), abox.getMinY(), abox.getCenter().z()); |