mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
Issue 147 - Explain reason for victory/win/lose/loss/defeat before closing battlefield window
- delays dispose() on the battlefield screen until button clicks in Gui_WinLose
This commit is contained in:
@@ -636,8 +636,10 @@ public class GameAction {
|
||||
|
||||
if (checkEndGameSate()) {
|
||||
AllZone.getDisplay().savePrefs();
|
||||
frame.dispose();
|
||||
new Gui_WinLose( AllZone.getMatchState(), AllZone.getQuestData(), AllZone.getQuestAssignment() );
|
||||
frame.setEnabled(false);
|
||||
//frame.dispose();
|
||||
Gui_WinLose gwl = new Gui_WinLose( AllZone.getMatchState(), AllZone.getQuestData(), AllZone.getQuestAssignment() );
|
||||
gwl.setAlwaysOnTop(true);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -166,10 +166,14 @@ public class Gui_WinLose extends JFrame implements NewConstants {
|
||||
* @param e a {@link java.awt.event.ActionEvent} object.
|
||||
*/
|
||||
void continueButton_actionPerformed(ActionEvent e) {
|
||||
// issue 147 - keep battlefield up following win/loss
|
||||
JFrame frame = (JFrame) AllZone.getDisplay();
|
||||
frame.dispose();
|
||||
|
||||
//open up "Game" screen
|
||||
|
||||
PrepareForNextRound();
|
||||
AllZone.getDisplay().setVisible(true);
|
||||
frame.setEnabled(true);
|
||||
dispose();
|
||||
}
|
||||
|
||||
@@ -205,9 +209,14 @@ public class Gui_WinLose extends JFrame implements NewConstants {
|
||||
* @param e a {@link java.awt.event.ActionEvent} object.
|
||||
*/
|
||||
void restartButton_actionPerformed(ActionEvent e) {
|
||||
// issue 147 - keep battlefield up following win/loss
|
||||
JFrame frame = (JFrame) AllZone.getDisplay();
|
||||
frame.dispose();
|
||||
|
||||
model.match.reset();
|
||||
PrepareForNextRound();
|
||||
AllZone.getDisplay().setVisible(true);
|
||||
frame.setEnabled(true);
|
||||
dispose();
|
||||
}
|
||||
|
||||
@@ -324,6 +333,11 @@ public class Gui_WinLose extends JFrame implements NewConstants {
|
||||
* @param e a {@link java.awt.event.ActionEvent} object.
|
||||
*/
|
||||
void quitButton_actionPerformed(ActionEvent e) {
|
||||
// issue 147 - keep battlefield up following win/loss
|
||||
JFrame frame = (JFrame) AllZone.getDisplay();
|
||||
frame.dispose();
|
||||
frame.setEnabled(true);
|
||||
|
||||
//are we on a quest?
|
||||
if (AllZone.getQuestData() == null) {
|
||||
new OldGuiNewGame();
|
||||
|
||||
Reference in New Issue
Block a user