mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2024-11-25 02:19:45 +01:00
Compare commits
No commits in common. "4a8304ee4f89b613308850a772669cdc8dac7847" and "44c55ce3a6829a18fffd96a1fd806a05e9023305" have entirely different histories.
4a8304ee4f
...
44c55ce3a6
@ -160,17 +160,17 @@ public class MonopolyApp extends SimpleApplication implements MonopolyClient, Ga
|
||||
//logik zum wechselnden erscheinen und verschwinden beim drücken von B //TODO süäter entfernen
|
||||
private void handleB(boolean isPressed) {
|
||||
if (isPressed) {
|
||||
if (foodField != null && isBuyCardPopupOpen) {
|
||||
if (gateField != null && isBuyCardPopupOpen) {
|
||||
// Schließe das SettingsMenu
|
||||
System.out.println("Schließe BuyCardPopup...");
|
||||
foodField.close();
|
||||
foodField = null;
|
||||
gateField.close();
|
||||
gateField = null;
|
||||
setBuyCardPopupOpen(false);
|
||||
} else {
|
||||
// Öffne das SettingsMenu
|
||||
System.out.println("Öffne BuyCardPopup...");
|
||||
foodField = new FoodFieldCard(this);
|
||||
foodField.open();
|
||||
gateField = new GateFieldCard(this);
|
||||
gateField.open();
|
||||
setBuyCardPopupOpen(true);
|
||||
}
|
||||
}
|
||||
|
@ -10,10 +10,8 @@ import com.simsilica.lemur.Container;
|
||||
import com.simsilica.lemur.Label;
|
||||
import com.simsilica.lemur.component.QuadBackgroundComponent;
|
||||
import com.simsilica.lemur.style.ElementId;
|
||||
|
||||
import pp.dialog.Dialog;
|
||||
import pp.monopoly.client.MonopolyApp;
|
||||
import pp.monopoly.model.fields.FoodField;
|
||||
|
||||
/**
|
||||
* SettingsMenu ist ein Overlay-Menü, das durch ESC aufgerufen werden kann.
|
||||
@ -23,15 +21,11 @@ public class FoodFieldCard extends Dialog {
|
||||
private final Geometry overlayBackground;
|
||||
private final Container settingsContainer;
|
||||
private final Container backgroundContainer;
|
||||
private int index = 12;
|
||||
|
||||
public FoodFieldCard(MonopolyApp app) {
|
||||
super(app.getDialogManager());
|
||||
this.app = app;
|
||||
|
||||
//Generate the corresponfing field
|
||||
FoodField field = (FoodField) app.getBoardManager().getFieldAtIndex(index);
|
||||
|
||||
// Halbtransparentes Overlay hinzufügen
|
||||
overlayBackground = createOverlayBackground();
|
||||
app.getGuiNode().attachChild(overlayBackground);
|
||||
@ -48,18 +42,18 @@ public class FoodFieldCard extends Dialog {
|
||||
|
||||
|
||||
// Titel
|
||||
Label settingsTitle = settingsContainer.addChild(new Label(field.getName(), new ElementId("settings-title")));
|
||||
Label settingsTitle = settingsContainer.addChild(new Label("Gebäude 30", new ElementId("settings-title"))); //TODO Dynamische Gebäudezahl einfügen
|
||||
settingsTitle.setFontSize(48);
|
||||
|
||||
int i = 0;
|
||||
int a = 10;
|
||||
int b = -45;
|
||||
|
||||
// Effekt-Sound: Slider und Checkbox
|
||||
Container propertyValuesContainer = settingsContainer.addChild(new Container());
|
||||
propertyValuesContainer.addChild(new Label("„Preis: " + field.getPrice() + " EUR", new ElementId("label-Text")));
|
||||
propertyValuesContainer.addChild(new Label("", new ElementId("label-Text"))); // Leerzeile
|
||||
propertyValuesContainer.addChild(new Label("„Wenn man Besitzer des\n" +field.getName()+" ist, so ist die\nMiete 40-mal so hoch, wie\nAugen auf den zwei Würfeln sind.", new ElementId("label-Text")));
|
||||
propertyValuesContainer.addChild(new Label("", new ElementId("label-Text"))); // Leerzeile
|
||||
propertyValuesContainer.addChild(new Label("„Wenn man Besitzer beider \nRestaurants ist, so ist die\nMiete 100-mal so hoch, wie\nAugen auf den zwei Würfeln sind.", new ElementId("label-Text")));
|
||||
propertyValuesContainer.addChild(new Label("", new ElementId("label-Text"))); // Leerzeile
|
||||
propertyValuesContainer.addChild(new Label("„Hypothek: " + field.getHypo() + " EUR", new ElementId("label-Text")));
|
||||
propertyValuesContainer.addChild(new Label("„Preis:" + i, new ElementId("label-Text")));//TODO Variable hier einsetzen
|
||||
propertyValuesContainer.addChild(new Label("„Miete:" + a, new ElementId("label-Text")));//TODO Variable hier einsetzen
|
||||
propertyValuesContainer.addChild(new Label("„Hypothek:" + b, new ElementId("label-Text")));//TODO Variable hier einsetzen
|
||||
propertyValuesContainer.setBackground(new QuadBackgroundComponent(new ColorRGBA(0.4657f, 0.4735f, 0.4892f, 1.0f)));
|
||||
|
||||
// Beenden-Button
|
||||
@ -119,8 +113,5 @@ public class FoodFieldCard extends Dialog {
|
||||
System.out.println("SettingsMenu geschlossen."); // Debugging-Ausgabe
|
||||
}
|
||||
|
||||
public void setIndex(int index) {
|
||||
this.index = index;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -12,7 +12,6 @@ import com.simsilica.lemur.component.QuadBackgroundComponent;
|
||||
import com.simsilica.lemur.style.ElementId;
|
||||
import pp.dialog.Dialog;
|
||||
import pp.monopoly.client.MonopolyApp;
|
||||
import pp.monopoly.model.fields.GateField;
|
||||
|
||||
/**
|
||||
* SettingsMenu ist ein Overlay-Menü, das durch ESC aufgerufen werden kann.
|
||||
@ -22,15 +21,11 @@ public class GateFieldCard extends Dialog {
|
||||
private final Geometry overlayBackground;
|
||||
private final Container settingsContainer;
|
||||
private final Container backgroundContainer;
|
||||
private int index;
|
||||
|
||||
public GateFieldCard(MonopolyApp app) {
|
||||
super(app.getDialogManager());
|
||||
this.app = app;
|
||||
|
||||
//Generate the corresponfing field
|
||||
GateField field = (GateField) app.getBoardManager().getFieldAtIndex(index);
|
||||
|
||||
// Halbtransparentes Overlay hinzufügen
|
||||
overlayBackground = createOverlayBackground();
|
||||
app.getGuiNode().attachChild(overlayBackground);
|
||||
@ -47,16 +42,16 @@ public class GateFieldCard extends Dialog {
|
||||
|
||||
|
||||
// Titel
|
||||
Label settingsTitle = settingsContainer.addChild(new Label(field.getName(), new ElementId("settings-title")));
|
||||
Label settingsTitle = settingsContainer.addChild(new Label("Gebäude 30", new ElementId("settings-title"))); //TODO Dynamische Gebäudezahl einfügen
|
||||
settingsTitle.setFontSize(48);
|
||||
settingsTitle.setColor(ColorRGBA.Black);
|
||||
|
||||
|
||||
// Effekt-Sound: Slider und Checkbox
|
||||
Container propertyValuesContainer = settingsContainer.addChild(new Container());
|
||||
propertyValuesContainer.addChild(new Label("„Preis: " + field.getPrice() + " EUR", new ElementId("label-Text")));
|
||||
propertyValuesContainer.addChild(new Label("„Preis:", new ElementId("label-Text")));//TODO Variable hier einsetzen
|
||||
propertyValuesContainer.addChild(new Label("„Miete:", new ElementId("label-Text")));//TODO Variable hier einsetzen
|
||||
propertyValuesContainer.addChild(new Label("„Hypothek: " + field.getHypo() + " EUR", new ElementId("label-Text")));
|
||||
propertyValuesContainer.addChild(new Label("„Hypothek:", new ElementId("label-Text")));//TODO Variable hier einsetzen
|
||||
propertyValuesContainer.setBackground(new QuadBackgroundComponent(new ColorRGBA(0.4657f, 0.4735f, 0.4892f, 1.0f)));
|
||||
|
||||
// Beenden-Button
|
||||
@ -116,7 +111,5 @@ public class GateFieldCard extends Dialog {
|
||||
System.out.println("SettingsMenu geschlossen."); // Debugging-Ausgabe
|
||||
}
|
||||
|
||||
public void setIndex(int index) {
|
||||
this.index = index;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user