aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/esieequest/ui/rich/UserInterface.java8
-rw-r--r--src/esieequest/ui/web/WebInterface.java8
2 files changed, 14 insertions, 2 deletions
diff --git a/src/esieequest/ui/rich/UserInterface.java b/src/esieequest/ui/rich/UserInterface.java
index e8fbbc7..c743d68 100644
--- a/src/esieequest/ui/rich/UserInterface.java
+++ b/src/esieequest/ui/rich/UserInterface.java
@@ -600,7 +600,13 @@ abstract class UserInterface implements Viewable, ActionListener {
600 @Override 600 @Override
601 public void updateLocation(final Room room, final Direction direction, final Side side, 601 public void updateLocation(final Room room, final Direction direction, final Side side,
602 final boolean canGoBack) { 602 final boolean canGoBack) {
603 this.setIllustration(room.name() + Text.FILENAME_SEPARATOR.toString() + direction.name()); 603 String locationImageName = room.name() + Text.FILENAME_SEPARATOR.toString()
604 + direction.name();
605 if (side.getInventory().getSize() > 0) {
606 locationImageName += Text.FILENAME_SEPARATOR.toString()
607 + side.getInventory().getItem().name();
608 }
609 this.setIllustration(locationImageName);
604 this.backButton.setEnabled(canGoBack); 610 this.backButton.setEnabled(canGoBack);
605 this.forwardButton.setEnabled(side.hasDoor()); 611 this.forwardButton.setEnabled(side.hasDoor());
606 this.actionButton.setEnabled(side.hasCharacter() || (side.getInventory().getSize() > 0)); 612 this.actionButton.setEnabled(side.hasCharacter() || (side.getInventory().getSize() > 0));
diff --git a/src/esieequest/ui/web/WebInterface.java b/src/esieequest/ui/web/WebInterface.java
index c407d47..aa70317 100644
--- a/src/esieequest/ui/web/WebInterface.java
+++ b/src/esieequest/ui/web/WebInterface.java
@@ -399,7 +399,13 @@ class WebInterface extends Composite implements Viewable {
399 @Override 399 @Override
400 public void updateLocation(final Room room, final Direction direction, final Side side, 400 public void updateLocation(final Room room, final Direction direction, final Side side,
401 final boolean canGoBack) { 401 final boolean canGoBack) {
402 this.setIllustration(room.name() + Text.FILENAME_SEPARATOR.toString() + direction.name()); 402 String locationImageName = room.name() + Text.FILENAME_SEPARATOR.toString()
403 + direction.name();
404 if (side.getInventory().getSize() > 0) {
405 locationImageName += Text.FILENAME_SEPARATOR.toString()
406 + side.getInventory().getItem().name();
407 }
408 this.setIllustration(locationImageName);
403 this.backButton.setEnabled(canGoBack); 409 this.backButton.setEnabled(canGoBack);
404 this.forwardButton.setEnabled(side.hasDoor()); 410 this.forwardButton.setEnabled(side.hasDoor());
405 this.actionButton.setEnabled(side.hasCharacter() || (side.getInventory().getSize() > 0)); 411 this.actionButton.setEnabled(side.hasCharacter() || (side.getInventory().getSize() > 0));