mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 15:17:59 +01:00
Fixed stack page elements not using their defined x/y position
This commit is contained in:
parent
a6feeceaae
commit
eac080d808
1 changed files with 5 additions and 4 deletions
|
@ -145,13 +145,14 @@ interface PageElement extends Drawable {
|
||||||
record Stack (DynamicContent.Page page, IngredientWithSpell ingredient, Bounds bounds) implements PageElement {
|
record Stack (DynamicContent.Page page, IngredientWithSpell ingredient, Bounds bounds) implements PageElement {
|
||||||
@Override
|
@Override
|
||||||
public void compile(int y, IViewRoot container) {
|
public void compile(int y, IViewRoot container) {
|
||||||
|
int xx = 0, yy = 0;
|
||||||
if (container instanceof SpellbookScreen book) {
|
if (container instanceof SpellbookScreen book) {
|
||||||
bounds().left = book.getX();
|
xx = book.getX();
|
||||||
bounds().top = book.getY();
|
yy = book.getY();
|
||||||
}
|
}
|
||||||
IngredientTree tree = new IngredientTree(
|
IngredientTree tree = new IngredientTree(
|
||||||
bounds().left + page().getBounds().left,
|
bounds().left + xx + page().getBounds().left,
|
||||||
bounds().top + page().getBounds().top + y + 10,
|
bounds().top + yy + page().getBounds().top + y + 10,
|
||||||
30
|
30
|
||||||
);
|
);
|
||||||
tree.input(ingredient.getMatchingStacks());
|
tree.input(ingredient.getMatchingStacks());
|
||||||
|
|
Loading…
Reference in a new issue