Fix the UI pitfall of double spacebar press quitting a draft (#9193)

* Switch draft's quit dialog's yes/no buttons so that yes isn't enabled by default

* TounramentPanel's quit button also adjusted for the sake of consistency.

Co-authored-by: sprangg <a@b.c>
This commit is contained in:
sprangg 2022-07-03 01:20:41 +03:00 committed by GitHub
parent ae189bad22
commit ba558f9a18
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -821,8 +821,8 @@
private void btnQuitTournamentActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnQuitTournamentActionPerformed private void btnQuitTournamentActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnQuitTournamentActionPerformed
UserRequestMessage message = new UserRequestMessage("Confirm quit tournament", "Are you sure you want to quit the draft tournament?"); UserRequestMessage message = new UserRequestMessage("Confirm quit tournament", "Are you sure you want to quit the draft tournament?");
message.setButton1("No", null); message.setButton1("Yes", PlayerAction.CLIENT_QUIT_DRAFT_TOURNAMENT);
message.setButton2("Yes", PlayerAction.CLIENT_QUIT_DRAFT_TOURNAMENT); message.setButton2("No", null);
message.setTournamentId(draftId); message.setTournamentId(draftId);
MageFrame.getInstance().showUserRequestDialog(message); MageFrame.getInstance().showUserRequestDialog(message);
}//GEN-LAST:event_btnQuitTournamentActionPerformed }//GEN-LAST:event_btnQuitTournamentActionPerformed

View file

@ -490,8 +490,8 @@ public class TournamentPanel extends javax.swing.JPanel {
private void btnQuitTournamentActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnQuitTournamentActionPerformed private void btnQuitTournamentActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnQuitTournamentActionPerformed
UserRequestMessage message = new UserRequestMessage("Confirm quit tournament", "Are you sure you want to quit the tournament?"); UserRequestMessage message = new UserRequestMessage("Confirm quit tournament", "Are you sure you want to quit the tournament?");
message.setButton1("No", null); message.setButton1("Yes", PlayerAction.CLIENT_QUIT_TOURNAMENT);
message.setButton2("Yes", PlayerAction.CLIENT_QUIT_TOURNAMENT); message.setButton2("No", null);
message.setTournamentId(tournamentId); message.setTournamentId(tournamentId);
MageFrame.getInstance().showUserRequestDialog(message); MageFrame.getInstance().showUserRequestDialog(message);
}//GEN-LAST:event_btnQuitTournamentActionPerformed }//GEN-LAST:event_btnQuitTournamentActionPerformed