aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/esieequest/game/items/Inventory.java4
-rw-r--r--src/esieequest/ui/rich/app/AppInterface.java3
-rw-r--r--src/esieequest/ui/rich/app/Layout.java30
3 files changed, 5 insertions, 32 deletions
diff --git a/src/esieequest/game/items/Inventory.java b/src/esieequest/game/items/Inventory.java
index 6bbda23..04f5a0b 100644
--- a/src/esieequest/game/items/Inventory.java
+++ b/src/esieequest/game/items/Inventory.java
@@ -150,9 +150,7 @@ public class Inventory implements SerialisableList {
150 * @return the Item 150 * @return the Item
151 */ 151 */
152 public Item takeItem(final String itemName) { 152 public Item takeItem(final String itemName) {
153 final Item item = this.getItem(itemName); 153 return this.items.remove(itemName);
154 this.removeItem(item);
155 return item;
156 } 154 }
157 155
158 /** 156 /**
diff --git a/src/esieequest/ui/rich/app/AppInterface.java b/src/esieequest/ui/rich/app/AppInterface.java
index 79a51cf..502dd71 100644
--- a/src/esieequest/ui/rich/app/AppInterface.java
+++ b/src/esieequest/ui/rich/app/AppInterface.java
@@ -82,8 +82,7 @@ abstract class AppInterface extends RichInterface implements ActionListener {
82 } 82 }
83 83
84 /** 84 /**
85 * Placeholder image generation from 85 * Generates a placeholder image.
86 * http://stackoverflow.com/a/17802477/1348634
87 * 86 *
88 * @param text 87 * @param text
89 * the image text 88 * the image text
diff --git a/src/esieequest/ui/rich/app/Layout.java b/src/esieequest/ui/rich/app/Layout.java
index 316c0a5..34c5596 100644
--- a/src/esieequest/ui/rich/app/Layout.java
+++ b/src/esieequest/ui/rich/app/Layout.java
@@ -22,6 +22,7 @@ import javax.swing.JTextPane;
22import javax.swing.KeyStroke; 22import javax.swing.KeyStroke;
23import javax.swing.border.EmptyBorder; 23import javax.swing.border.EmptyBorder;
24 24
25import lombok.AccessLevel;
25import lombok.Getter; 26import lombok.Getter;
26import esieequest.engine.commands.Command; 27import esieequest.engine.commands.Command;
27import esieequest.game.Text; 28import esieequest.game.Text;
@@ -32,73 +33,48 @@ import esieequest.game.map.Orientation;
32 * 33 *
33 * @author Pacien TRAN-GIRARD 34 * @author Pacien TRAN-GIRARD
34 */ 35 */
36@Getter
35public class Layout { 37public class Layout {
36 38
39 @Getter(AccessLevel.NONE)
37 private final AppInterface appInterface; 40 private final AppInterface appInterface;
38 41
39 @Getter
40 private JPanel mainPanel; 42 private JPanel mainPanel;
41 43
42 @Getter
43 private JTextPane questTextPane; 44 private JTextPane questTextPane;
44 45
45 @Getter
46 private JLabel imageLabel; 46 private JLabel imageLabel;
47 47
48 @Getter
49 private JPanel menuPanel; 48 private JPanel menuPanel;
50 @Getter
51 private JPanel questPanel; 49 private JPanel questPanel;
52 @Getter
53 private JPanel gamePanel; 50 private JPanel gamePanel;
54 51
55 @Getter
56 private JButton newButton; 52 private JButton newButton;
57 @Getter
58 private JButton soundButton; 53 private JButton soundButton;
59 @Getter
60 private JPanel filePanel; 54 private JPanel filePanel;
61 @Getter
62 private JButton loadButton; 55 private JButton loadButton;
63 @Getter
64 private JButton saveButton; 56 private JButton saveButton;
65 57
66 @Getter
67 private JPanel imagePanel; 58 private JPanel imagePanel;
68 59
69 @Getter
70 private JPanel userPanel; 60 private JPanel userPanel;
71 @Getter
72 private JPanel dispPanel; 61 private JPanel dispPanel;
73 62
74 @Getter
75 private JPanel consolePanel; 63 private JPanel consolePanel;
76 @Getter
77 private JPanel inventoryPanel; 64 private JPanel inventoryPanel;
78 65
79 @Getter
80 private JPanel controlPanel; 66 private JPanel controlPanel;
81 @Getter
82 private JPanel topControlPanel; 67 private JPanel topControlPanel;
83 @Getter
84 private JPanel bottomControlPanel; 68 private JPanel bottomControlPanel;
85 69
86 @Getter
87 private JTextPane infoTextPane; 70 private JTextPane infoTextPane;
88 @Getter
89 private JTextField inputField; 71 private JTextField inputField;
90 72
91 @Getter
92 private JButton forwardButton; 73 private JButton forwardButton;
93 @Getter
94 private JButton inventoryButton; 74 private JButton inventoryButton;
95 @Getter
96 private JButton actionButton; 75 private JButton actionButton;
97 @Getter
98 private JButton backButton; 76 private JButton backButton;
99 @Getter
100 private JButton leftButton; 77 private JButton leftButton;
101 @Getter
102 private JButton rightButton; 78 private JButton rightButton;
103 79
104 /** 80 /**