From d7ea3cd9d156a096fbbe0f7752bd62e714bf6d93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Sun, 2 Nov 2014 12:25:19 +0100 Subject: Msg: font.dispose() --- core/src/ch/asynk/tankontank/game/hud/Msg.java | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/core/src/ch/asynk/tankontank/game/hud/Msg.java b/core/src/ch/asynk/tankontank/game/hud/Msg.java index 69c834e..5eb3c5c 100644 --- a/core/src/ch/asynk/tankontank/game/hud/Msg.java +++ b/core/src/ch/asynk/tankontank/game/hud/Msg.java @@ -33,6 +33,21 @@ public class Msg extends Bg private boolean visible; private ArrayDeque stack; + public Msg(BitmapFont font, TextureRegion region) + { + super(region); + this.visible = false; + this.font = font; + this.stack = new ArrayDeque(); + } + + @Override + public void dispose() + { + super.dispose(); + font.dispose(); + } + public float getX() { return x; @@ -43,14 +58,6 @@ public class Msg extends Bg return y; } - public Msg(BitmapFont font, TextureRegion region) - { - super(region); - this.visible = false; - this.font = font; - this.stack = new ArrayDeque(); - } - public void pushWrite(String text, float duration, Position position) { if (visible) { -- cgit v1.1-2-g2b99