mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 20:41:58 -08:00
* Game: fixed random sort order of choices in choose dialogs
This commit is contained in:
parent
6b05562336
commit
a7480aeab1
40 changed files with 78 additions and 71 deletions
|
|
@ -3,13 +3,11 @@ package mage.client.components.ext.dlg;
|
|||
import mage.client.cards.BigCard;
|
||||
import mage.client.components.ext.MessageDialogType;
|
||||
import mage.client.game.FeedbackPanel;
|
||||
import mage.util.CardUtil;
|
||||
import mage.view.CardsView;
|
||||
|
||||
import java.awt.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* GUI: parameters for dialogs, uses to store useful data
|
||||
|
|
@ -39,7 +37,7 @@ public class DlgParams {
|
|||
|
||||
private boolean isAI = false;
|
||||
|
||||
private Set<String> manaChoices = new HashSet<>();
|
||||
private Set<String> manaChoices = new LinkedHashSet<>();
|
||||
|
||||
public int getPlayerID() {
|
||||
return playerID;
|
||||
|
|
@ -80,6 +78,7 @@ public class DlgParams {
|
|||
}
|
||||
|
||||
public void setManaChoices(Set<String> manaChoices) {
|
||||
CardUtil.checkSetParamForSerializationCompatibility(manaChoices);
|
||||
this.manaChoices = manaChoices;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ public class PickChoiceDialog extends MageDialog {
|
|||
cbSpecial.setToolTipText(choice.getSpecialHint());
|
||||
|
||||
// 2 modes: string or key-values
|
||||
// sore data in allItems for inremental filtering
|
||||
// store data in allItems for inremental filtering
|
||||
// http://logicbig.com/tutorials/core-java-tutorial/swing/list-filter/
|
||||
this.allItems.clear();
|
||||
if (choice.isKeyChoice()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue