summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2020-05-13 07:30:55 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2020-05-13 07:30:55 +0200
commit3629647d1338f81d6604ec3e623c89d283f746cf (patch)
tree73f17c58c14601ac612a1f5fa010603fa59178b6
parentea93755e4b9d56181bc4e7910044bdc321e748c5 (diff)
downloadgdx-boardgame-3629647d1338f81d6604ec3e623c89d283f746cf.zip
gdx-boardgame-3629647d1338f81d6604ec3e623c89d283f746cf.tar.gz
ui/Label : is always sized acording to it's text
-rw-r--r--core/src/ch/asynk/gdx/boardgame/ui/Label.java13
1 files changed, 3 insertions, 10 deletions
diff --git a/core/src/ch/asynk/gdx/boardgame/ui/Label.java b/core/src/ch/asynk/gdx/boardgame/ui/Label.java
index 038a4e8..4eb1de6 100644
--- a/core/src/ch/asynk/gdx/boardgame/ui/Label.java
+++ b/core/src/ch/asynk/gdx/boardgame/ui/Label.java
@@ -27,7 +27,6 @@ public class Label extends Element
this.padding = padding;
this.alignment = alignment;
this.layout = new GlyphLayout();
- this.sizing = Sizing.EXPAND_BOTH;
}
public String getText()
@@ -55,15 +54,9 @@ public class Label extends Element
@Override public void computeDimensions()
{
- if(sizing.fill()) {
- super.computeDimensions();
- } else {
- if (sizing.expandWidth())
- this.rect.width = (layout.width + (2 * padding));
- if (sizing.expandHeight())
- this.rect.height = (layout.height + (2 * padding));
- if (DEBUG_GEOMETRY) System.err.println(" dim " + print(-1));
- }
+ this.rect.width = (layout.width + (2 * padding));
+ this.rect.height = (layout.height + (2 * padding));
+ if (DEBUG_GEOMETRY) System.err.println(" dim " + print(-1));
}
@Override public void draw(Batch batch)