summaryrefslogtreecommitdiffstats
path: root/core/src
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-11-02 12:25:19 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2014-11-02 12:25:19 +0100
commitd7ea3cd9d156a096fbbe0f7752bd62e714bf6d93 (patch)
tree894308bc3cec1e66ee14741822a6e95629fd97f9 /core/src
parent2f0c0f8e0b35adffbe0029d061fd8b243c9ced3e (diff)
downloadRustAndDust-d7ea3cd9d156a096fbbe0f7752bd62e714bf6d93.zip
RustAndDust-d7ea3cd9d156a096fbbe0f7752bd62e714bf6d93.tar.gz
Msg: font.dispose()
Diffstat (limited to 'core/src')
-rw-r--r--core/src/ch/asynk/tankontank/game/hud/Msg.java23
1 files 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<MsgInfo> stack;
+ public Msg(BitmapFont font, TextureRegion region)
+ {
+ super(region);
+ this.visible = false;
+ this.font = font;
+ this.stack = new ArrayDeque<MsgInfo>();
+ }
+
+ @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<MsgInfo>();
- }
-
public void pushWrite(String text, float duration, Position position)
{
if (visible) {