mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2025-01-18 19:33:40 +01:00
Containers PropertyCards
This commit is contained in:
parent
2a7cbeed89
commit
5306208107
@ -1,6 +1,7 @@
|
||||
package pp.monopoly.client.gui.popups;
|
||||
|
||||
import com.jme3.math.ColorRGBA;
|
||||
import com.jme3.math.Vector3f;
|
||||
import com.simsilica.lemur.Button;
|
||||
import com.simsilica.lemur.Container;
|
||||
import com.simsilica.lemur.Label;
|
||||
@ -41,6 +42,7 @@ public class BuildingPropertyCard extends Dialog implements PopupDialog {
|
||||
buildingPropertyContainer = new Container();
|
||||
buildingPropertyContainer.setBackground(new QuadBackgroundComponent(field.getColor().getColor()));
|
||||
addContentToContainer(buildingPropertyContainer, field);
|
||||
buildingPropertyContainer.setPreferredSize(new Vector3f(360,420,1));
|
||||
|
||||
// Create the background container
|
||||
backgroundContainer = new Container();
|
||||
@ -50,6 +52,9 @@ public class BuildingPropertyCard extends Dialog implements PopupDialog {
|
||||
float padding = 10f;
|
||||
backgroundContainer.setPreferredSize(buildingPropertyContainer.getPreferredSize().addLocal(padding, padding, 0));
|
||||
|
||||
|
||||
System.out.println(backgroundContainer.getPreferredSize());
|
||||
|
||||
// Position the containers
|
||||
centerContainers(padding);
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package pp.monopoly.client.gui.popups;
|
||||
import com.jme3.material.Material;
|
||||
import com.jme3.material.RenderState.BlendMode;
|
||||
import com.jme3.math.ColorRGBA;
|
||||
import com.jme3.math.Vector3f;
|
||||
import com.jme3.scene.Geometry;
|
||||
import com.jme3.scene.shape.Quad;
|
||||
import com.simsilica.lemur.Button;
|
||||
@ -72,6 +73,7 @@ public class FoodFieldCard extends Dialog implements PopupDialog {
|
||||
private void createBackgroundContainer() {
|
||||
backgroundContainer = new Container();
|
||||
backgroundContainer.setBackground(new QuadBackgroundComponent(new ColorRGBA(0.8657f, 0.8735f, 0.8892f, 1.0f))); // Light gray background
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -82,6 +84,7 @@ public class FoodFieldCard extends Dialog implements PopupDialog {
|
||||
private void createFoodFieldContainer(FoodField field) {
|
||||
foodFieldContainer = new Container();
|
||||
foodFieldContainer.setBackground(new QuadBackgroundComponent(new ColorRGBA(0.1f, 0.1f, 0.1f, 0.9f)));
|
||||
foodFieldContainer.setPreferredSize(new Vector3f(360,420,1));
|
||||
|
||||
// Title
|
||||
Label title = foodFieldContainer.addChild(new Label(field.getName(), new ElementId("label-Bold")));
|
||||
|
@ -1,6 +1,7 @@
|
||||
package pp.monopoly.client.gui.popups;
|
||||
|
||||
import com.jme3.math.ColorRGBA;
|
||||
import com.jme3.math.Vector3f;
|
||||
import com.simsilica.lemur.Button;
|
||||
import com.simsilica.lemur.Container;
|
||||
import com.simsilica.lemur.Label;
|
||||
@ -52,6 +53,7 @@ public class GateFieldCard extends Dialog implements PopupDialog {
|
||||
private void createBackgroundContainer() {
|
||||
backgroundContainer = new Container();
|
||||
backgroundContainer.setBackground(new QuadBackgroundComponent(new ColorRGBA(0.8657f, 0.8735f, 0.8892f, 1.0f))); // Light gray background
|
||||
gateFieldContainer.setPreferredSize(new Vector3f(360,420,1));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user