mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
New options introduced to see the popup only for nonbasic lands.
Trigger of the popup moved earlier so as the sound will play on its closure (when the lands enters play) and not on its opening.
This commit is contained in:
@@ -451,7 +451,8 @@ public enum CSubmenuPreferences implements ICDoc {
|
||||
|
||||
private void initializeLandPlayedComboBox() {
|
||||
final String[] elems = {ForgeConstants.LAND_PLAYED_NOTIFICATION_NEVER, ForgeConstants.LAND_PLAYED_NOTIFICATION_ALWAYS,
|
||||
ForgeConstants.LAND_PLAYED_NOTIFICATION_AI};
|
||||
ForgeConstants.LAND_PLAYED_NOTIFICATION_ALWAYS_FOR_NONBASIC_LANDS, ForgeConstants.LAND_PLAYED_NOTIFICATION_AI,
|
||||
ForgeConstants.LAND_PLAYED_NOTIFICATION_AI_FOR_NONBASIC_LANDS};
|
||||
final FPref userSetting = FPref.UI_LAND_PLAYED_NOTIFICATION_POLICY;
|
||||
final FComboBoxPanel<String> panel = this.view.getCbpLandPlayedComboBoxPanel();
|
||||
final FComboBox<String> comboBox = createComboBox(elems, userSetting);
|
||||
|
||||
@@ -1454,7 +1454,10 @@ public final class CMatchUI
|
||||
String landPlayedNotificationPolicy = FModel.getPreferences().getPref(FPref.UI_LAND_PLAYED_NOTIFICATION_POLICY);
|
||||
Player cardController = land.getController();
|
||||
boolean isAi = cardController.isAI();
|
||||
if(ForgeConstants.LAND_PLAYED_NOTIFICATION_ALWAYS.equals(landPlayedNotificationPolicy) || (ForgeConstants.LAND_PLAYED_NOTIFICATION_AI.equals(landPlayedNotificationPolicy) && (isAi))) {
|
||||
if(ForgeConstants.LAND_PLAYED_NOTIFICATION_ALWAYS.equals(landPlayedNotificationPolicy)
|
||||
|| (ForgeConstants.LAND_PLAYED_NOTIFICATION_AI.equals(landPlayedNotificationPolicy) && (isAi))
|
||||
|| (ForgeConstants.LAND_PLAYED_NOTIFICATION_ALWAYS_FOR_NONBASIC_LANDS.equals(landPlayedNotificationPolicy) && !land.isBasicLand())
|
||||
|| (ForgeConstants.LAND_PLAYED_NOTIFICATION_AI_FOR_NONBASIC_LANDS.equals(landPlayedNotificationPolicy) && !land.isBasicLand()) && (isAi)) {
|
||||
String title = "Forge";
|
||||
List<String> options = ImmutableList.of(Localizer.getInstance().getMessage("lblOK"));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user