Merge remote-tracking branch 'origin/master'
commit
a2b8a12550
|
@ -177,7 +177,7 @@ public class GamePanel extends JPanel implements Runnable, KeyListener, Serializ
|
|||
try {
|
||||
if (isDialogue || isPaused) {
|
||||
mouseAlreadyTranslated = true;
|
||||
keyPressed(new KeyEvent(new Component() {}, 0, 0, 0, KeyEvent.VK_ENTER, (char)KeyEvent.VK_ENTER));
|
||||
keyPressed(new KeyEvent(new Component() {}, 0, -1, 0, KeyEvent.VK_ENTER, (char)KeyEvent.VK_ENTER));
|
||||
} else {
|
||||
player.mousePressed(e);
|
||||
}
|
||||
|
@ -553,7 +553,7 @@ public class GamePanel extends JPanel implements Runnable, KeyListener, Serializ
|
|||
isPaused = !isPaused;
|
||||
System.out.println(isPaused);
|
||||
} else if (e.getKeyCode() == KeyEvent.VK_ENTER) {
|
||||
if (isPaused && (e.getSource() == null)) {
|
||||
if (isPaused && (e.getWhen() != -1)) {
|
||||
((CardLayout)gameFrame.getLayout()).show(gameFrame, "menu");
|
||||
} else if (!waitForDialogue) {
|
||||
waitForDialogue = true;
|
||||
|
|
|
@ -75,7 +75,7 @@ public class MenuPanel extends JPanel implements Runnable, KeyListener{
|
|||
public void mousePressed(MouseEvent e) {
|
||||
if (hoverCheck(e)) {
|
||||
keyPressed(new KeyEvent(new Component() {
|
||||
}, 0, 0, 0, KeyEvent.VK_ENTER, (char)KeyEvent.VK_ENTER));
|
||||
}, 0, -1, 0, KeyEvent.VK_ENTER, (char)KeyEvent.VK_ENTER));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue