mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 18:58:00 +00:00
Trigger edition change if playing 10E draft on mobile
This commit is contained in:
@@ -125,20 +125,18 @@ public class AddBasicLandsDialog extends FDialog {
|
|||||||
cbLandSet.setFont(lblLandSet.getFont());
|
cbLandSet.setFont(lblLandSet.getFont());
|
||||||
cbLandSet.setAutoClose(false);
|
cbLandSet.setAutoClose(false);
|
||||||
cbLandSet.setChangedHandler(e -> {
|
cbLandSet.setChangedHandler(e -> {
|
||||||
landSet = cbLandSet.getSelectedItem();
|
onEditionChange();
|
||||||
pnlPlains.refreshArtChoices();
|
|
||||||
pnlIsland.refreshArtChoices();
|
|
||||||
pnlSwamp.refreshArtChoices();
|
|
||||||
pnlMountain.refreshArtChoices();
|
|
||||||
pnlForest.refreshArtChoices();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (editionOptions != null && !editionOptions.isEmpty())
|
if (editionOptions != null && !editionOptions.isEmpty()) {
|
||||||
{
|
|
||||||
cbLandSet.setItems(editionOptions, editionOptions.get(0));
|
cbLandSet.setItems(editionOptions, editionOptions.get(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
cbLandSet.setSelectedItem(defaultLandSet);
|
if (cbLandSet.getSelectedItem() == defaultLandSet) {
|
||||||
|
onEditionChange();
|
||||||
|
} else {
|
||||||
|
cbLandSet.setSelectedItem(defaultLandSet);
|
||||||
|
}
|
||||||
|
|
||||||
initButton(0, Forge.getLocalizer().getMessage("lblOK"), e -> {
|
initButton(0, Forge.getLocalizer().getMessage("lblOK"), e -> {
|
||||||
CardPool landsToAdd = new CardPool();
|
CardPool landsToAdd = new CardPool();
|
||||||
@@ -232,6 +230,15 @@ public class AddBasicLandsDialog extends FDialog {
|
|||||||
updateDeckInfoLabel();
|
updateDeckInfoLabel();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void onEditionChange() {
|
||||||
|
landSet = cbLandSet.getSelectedItem();
|
||||||
|
pnlPlains.refreshArtChoices();
|
||||||
|
pnlIsland.refreshArtChoices();
|
||||||
|
pnlSwamp.refreshArtChoices();
|
||||||
|
pnlMountain.refreshArtChoices();
|
||||||
|
pnlForest.refreshArtChoices();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected float layoutAndGetHeight(float width, float maxHeight) {
|
protected float layoutAndGetHeight(float width, float maxHeight) {
|
||||||
float padding = FOptionPane.PADDING;
|
float padding = FOptionPane.PADDING;
|
||||||
|
|||||||
Reference in New Issue
Block a user