diff options
Diffstat (limited to 'core/src/ch/asynk/gdx')
| -rw-r--r-- | core/src/ch/asynk/gdx/boardgame/ui/Label.java | 17 | 
1 files changed, 8 insertions, 9 deletions
| diff --git a/core/src/ch/asynk/gdx/boardgame/ui/Label.java b/core/src/ch/asynk/gdx/boardgame/ui/Label.java index 10b7c50..4d89ffa 100644 --- a/core/src/ch/asynk/gdx/boardgame/ui/Label.java +++ b/core/src/ch/asynk/gdx/boardgame/ui/Label.java @@ -31,26 +31,25 @@ public class Label extends Element          this.layout = new GlyphLayout();      } -    public void setFont(BitmapFont font) +    public String getText()      { -        this.font = font; -        this.layout.setText(font, (text == null) ? "" : text); -        taint(); +        return text;      } -    public String getText() +    public void setFont(BitmapFont font)      { -        return text; +        this.font = font; +        write();      }      public void write(String text)      { -        write(text, getX(), getY()); +        this.text = text; +        write();      } -    public void write(String text, float x, float y) +    public void write()      { -        this.text = text;          this.layout.setText(font, (text == null) ? "" : text);          taint();      } | 
