mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
Increase stack spacing
This commit is contained in:
@@ -59,9 +59,9 @@ public class PlayArea extends CardPanelContainer implements CardPanelMouseListen
|
|||||||
/** Constant <code>CARD_SPACING_Y=0.06f</code>. */
|
/** Constant <code>CARD_SPACING_Y=0.06f</code>. */
|
||||||
private static final float CARD_SPACING_Y = 0.06f;
|
private static final float CARD_SPACING_Y = 0.06f;
|
||||||
/** Constant <code>STACK_SPACING_X=0.07f</code>. */
|
/** Constant <code>STACK_SPACING_X=0.07f</code>. */
|
||||||
private static final float STACK_SPACING_X = 0.07f;
|
private static final float STACK_SPACING_X = 0.1f;
|
||||||
/** Constant <code>STACK_SPACING_Y=0.07f</code>. */
|
/** Constant <code>STACK_SPACING_Y=0.07f</code>. */
|
||||||
private static final float STACK_SPACING_Y = 0.07f;
|
private static final float STACK_SPACING_Y = 0.1f;
|
||||||
|
|
||||||
//private final int creatureStackMax = 4;
|
//private final int creatureStackMax = 4;
|
||||||
private final int landStackMax = 5;
|
private final int landStackMax = 5;
|
||||||
@@ -392,9 +392,9 @@ public class PlayArea extends CardPanelContainer implements CardPanelMouseListen
|
|||||||
landsFit = this.planRow(lands, template, template.size());
|
landsFit = this.planRow(lands, template, template.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !landsFit || !creaturesFit || !tokensFit )
|
if (!landsFit || !creaturesFit || !tokensFit) {
|
||||||
return null;
|
return null;
|
||||||
|
}
|
||||||
// Other cards may be stored at end of usual rows or on their own row.
|
// Other cards may be stored at end of usual rows or on their own row.
|
||||||
int cntOthers = others.size();
|
int cntOthers = others.size();
|
||||||
|
|
||||||
@@ -505,9 +505,10 @@ public class PlayArea extends CardPanelContainer implements CardPanelMouseListen
|
|||||||
|
|
||||||
if (stack.getHeight() > rowToFill.getHeight()) { // if row becomes taller
|
if (stack.getHeight() > rowToFill.getHeight()) { // if row becomes taller
|
||||||
int newAllRowsHeight = this.getRowsHeight(template) - rowToFill.getHeight() + stack.getHeight();
|
int newAllRowsHeight = this.getRowsHeight(template) - rowToFill.getHeight() + stack.getHeight();
|
||||||
if ( newAllRowsHeight > this.playAreaHeight)
|
if (newAllRowsHeight > this.playAreaHeight) {
|
||||||
return i; // refuse to add here because it won't fit in height
|
return i; // refuse to add here because it won't fit in height
|
||||||
}
|
}
|
||||||
|
}
|
||||||
rowToFill.add(stack);
|
rowToFill.add(stack);
|
||||||
}
|
}
|
||||||
return sourceRow.size();
|
return sourceRow.size();
|
||||||
|
|||||||
Reference in New Issue
Block a user