mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2025-01-18 22:56:15 +01:00
added documentation for EventCardPopup
This commit is contained in:
parent
7a658cb3d6
commit
160fff88ea
@ -54,12 +54,12 @@ public class EventCardPopup extends Dialog {
|
|||||||
backgroundContainer.setBackground(new QuadBackgroundComponent(new ColorRGBA(0.8657f, 0.8735f, 0.8892f, 1.0f))); // Darker background
|
backgroundContainer.setBackground(new QuadBackgroundComponent(new ColorRGBA(0.8657f, 0.8735f, 0.8892f, 1.0f))); // Darker background
|
||||||
app.getGuiNode().attachChild(backgroundContainer);
|
app.getGuiNode().attachChild(backgroundContainer);
|
||||||
|
|
||||||
// Hauptcontainer für die Eventcard
|
|
||||||
eventCardContainer = new Container();
|
eventCardContainer = new Container();
|
||||||
eventCardContainer.setBackground(new QuadBackgroundComponent(new ColorRGBA(0.8657f, 0.8735f, 0.8892f, 1.0f)));
|
eventCardContainer.setBackground(new QuadBackgroundComponent(new ColorRGBA(0.8657f, 0.8735f, 0.8892f, 1.0f)));
|
||||||
eventCardContainer.setPreferredSize(new Vector3f(550,400,10));
|
eventCardContainer.setPreferredSize(new Vector3f(550,400,10));
|
||||||
|
|
||||||
float padding = 10; // Passt den backgroundContainer an die Größe des eventCardContainers an
|
float padding = 10;
|
||||||
backgroundContainer.setPreferredSize(eventCardContainer.getPreferredSize().addLocal(padding, padding, 0));
|
backgroundContainer.setPreferredSize(eventCardContainer.getPreferredSize().addLocal(padding, padding, 0));
|
||||||
|
|
||||||
// Titel
|
// Titel
|
||||||
@ -108,7 +108,7 @@ public class EventCardPopup extends Dialog {
|
|||||||
Quad quad = new Quad(app.getCamera().getWidth(), app.getCamera().getHeight());
|
Quad quad = new Quad(app.getCamera().getWidth(), app.getCamera().getHeight());
|
||||||
Geometry overlay = new Geometry("Overlay", quad);
|
Geometry overlay = new Geometry("Overlay", quad);
|
||||||
Material material = new Material(app.getAssetManager(), "Common/MatDefs/Misc/Unshaded.j3md");
|
Material material = new Material(app.getAssetManager(), "Common/MatDefs/Misc/Unshaded.j3md");
|
||||||
material.setColor("Color", new ColorRGBA(0, 0, 0, 0.5f)); // Halbtransparent
|
material.setColor("Color", new ColorRGBA(0, 0, 0, 0.5f));
|
||||||
material.getAdditionalRenderState().setBlendMode(BlendMode.Alpha);
|
material.getAdditionalRenderState().setBlendMode(BlendMode.Alpha);
|
||||||
overlay.setMaterial(material);
|
overlay.setMaterial(material);
|
||||||
overlay.setLocalTranslation(0, 0, 0);
|
overlay.setLocalTranslation(0, 0, 0);
|
||||||
@ -120,9 +120,9 @@ public class EventCardPopup extends Dialog {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void close() {
|
public void close() {
|
||||||
app.getGuiNode().detachChild(eventCardContainer); // Entferne das Menü
|
app.getGuiNode().detachChild(eventCardContainer);
|
||||||
app.getGuiNode().detachChild(backgroundContainer); //Entfernt Rand
|
app.getGuiNode().detachChild(backgroundContainer);
|
||||||
app.getGuiNode().detachChild(overlayBackground); // Entferne das Overlay
|
app.getGuiNode().detachChild(overlayBackground);
|
||||||
super.close();
|
super.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user