From ffa592bc3eb523f0fc8c8f3812648e8bf5817842 Mon Sep 17 00:00:00 2001 From: musilto9 Date: Wed, 25 Mar 2020 12:32:28 +0100 Subject: [PATCH] added dialog up / down --- .../java/ruscz/game/gameOfProd/Cells/InteractionCell.java | 8 ++++++++ src/main/resources/first-dialog.txt | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/main/java/ruscz/game/gameOfProd/Cells/InteractionCell.java b/src/main/java/ruscz/game/gameOfProd/Cells/InteractionCell.java index 90acffb..4759623 100644 --- a/src/main/java/ruscz/game/gameOfProd/Cells/InteractionCell.java +++ b/src/main/java/ruscz/game/gameOfProd/Cells/InteractionCell.java @@ -76,6 +76,14 @@ public class InteractionCell extends Cell { case "hide": dialog.hideText(); break; + case "up": + readNextLine(); + window.getDialogBar().setBounds(0, 0, WindowOfFreeMove.CELL_SIZE * WindowOfFreeMove.WINDOW_WIDTH, WindowOfFreeMove.CELL_SIZE * WindowOfFreeMove.WINDOW_HEIGHT / 4); + break; + case "down": + readNextLine(); + window.getDialogBar().setBounds(0, WindowOfFreeMove.CELL_SIZE * WindowOfFreeMove.WINDOW_HEIGHT * 3 / 4, WindowOfFreeMove.CELL_SIZE * WindowOfFreeMove.WINDOW_WIDTH, WindowOfFreeMove.CELL_SIZE * WindowOfFreeMove.WINDOW_HEIGHT / 4); + break; } } else { diff --git a/src/main/resources/first-dialog.txt b/src/main/resources/first-dialog.txt index 417dd38..b66d156 100644 --- a/src/main/resources/first-dialog.txt +++ b/src/main/resources/first-dialog.txt @@ -1,6 +1,6 @@ Keep out + up ... - hide - show + down or enter
I'm a sign not a cop \ No newline at end of file