From 0396ad70e535412501fe94736dd1e08ed2cf9ce5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Thu, 19 May 2016 17:31:53 +0200 Subject: Hud: fix stack.get(0) -> stack.getTop() --- core/src/ch/asynk/rustanddust/game/Hud.java | 10 +++++----- 1 file 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(); -- cgit v1.1-2-g2b99