summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/rustanddust
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2016-05-18 22:44:39 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2016-05-18 22:44:39 +0200
commit72d8e81622e5fa396a61e1309e0c965a05af58ad (patch)
tree52e1b862739d8f3649136445e851944d30264c0b /core/src/ch/asynk/rustanddust
parenta8f452db636787830cce2cfce91eec3d24e30619 (diff)
downloadRustAndDust-72d8e81622e5fa396a61e1309e0c965a05af58ad.zip
RustAndDust-72d8e81622e5fa396a61e1309e0c965a05af58ad.tar.gz
LabelStack,Msg: update Msg if LabelStack pops a message
Diffstat (limited to 'core/src/ch/asynk/rustanddust')
-rw-r--r--core/src/ch/asynk/rustanddust/ui/LabelStack.java3
-rw-r--r--core/src/ch/asynk/rustanddust/ui/Msg.java4
2 files changed, 5 insertions, 2 deletions
diff --git a/core/src/ch/asynk/rustanddust/ui/LabelStack.java b/core/src/ch/asynk/rustanddust/ui/LabelStack.java
index 15b0117..b534f45 100644
--- a/core/src/ch/asynk/rustanddust/ui/LabelStack.java
+++ b/core/src/ch/asynk/rustanddust/ui/LabelStack.java
@@ -57,13 +57,14 @@ public class LabelStack extends Label implements Animation
@Override
public boolean animate(float delta)
{
- if (!visible) return true;
+ if (!visible) return false;
elapsed += delta;
if (elapsed >= duration) {
visible = false;
if (stack.size() > 0) {
MsgInfo info = stack.pop();
write(info.text, info.duration, info.position);
+ return true;
}
}
return false;
diff --git a/core/src/ch/asynk/rustanddust/ui/Msg.java b/core/src/ch/asynk/rustanddust/ui/Msg.java
index 16c4e2d..5e5f4b6 100644
--- a/core/src/ch/asynk/rustanddust/ui/Msg.java
+++ b/core/src/ch/asynk/rustanddust/ui/Msg.java
@@ -58,7 +58,9 @@ public class Msg extends Patch
public boolean animate(float delta)
{
- return label.animate(delta);
+ if (label.animate(delta))
+ resize();
+ return true;
}
@Override