@@ -1701,7 +1701,7 @@ private boolean moveDisembark(Unit unit, final Direction direction) {
1701
1701
for (Unit u : disembarkable ) changeState (u , UnitState .ACTIVE );
1702
1702
if (disembarkable .size () == 1 ) {
1703
1703
if (getGUI ().confirm (tile , StringTemplate .key ("disembark.text" ),
1704
- disembarkable .get (0 ), "ok" , "cancel" )) {
1704
+ disembarkable .get (0 ), "ok" , "cancel" , true )) {
1705
1705
moveDirection (disembarkable .get (0 ), direction , false );
1706
1706
}
1707
1707
} else {
@@ -1787,7 +1787,7 @@ private boolean moveExplore(Unit unit, Direction direction) {
1787
1787
final Tile tile = now .getNeighbourOrNull (direction );
1788
1788
if (!getGUI ().confirm (now ,
1789
1789
StringTemplate .key ("exploreLostCityRumour.text" ), unit ,
1790
- "exploreLostCityRumour.yes" , "exploreLostCityRumour.no" )) {
1790
+ "exploreLostCityRumour.yes" , "exploreLostCityRumour.no" , true )) {
1791
1791
if (unit .getDestination () != null ) askClearGotoOrders (unit );
1792
1792
return false ;
1793
1793
}
@@ -1796,7 +1796,7 @@ private boolean moveExplore(Unit unit, Direction direction) {
1796
1796
if (tile .getLostCityRumour ().getType () == LostCityRumour .RumourType .MOUNDS
1797
1797
&& !getGUI ().confirm (now ,
1798
1798
StringTemplate .key ("exploreMoundsRumour.text" ), unit ,
1799
- "exploreLostCityRumour.yes" , "exploreLostCityRumour.no" )) {
1799
+ "exploreLostCityRumour.yes" , "exploreLostCityRumour.no" , true )) {
1800
1800
askServer ().declineMounds (unit , direction ); // LCR goes away
1801
1801
return false ;
1802
1802
}
@@ -1835,7 +1835,7 @@ private boolean moveHighSeas(Unit unit, Direction direction) {
1835
1835
} else if (getGUI ().confirm (oldTile , StringTemplate
1836
1836
.template ("highseas.text" )
1837
1837
.addAmount ("%number%" , unit .getSailTurns ()),
1838
- unit , "highseas.yes" , "highseas.no" )) {
1838
+ unit , "highseas.yes" , "highseas.no" , true )) {
1839
1839
return moveTowardEurope (unit , unit .getOwner ().getEurope ());
1840
1840
}
1841
1841
}
@@ -1871,7 +1871,7 @@ && askServer().askSkill(unit, direction)) {
1871
1871
} else if (getGUI ().confirm (unit .getTile (), StringTemplate
1872
1872
.template ("learnSkill.text" )
1873
1873
.addNamed ("%skill%" , skill ),
1874
- unit , "learnSkill.yes" , "learnSkill.no" )) {
1874
+ unit , "learnSkill.yes" , "learnSkill.no" , true )) {
1875
1875
if (askServer ().learnSkill (unit , direction )) {
1876
1876
if (unit .isDisposed ()) {
1877
1877
showInformationPanel (is , "learnSkill.die" );
@@ -2549,7 +2549,7 @@ private boolean unloadUnitAtStop(Unit unit, LogBuilder lb) {
2549
2549
.addAmount ("%amount%" , toUnload - atStop )
2550
2550
.addNamed ("%goods%" , goods );
2551
2551
if (!getGUI ().confirm (unit .getTile (), template ,
2552
- unit , "yes" , "no" )) {
2552
+ unit , "yes" , "no" , true )) {
2553
2553
if (atStop == 0 ) continue ;
2554
2554
amount = atStop ;
2555
2555
}
@@ -2813,7 +2813,7 @@ public boolean buildColony(Unit unit) {
2813
2813
StringTemplate warnings = tile .getBuildColonyWarnings (unit );
2814
2814
if (!warnings .isEmpty ()
2815
2815
&& !getGUI ().confirm (tile , warnings , unit ,
2816
- "buildColony.yes" , "buildColony.no" )) {
2816
+ "buildColony.yes" , "buildColony.no" , true )) {
2817
2817
return false ;
2818
2818
}
2819
2819
}
@@ -3038,7 +3038,7 @@ public boolean checkCashInTreasureTrain(Unit unit) {
3038
3038
.addAmount ("%fee%" , percent );
3039
3039
}
3040
3040
if (!getGUI ().confirm (unit .getTile (), template , unit ,
3041
- "accept" , "reject" )) return false ;
3041
+ "accept" , "reject" , true )) return false ;
3042
3042
}
3043
3043
3044
3044
UnitWas unitWas = new UnitWas (unit );
@@ -3153,7 +3153,7 @@ public boolean clearOrders(Unit unit) {
3153
3153
&& !getGUI ().confirm (unit .getTile (), StringTemplate
3154
3154
.template ("clearOrders.text" )
3155
3155
.addAmount ("%turns%" , unit .getWorkTurnsLeft ()),
3156
- unit , "ok" , "cancel" )) {
3156
+ unit , "ok" , "cancel" , true )) {
3157
3157
return false ;
3158
3158
}
3159
3159
@@ -3194,7 +3194,7 @@ public boolean clearSpeciality(Unit unit) {
3194
3194
.addStringTemplate ("%oldUnit%" ,
3195
3195
unit .getLabel (Unit .UnitLabelType .NATIONAL ))
3196
3196
.addNamed ("%unit%" , newType ),
3197
- unit , "ok" , "cancel" )) {
3197
+ unit , "ok" , "cancel" , true )) {
3198
3198
return false ;
3199
3199
}
3200
3200
@@ -3358,7 +3358,7 @@ public boolean disbandUnit(Unit unit) {
3358
3358
&& !getGUI ().confirmLeaveColony (unit )) return false ;
3359
3359
final Tile tile = (getGUI ().isPanelShowing ()) ? null : unit .getTile ();
3360
3360
if (!getGUI ().confirm (tile , StringTemplate .key ("disbandUnit.text" ),
3361
- unit , "disbandUnit.yes" , "cancel" ))
3361
+ unit , "disbandUnit.yes" , "cancel" , true ))
3362
3362
return false ;
3363
3363
3364
3364
// Try to disband
@@ -3720,7 +3720,7 @@ public void inciteHandler(Unit unit, IndianSettlement is, Player enemy,
3720
3720
.template ("missionarySettlement.inciteConfirm" )
3721
3721
.addStringTemplate ("%enemy%" , enemy .getNationLabel ())
3722
3722
.addAmount ("%amount%" , gold ),
3723
- unit , "yes" , "no" )) {
3723
+ unit , "yes" , "no" , true )) {
3724
3724
askServer ().incite (unit , is , enemy , gold );
3725
3725
}
3726
3726
});
@@ -4649,7 +4649,7 @@ public void reconnect() {
4649
4649
final FreeColClient fcc = getFreeColClient ();
4650
4650
invokeLater (() -> {
4651
4651
if (getGUI ().confirm ("reconnect.text" ,
4652
- "reconnect.no" , "reconnect.yes" )) {
4652
+ "reconnect.no" , "reconnect.yes" , false )) {
4653
4653
logger .finest ("Reconnect quit." );
4654
4654
fcc .getConnectController ().requestLogout (LogoutReason .QUIT );
4655
4655
} else {
@@ -4826,7 +4826,7 @@ public boolean saveGame() {
4826
4826
if (!getClientOptions ().getBoolean (ClientOptions .CONFIRM_SAVE_OVERWRITE )
4827
4827
|| !file .exists ()
4828
4828
|| getGUI ().confirm ("saveConfirmationDialog.areYouSure.text" ,
4829
- "ok" , "cancel" )) {
4829
+ "ok" , "cancel" , false )) {
4830
4830
FreeColDirectories .setSavegameFile (file .getPath ());
4831
4831
return saveGame (file );
4832
4832
}
@@ -5054,14 +5054,14 @@ private boolean setDead() {
5054
5054
} else {
5055
5055
if (player .getPlayerType () != Player .PlayerType .UNDEAD
5056
5056
&& getGUI ().confirm ("defeatedSinglePlayer.text" ,
5057
- "defeatedSinglePlayer.yes" , "quit" )) {
5057
+ "defeatedSinglePlayer.yes" , "quit" , true )) {
5058
5058
askServer ().enterRevengeMode ();
5059
5059
return true ;
5060
5060
}
5061
5061
reason = LogoutReason .DEFEATED ;
5062
5062
}
5063
5063
} else {
5064
- if (!getGUI ().confirm ("defeated.text" , "defeated.yes" , "quit" )) {
5064
+ if (!getGUI ().confirm ("defeated.text" , "defeated.yes" , "quit" , true )) {
5065
5065
reason = LogoutReason .DEFEATED ;
5066
5066
}
5067
5067
}
0 commit comments