mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-24 05:47: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 {
|
||||
@Override
|
||||
public void compile(int y, IViewRoot container) {
|
||||
int xx = 0, yy = 0;
|
||||
if (container instanceof SpellbookScreen book) {
|
||||
bounds().left = book.getX();
|
||||
bounds().top = book.getY();
|
||||
xx = book.getX();
|
||||
yy = book.getY();
|
||||
}
|
||||
IngredientTree tree = new IngredientTree(
|
||||
bounds().left + page().getBounds().left,
|
||||
bounds().top + page().getBounds().top + y + 10,
|
||||
bounds().left + xx + page().getBounds().left,
|
||||
bounds().top + yy + page().getBounds().top + y + 10,
|
||||
30
|
||||
);
|
||||
tree.input(ingredient.getMatchingStacks());
|
||||
|
|
Loading…
Reference in a new issue