mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2025-01-19 08:26:14 +01:00
fixed overlapping popups
This commit is contained in:
parent
c1e501c271
commit
488ae154cf
@ -27,7 +27,7 @@ public class BuyCard extends Dialog {
|
|||||||
super(app.getDialogManager());
|
super(app.getDialogManager());
|
||||||
this.app = app;
|
this.app = app;
|
||||||
|
|
||||||
//Generate the corresponfing field
|
//Generate the corresponding field
|
||||||
int index = app.getGameLogic().getPlayerHandler().getPlayerById(app.getId()).getFieldID();
|
int index = app.getGameLogic().getPlayerHandler().getPlayerById(app.getId()).getFieldID();
|
||||||
BuildingProperty field = (BuildingProperty) new BoardManager().getFieldAtIndex(index);
|
BuildingProperty field = (BuildingProperty) new BoardManager().getFieldAtIndex(index);
|
||||||
|
|
||||||
@ -84,14 +84,14 @@ public class BuyCard extends Dialog {
|
|||||||
buyCardContainer.setLocalTranslation(
|
buyCardContainer.setLocalTranslation(
|
||||||
(app.getCamera().getWidth() - buyCardContainer.getPreferredSize().x) / 2,
|
(app.getCamera().getWidth() - buyCardContainer.getPreferredSize().x) / 2,
|
||||||
(app.getCamera().getHeight() + buyCardContainer.getPreferredSize().y) / 2,
|
(app.getCamera().getHeight() + buyCardContainer.getPreferredSize().y) / 2,
|
||||||
8
|
10
|
||||||
);
|
);
|
||||||
|
|
||||||
// Zentriere das Popup
|
// Zentriere das Popup
|
||||||
backgroundContainer.setLocalTranslation(
|
backgroundContainer.setLocalTranslation(
|
||||||
(app.getCamera().getWidth() - buyCardContainer.getPreferredSize().x - padding) / 2,
|
(app.getCamera().getWidth() - buyCardContainer.getPreferredSize().x - padding) / 2,
|
||||||
(app.getCamera().getHeight() + buyCardContainer.getPreferredSize().y+ padding) / 2,
|
(app.getCamera().getHeight() + buyCardContainer.getPreferredSize().y+ padding) / 2,
|
||||||
7
|
9
|
||||||
);
|
);
|
||||||
|
|
||||||
app.getGuiNode().attachChild(buyCardContainer);
|
app.getGuiNode().attachChild(buyCardContainer);
|
||||||
|
Loading…
Reference in New Issue
Block a user