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()) {
|
if (checkEndGameSate()) {
|
||||||
AllZone.getDisplay().savePrefs();
|
AllZone.getDisplay().savePrefs();
|
||||||
frame.dispose();
|
frame.setEnabled(false);
|
||||||
new Gui_WinLose( AllZone.getMatchState(), AllZone.getQuestData(), AllZone.getQuestAssignment() );
|
//frame.dispose();
|
||||||
|
Gui_WinLose gwl = new Gui_WinLose( AllZone.getMatchState(), AllZone.getQuestData(), AllZone.getQuestAssignment() );
|
||||||
|
gwl.setAlwaysOnTop(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -166,10 +166,14 @@ public class Gui_WinLose extends JFrame implements NewConstants {
|
|||||||
* @param e a {@link java.awt.event.ActionEvent} object.
|
* @param e a {@link java.awt.event.ActionEvent} object.
|
||||||
*/
|
*/
|
||||||
void continueButton_actionPerformed(ActionEvent e) {
|
void continueButton_actionPerformed(ActionEvent e) {
|
||||||
//open up "Game" screen
|
// issue 147 - keep battlefield up following win/loss
|
||||||
|
JFrame frame = (JFrame) AllZone.getDisplay();
|
||||||
|
frame.dispose();
|
||||||
|
|
||||||
|
//open up "Game" screen
|
||||||
PrepareForNextRound();
|
PrepareForNextRound();
|
||||||
AllZone.getDisplay().setVisible(true);
|
AllZone.getDisplay().setVisible(true);
|
||||||
|
frame.setEnabled(true);
|
||||||
dispose();
|
dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -205,9 +209,14 @@ public class Gui_WinLose extends JFrame implements NewConstants {
|
|||||||
* @param e a {@link java.awt.event.ActionEvent} object.
|
* @param e a {@link java.awt.event.ActionEvent} object.
|
||||||
*/
|
*/
|
||||||
void restartButton_actionPerformed(ActionEvent e) {
|
void restartButton_actionPerformed(ActionEvent e) {
|
||||||
|
// issue 147 - keep battlefield up following win/loss
|
||||||
|
JFrame frame = (JFrame) AllZone.getDisplay();
|
||||||
|
frame.dispose();
|
||||||
|
|
||||||
model.match.reset();
|
model.match.reset();
|
||||||
PrepareForNextRound();
|
PrepareForNextRound();
|
||||||
AllZone.getDisplay().setVisible(true);
|
AllZone.getDisplay().setVisible(true);
|
||||||
|
frame.setEnabled(true);
|
||||||
dispose();
|
dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -324,6 +333,11 @@ public class Gui_WinLose extends JFrame implements NewConstants {
|
|||||||
* @param e a {@link java.awt.event.ActionEvent} object.
|
* @param e a {@link java.awt.event.ActionEvent} object.
|
||||||
*/
|
*/
|
||||||
void quitButton_actionPerformed(ActionEvent e) {
|
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?
|
//are we on a quest?
|
||||||
if (AllZone.getQuestData() == null) {
|
if (AllZone.getQuestData() == null) {
|
||||||
new OldGuiNewGame();
|
new OldGuiNewGame();
|
||||||
|
|||||||
Reference in New Issue
Block a user