From e6121e92ea6f0aa8b1e1643c94c30a8f6d67131c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Thu, 10 Dec 2015 09:55:36 +0100 Subject: Hud: by default notify at MIDDLE_CENTER --- core/src/ch/asynk/rustanddust/game/Hud.java | 4 ++-- core/src/ch/asynk/rustanddust/game/hud/PlayerInfo.java | 2 +- core/src/ch/asynk/rustanddust/game/states/StateBreak.java | 2 +- core/src/ch/asynk/rustanddust/game/states/StateMove.java | 3 ++- core/src/ch/asynk/rustanddust/game/states/StateSelect.java | 3 ++- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/core/src/ch/asynk/rustanddust/game/Hud.java b/core/src/ch/asynk/rustanddust/game/Hud.java index a368f56..c3222f8 100644 --- a/core/src/ch/asynk/rustanddust/game/Hud.java +++ b/core/src/ch/asynk/rustanddust/game/Hud.java @@ -146,12 +146,12 @@ public class Hud implements Disposable, Animation public void pushNotify(String s) { - notify(s, NOTIFY_DURATION, Position.TOP_CENTER, true); + notify(s, NOTIFY_DURATION, Position.MIDDLE_CENTER, true); } public void notify(String s) { - notify(s, NOTIFY_DURATION, Position.TOP_CENTER, false); + notify(s, NOTIFY_DURATION, Position.MIDDLE_CENTER, false); } public void notify(String s, Position pos) diff --git a/core/src/ch/asynk/rustanddust/game/hud/PlayerInfo.java b/core/src/ch/asynk/rustanddust/game/hud/PlayerInfo.java index 2ff4d77..e7718c5 100644 --- a/core/src/ch/asynk/rustanddust/game/hud/PlayerInfo.java +++ b/core/src/ch/asynk/rustanddust/game/hud/PlayerInfo.java @@ -169,7 +169,7 @@ public class PlayerInfo implements Disposable, Drawable, Animation } else if (hit == unitDock) { if (unitDock.hit(x, y)) { - ctrl.hud.notify(unitDock.select(x, y).toString()); + ctrl.hud.notify(unitDock.select(x, y).toString(), Position.TOP_CENTER); ctrl.showEntryZone(); } } diff --git a/core/src/ch/asynk/rustanddust/game/states/StateBreak.java b/core/src/ch/asynk/rustanddust/game/states/StateBreak.java index 7c41677..62dd9f5 100644 --- a/core/src/ch/asynk/rustanddust/game/states/StateBreak.java +++ b/core/src/ch/asynk/rustanddust/game/states/StateBreak.java @@ -16,7 +16,7 @@ public class StateBreak extends StateCommon { activeUnit = null; ctrl.hud.actionButtons.show(Buttons.DONE.b); - ctrl.hud.notify("Break Through possible", Position.MIDDLE_CENTER); + ctrl.hud.notify("Break Through possible"); map.unitsBreakThroughShow(); } diff --git a/core/src/ch/asynk/rustanddust/game/states/StateMove.java b/core/src/ch/asynk/rustanddust/game/states/StateMove.java index 559fc70..d89ee44 100644 --- a/core/src/ch/asynk/rustanddust/game/states/StateMove.java +++ b/core/src/ch/asynk/rustanddust/game/states/StateMove.java @@ -1,5 +1,6 @@ package ch.asynk.rustanddust.game.states; +import ch.asynk.rustanddust.ui.Position; import ch.asynk.rustanddust.game.Hex; import ch.asynk.rustanddust.game.Unit; import ch.asynk.rustanddust.game.Zone; @@ -148,7 +149,7 @@ public class StateMove extends StateCommon map.movesShow(); map.hexSelect(hex); activeUnit.enableOverlay(Unit.MOVE, false); - ctrl.hud.notify(activeUnit.toString()); + ctrl.hud.notify(activeUnit.toString(), Position.TOP_CENTER); checkExit(activeUnit, hex); } diff --git a/core/src/ch/asynk/rustanddust/game/states/StateSelect.java b/core/src/ch/asynk/rustanddust/game/states/StateSelect.java index f7914ee..0bb9900 100644 --- a/core/src/ch/asynk/rustanddust/game/states/StateSelect.java +++ b/core/src/ch/asynk/rustanddust/game/states/StateSelect.java @@ -1,5 +1,6 @@ package ch.asynk.rustanddust.game.states; +import ch.asynk.rustanddust.ui.Position; import ch.asynk.rustanddust.game.Map; import ch.asynk.rustanddust.game.Hex; import ch.asynk.rustanddust.game.Unit; @@ -98,7 +99,7 @@ public class StateSelect extends StateCommon } } else { select(upHex, unit, isEnemy); - ctrl.hud.notify(selectedUnit.toString()); + ctrl.hud.notify(selectedUnit.toString(), Position.TOP_CENTER); } } -- cgit v1.1-2-g2b99