fixed layering issue

This commit is contained in:
Yvonne Schmidt 2024-12-08 18:29:14 +01:00
parent f8fe0b9877
commit 640665fd29
2 changed files with 4 additions and 4 deletions

View File

@ -125,13 +125,13 @@ public class BuyHouse extends Dialog {
buyHouseContainer.setLocalTranslation( buyHouseContainer.setLocalTranslation(
(app.getCamera().getWidth() - buyHouseContainer.getPreferredSize().x) / 2, (app.getCamera().getWidth() - buyHouseContainer.getPreferredSize().x) / 2,
(app.getCamera().getHeight() + buyHouseContainer.getPreferredSize().y) / 2, (app.getCamera().getHeight() + buyHouseContainer.getPreferredSize().y) / 2,
9 11
); );
backgroundContainer.setLocalTranslation( backgroundContainer.setLocalTranslation(
(app.getCamera().getWidth() - buyHouseContainer.getPreferredSize().x - padding) / 2, (app.getCamera().getWidth() - buyHouseContainer.getPreferredSize().x - padding) / 2,
(app.getCamera().getHeight() + buyHouseContainer.getPreferredSize().y + padding) / 2, (app.getCamera().getHeight() + buyHouseContainer.getPreferredSize().y + padding) / 2,
8 10
); );
app.getGuiNode().attachChild(buyHouseContainer); app.getGuiNode().attachChild(buyHouseContainer);

View File

@ -83,14 +83,14 @@ public class EventCardPopup extends Dialog {
eventCardContainer.setLocalTranslation( eventCardContainer.setLocalTranslation(
(app.getCamera().getWidth() - eventCardContainer.getPreferredSize().x) / 2, (app.getCamera().getWidth() - eventCardContainer.getPreferredSize().x) / 2,
(app.getCamera().getHeight() + eventCardContainer.getPreferredSize().y) / 2, (app.getCamera().getHeight() + eventCardContainer.getPreferredSize().y) / 2,
10 9
); );
// Zentriere das Popup // Zentriere das Popup
backgroundContainer.setLocalTranslation( backgroundContainer.setLocalTranslation(
(app.getCamera().getWidth() - eventCardContainer.getPreferredSize().x - padding) / 2, (app.getCamera().getWidth() - eventCardContainer.getPreferredSize().x - padding) / 2,
(app.getCamera().getHeight() + eventCardContainer.getPreferredSize().y+ padding) / 2, (app.getCamera().getHeight() + eventCardContainer.getPreferredSize().y+ padding) / 2,
9 8
); );
app.getGuiNode().attachChild(eventCardContainer); app.getGuiNode().attachChild(eventCardContainer);