diff options
Diffstat (limited to 'core/src/ch/asynk')
| -rw-r--r-- | core/src/ch/asynk/tankontank/game/hud/Text.java | 12 | 
1 files changed, 12 insertions, 0 deletions
| diff --git a/core/src/ch/asynk/tankontank/game/hud/Text.java b/core/src/ch/asynk/tankontank/game/hud/Text.java index e468ccc..0e2e73e 100644 --- a/core/src/ch/asynk/tankontank/game/hud/Text.java +++ b/core/src/ch/asynk/tankontank/game/hud/Text.java @@ -30,6 +30,18 @@ public class Text implements Drawable, Disposable          font.dispose();      } +    public float getWidth() +    { +        TextBounds b = font.getBounds(text); +        return b.width; +    } + +    public float getHeight() +    { +        TextBounds b = font.getBounds(text); +        return b.height; +    } +      public void setPosition(float x, float y)      {          TextBounds b = font.getBounds(text); | 
