forked from External/mage
* Some changes to distance calculation of enchantments on the battlefield. Added minimal permanet size preference setting (not working correctly yet).
This commit is contained in:
parent
541e6a7f9b
commit
3b0f7b074f
6 changed files with 519 additions and 248 deletions
|
|
@ -67,7 +67,8 @@ public class CardPluginImpl implements CardPlugin {
|
|||
|
||||
private int landStackMax = 5;
|
||||
// private int cardWidthMin = 50, cardWidthMax = Constants.CARD_SIZE_FULL.width;
|
||||
private int cardWidthMin = 50, cardWidthMax = (int) GUISizeHelper.battlefieldCardDimension.getWidth();
|
||||
private int cardWidthMin = (int) GUISizeHelper.battlefieldCardMinDimension.getWidth();
|
||||
private int cardWidthMax = (int) GUISizeHelper.battlefieldCardMaxDimension.getWidth();
|
||||
|
||||
private boolean stackVertical = false;
|
||||
|
||||
|
|
@ -101,8 +102,8 @@ public class CardPluginImpl implements CardPlugin {
|
|||
}
|
||||
|
||||
private void setGUISize() {
|
||||
cardWidthMin = 50;
|
||||
cardWidthMax = (int) GUISizeHelper.battlefieldCardDimension.getWidth();
|
||||
cardWidthMin = (int) GUISizeHelper.battlefieldCardMinDimension.getWidth();
|
||||
cardWidthMax = (int) GUISizeHelper.battlefieldCardMaxDimension.getWidth();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -261,6 +262,7 @@ public class CardPluginImpl implements CardPlugin {
|
|||
}
|
||||
//FIXME: -1 is too slow. why not binary search?
|
||||
cardWidth -= 3;
|
||||
|
||||
}
|
||||
|
||||
// Get size of all the rows.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue