summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2016-05-19 17:31:53 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2016-05-19 17:31:53 +0200
commit0396ad70e535412501fe94736dd1e08ed2cf9ce5 (patch)
tree090404895c12bcca6be0e3fe3b62cf29c71d89cf /core
parent3de9468258b3b4df86021098d0a408a64583e98f (diff)
downloadRustAndDust-0396ad70e535412501fe94736dd1e08ed2cf9ce5.zip
RustAndDust-0396ad70e535412501fe94736dd1e08ed2cf9ce5.tar.gz
Hud: fix stack.get(0) -> stack.getTop()PvP
Diffstat (limited to 'core')
-rw-r--r--core/src/ch/asynk/rustanddust/game/Hud.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/core/src/ch/asynk/rustanddust/game/Hud.java b/core/src/ch/asynk/rustanddust/game/Hud.java
index e16de1c..1a10fbb 100644
--- a/core/src/ch/asynk/rustanddust/game/Hud.java
+++ b/core/src/ch/asynk/rustanddust/game/Hud.java
@@ -194,7 +194,7 @@ public class Hud implements Disposable, Animation
}
if (dialogs.size() > 0) {
- Widget dialog = dialogs.get(0);
+ Widget dialog = dialogs.getTop();
if (dialog.hit(x, y)) {
closeDialog();
return true;
@@ -242,7 +242,7 @@ public class Hud implements Disposable, Animation
game.playType();
if (dialogs.size() > 0)
- dialogs.get(0).visible = true;
+ dialogs.getTop().visible = true;
else
ctrl.blockMap = false;
}
@@ -256,7 +256,7 @@ public class Hud implements Disposable, Animation
private void delayOver()
{
delayOn = false;
- Widget dialog = dialogs.get(0);
+ Widget dialog = dialogs.getTop();
if (dialog == engagement)
closeDialog();
}
@@ -270,14 +270,14 @@ public class Hud implements Disposable, Animation
{
ctrl.blockMap = true;
if (dialogs.size() != 0)
- dialogs.get(0).visible = false;
+ dialogs.getTop().visible = false;
dialogs.push(dialog);
}
private boolean toggleOptionsPanel()
{
if (dialogs.size() > 0) {
- if (dialogs.get(0) != optionsPanel)
+ if (dialogs.getTop() != optionsPanel)
return false;
optionsPanel.close();
closeDialog();