mirror of
				https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
				synced 2025-11-04 07:26:14 +01:00 
			
		
		
		
	PorpertyOverwiev gerettet
This commit is contained in:
		@@ -280,7 +280,7 @@ 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) {
 | 
			
		||||
            Dialog tmp = new NoMoneyWarning(this);
 | 
			
		||||
            Dialog tmp = new FoodFieldCard(this);
 | 
			
		||||
            tmp.open();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
@@ -130,7 +130,7 @@ public class PropertyOverviewMenu extends Dialog {
 | 
			
		||||
        // Add property details
 | 
			
		||||
        Container propertyValuesContainer = card.addChild(new Container());
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("Grundstückswert: €" + field.getPrice(), new ElementId("label-Text"))).setFontSize(14);
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("", new ElementId("label-Text"))); // Leerzeile
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("", new ElementId("label-Text"))).setFontSize(14); // Leerzeile
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("Miete allein: €" + field.getAllRent().get(0), new ElementId("label-Text"))).setFontSize(14);
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("- mit 1 Haus: €" + field.getAllRent().get(1), new ElementId("label-Text"))).setFontSize(14);
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("- mit 2 Häuser: €" + field.getAllRent().get(2), new ElementId("label-Text"))).setFontSize(14);
 | 
			
		||||
@@ -138,7 +138,7 @@ public class PropertyOverviewMenu extends Dialog {
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("- mit 4 Häuser: €" + field.getAllRent().get(4), new ElementId("label-Text"))).setFontSize(14);
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("- mit 1 Hotel: €" + field.getAllRent().get(5), new ElementId("label-Text"))).setFontSize(14);
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("- 1 Haus kostet: €" + field.getHousePrice(), new ElementId("label-Text"))).setFontSize(14);
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("", new ElementId("label-Text"))); // Leerzeile
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("", new ElementId("label-Text"))).setFontSize(14); // Leerzeile
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("Hypothek: €" + field.getHypo(), new ElementId("label-Text"))).setFontSize(14);
 | 
			
		||||
        propertyValuesContainer.setBackground(new QuadBackgroundComponent(new ColorRGBA(0.4657f, 0.4735f, 0.4892f, 1.0f)));
 | 
			
		||||
 | 
			
		||||
@@ -163,16 +163,15 @@ public class PropertyOverviewMenu extends Dialog {
 | 
			
		||||
        Container propertyValuesContainer = card.addChild(new Container());
 | 
			
		||||
        propertyValuesContainer.setBackground(new QuadBackgroundComponent(new ColorRGBA(0.4657f, 0.4735f, 0.4892f, 1.0f))); // Grey background
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("Preis: €" + field.getPrice(), new ElementId("label-Text"))).setFontSize(14);
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("", new ElementId("label-Text"))); // Leerzeile
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("Wenn man Besitzer des", new ElementId("label-Text"))).setFontSize(14);
 | 
			
		||||
        propertyValuesContainer.addChild(new Label(field.getName() + " ist,", new ElementId("label-Text"))).setFontSize(14);
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("so ist die Miete", new ElementId("label-Text"))).setFontSize(14);
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("40x Würfelwert.", new ElementId("label-Text"))).setFontSize(14);
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("", new ElementId("label-Text"))); // Leerzeile
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("", new ElementId("label-Text"))).setFontSize(14); // Leerzeile
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("Wenn man Besitzer der", new ElementId("label-Text"))).setFontSize(14);
 | 
			
		||||
        propertyValuesContainer.addChild(new Label(field.getName() + " ist, so ist", new ElementId("label-Text"))).setFontSize(14);
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("die Miete 40x Würfelwert.", new ElementId("label-Text"))).setFontSize(14);
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("", new ElementId("label-Text"))).setFontSize(14); // Leerzeile
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("Besitzer beider", new ElementId("label-Text"))).setFontSize(14);
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("Restaurants zahlt", new ElementId("label-Text"))).setFontSize(14);
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("100x Würfelwert.", new ElementId("label-Text"))).setFontSize(14);
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("", new ElementId("label-Text"))); // Leerzeile
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("", new ElementId("label-Text"))).setFontSize(14); // Leerzeile
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("Hypothek: €" + field.getHypo(), new ElementId("label-Text"))).setFontSize(14);
 | 
			
		||||
 | 
			
		||||
        return card;
 | 
			
		||||
@@ -195,13 +194,16 @@ public class PropertyOverviewMenu extends Dialog {
 | 
			
		||||
        // Property Values Section
 | 
			
		||||
        Container propertyValuesContainer = card.addChild(new Container());
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("Preis: €" + field.getPrice(), new ElementId("label-Text"))).setFontSize(14);
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("", new ElementId("label-Text"))); // Leerzeile
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("1 Bahnhof: €250", new ElementId("label-Text"))).setFontSize(14);
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("2 Bahnhöfe: €500", new ElementId("label-Text"))).setFontSize(14);
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("3 Bahnhöfe: €1000", new ElementId("label-Text"))).setFontSize(14);
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("4 Bahnhöfe: €2000", new ElementId("label-Text"))).setFontSize(14);
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("", new ElementId("label-Text"))); // Leerzeile
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("Hypothek: €" + field.getHypo(), new ElementId("label-Text"))).setFontSize(14);
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("", new ElementId("label-Text"))).setFontSize(14);
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("Miete: 250 EUR", new ElementId("label-Text"))).setFontSize(14);
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("Wenn man", new ElementId("label-Text"))).setFontSize(14);
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("2 Bahnhof besitzt: 500 EUR", new ElementId("label-Text"))).setFontSize(14);
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("Wenn man", new ElementId("label-Text"))).setFontSize(14);
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("3 Bahnhof besitzt: 1000 EUR", new ElementId("label-Text"))).setFontSize(14);
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("Wenn man", new ElementId("label-Text"))).setFontSize(14);
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("4 Bahnhof besitzt: 2000 EUR", new ElementId("label-Text"))).setFontSize(14);
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("", new ElementId("label-Text"))).setFontSize(14);
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("„Hypothek: " + field.getHypo() + " EUR", new ElementId("label-Text"))).setFontSize(14);
 | 
			
		||||
        propertyValuesContainer.setBackground(new QuadBackgroundComponent(new ColorRGBA(0.4657f, 0.4735f, 0.4892f, 1.0f))); // Dark grey background
 | 
			
		||||
 | 
			
		||||
        return card;
 | 
			
		||||
 
 | 
			
		||||
@@ -54,6 +54,7 @@ public class FoodFieldCard extends Dialog {
 | 
			
		||||
        // Titel, bestehend aus dynamischen Namen anhand der ID und der Schriftfarbe/größe
 | 
			
		||||
        Label settingsTitle = foodFieldContainer.addChild(new Label(field.getName(), new ElementId("settings-title")));
 | 
			
		||||
        settingsTitle.setFontSize(48);
 | 
			
		||||
        settingsTitle.setColor(ColorRGBA.White);
 | 
			
		||||
 | 
			
		||||
        // Text, der auf der Karte steht
 | 
			
		||||
        Container propertyValuesContainer = foodFieldContainer.addChild(new Container());
 | 
			
		||||
 
 | 
			
		||||
@@ -50,22 +50,23 @@ public class GateFieldCard extends Dialog {
 | 
			
		||||
        float padding = 10; // Passt den backgroundContainer an die Größe des gateFieldContainers an
 | 
			
		||||
        backgroundContainer.setPreferredSize(gateFieldContainer.getPreferredSize().addLocal(padding, padding, 0));
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        // Titel
 | 
			
		||||
        // Die Namen werden dynamisch dem BoardManager entnommen
 | 
			
		||||
        // Titel, bestehend aus dynamischen Namen anhand der ID und der Schriftfarbe/größe
 | 
			
		||||
        Label gateFieldTitle = gateFieldContainer.addChild(new Label(field.getName(), new ElementId("settings-title")));
 | 
			
		||||
        gateFieldTitle.setFontSize(48);
 | 
			
		||||
        gateFieldTitle.setColor(ColorRGBA.Black);
 | 
			
		||||
        gateFieldTitle.setColor(ColorRGBA.White);
 | 
			
		||||
 | 
			
		||||
        // Text, der auf der Karte steht
 | 
			
		||||
        // Die Preise werden dynamisch dem BoardManager entnommen
 | 
			
		||||
        Container propertyValuesContainer = gateFieldContainer.addChild(new Container());
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("„Preis: " + field.getPrice() + " EUR", new ElementId("label-Text")));
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("", new ElementId("label-Text")));
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("Wenn man 1 Bahnhof besitzt: 250 EUR", new ElementId("label-Text")));
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("Wenn man 2 Bahnhöfe besitzt: 500 EUR", new ElementId("label-Text")));
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("Wenn man 3 Bahnhöfe besitzt: 1000 EUR", new ElementId("label-Text")));
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("Wenn man 4 Bahnhöfe besitzt: 2000 EUR", new ElementId("label-Text")));
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("Miete: 250 EUR", new ElementId("label-Text")));
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("Wenn man", new ElementId("label-Text")));
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("2 Bahnhof besitzt: 500 EUR", new ElementId("label-Text")));
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("Wenn man", new ElementId("label-Text")));
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("3 Bahnhof besitzt: 1000 EUR", new ElementId("label-Text")));
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("Wenn man", new ElementId("label-Text")));
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("4 Bahnhof besitzt: 2000 EUR", new ElementId("label-Text")));
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("", new ElementId("label-Text")));
 | 
			
		||||
        propertyValuesContainer.addChild(new Label("„Hypothek: " + field.getHypo() + " EUR", new ElementId("label-Text")));
 | 
			
		||||
        propertyValuesContainer.setBackground(new QuadBackgroundComponent(new ColorRGBA(0.4657f, 0.4735f, 0.4892f, 1.0f)));
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user