mirror of
https://athene2.informatik.unibw-muenchen.de/progproj/gruppen-ht24/Gruppe-02.git
synced 2024-11-24 21:39:44 +01:00
popup ebenen angepasst und dropdown entfernt
This commit is contained in:
parent
91e4df7478
commit
65a7958b66
@ -247,15 +247,14 @@ selector("tab.button", "pp") {
|
||||
}
|
||||
selector("settings-title", "pp") {
|
||||
fontSize = 48 // Set font size
|
||||
background = new QuadBackgroundComponent(color(0.4157f, 0.4235f, 0.4392f, 1.0f)) // Grey background
|
||||
textHAlignment = HAlignment.Center
|
||||
textVAlignment = VAlignment.Center
|
||||
}
|
||||
|
||||
selector("menu-button", "pp") {
|
||||
fontSize = 40 // Set font size
|
||||
background = new QuadBackgroundComponent(new ColorRGBA(0.4157f, 0.4235f, 0.4392f, 1.0f)) // Grey background
|
||||
textHAlignment = HAlignment.Center
|
||||
textVAlignment = VAlignment.Center
|
||||
buttonCommands = stdButtonCommands
|
||||
}
|
||||
|
||||
|
@ -64,30 +64,6 @@ public class SettingsMenu extends Dialog {
|
||||
backgroundMusicContainer.addChild(new Checkbox("Musik an")).setChecked(true);
|
||||
backgroundMusicContainer.setBackground(new QuadBackgroundComponent(new ColorRGBA(0.4657f, 0.4735f, 0.4892f, 1.0f)));
|
||||
|
||||
/*Selector<String> dropdown = new Selector<>();
|
||||
backgroundMusicContainer.addChild(dropdown);
|
||||
|
||||
Vector3f dimens = settingsContainer.getPreferredSize();
|
||||
Vector3f dimens2 = dropdown.getPopupContainer().getPreferredSize();
|
||||
dimens2.setX(dimens.getX());
|
||||
dropdown.getPopupContainer().setPreferredSize(dimens2);*/
|
||||
// Create the dropdown menu
|
||||
Selector<String> dropdown = new Selector<>();
|
||||
|
||||
// Generate and add numbered examples to the dropdown
|
||||
for (int i = 1; i <= 10; i++) { // Generate 10 examples
|
||||
dropdown.getModel().add("Example " + i);
|
||||
}
|
||||
|
||||
|
||||
// Add the dropdown to the container
|
||||
backgroundMusicContainer.addChild(dropdown);
|
||||
|
||||
// Adjust the dropdown's popup container size if necessary
|
||||
Vector3f dimens = settingsContainer.getPreferredSize();
|
||||
Vector3f dimens2 = dropdown.getPopupContainer().getPreferredSize();
|
||||
dimens2.setX(dimens.getX());
|
||||
dropdown.getPopupContainer().setPreferredSize(dimens2);
|
||||
// Beenden-Button
|
||||
Button quitButton = settingsContainer.addChild(new Button("Beenden", new ElementId("menu-button")));
|
||||
quitButton.setFontSize(32);
|
||||
|
@ -51,28 +51,6 @@ public class BuyCard extends Dialog {
|
||||
propertyValuesContainer.addChild(new Label("„Hypothek: XXXX", new ElementId("label-Text")));//TODO Variable hier einsetzen
|
||||
propertyValuesContainer.setBackground(new QuadBackgroundComponent(new ColorRGBA(0.4657f, 0.4735f, 0.4892f, 1.0f)));
|
||||
|
||||
/*Selector<String> dropdown = new Selector<>();
|
||||
backgroundMusicContainer.addChild(dropdown);
|
||||
|
||||
Vector3f dimens = settingsContainer.getPreferredSize();
|
||||
Vector3f dimens2 = dropdown.getPopupContainer().getPreferredSize();
|
||||
dimens2.setX(dimens.getX());
|
||||
dropdown.getPopupContainer().setPreferredSize(dimens2);*/
|
||||
// Create the dropdown menu
|
||||
Selector<String> dropdown = new Selector<>();
|
||||
|
||||
// Generate and add numbered examples to the dropdown
|
||||
for (int i = 1; i <= 10; i++) { // Generate 10 examples
|
||||
dropdown.getModel().add("Example " + i);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Adjust the dropdown's popup container size if necessary
|
||||
Vector3f dimens = settingsContainer.getPreferredSize();
|
||||
Vector3f dimens2 = dropdown.getPopupContainer().getPreferredSize();
|
||||
dimens2.setX(dimens.getX());
|
||||
dropdown.getPopupContainer().setPreferredSize(dimens2);
|
||||
// Beenden-Button
|
||||
Button quitButton = settingsContainer.addChild(new Button("Beenden", new ElementId("button")));
|
||||
quitButton.setFontSize(32);
|
||||
@ -88,13 +66,13 @@ public class BuyCard extends Dialog {
|
||||
settingsContainer.setLocalTranslation(
|
||||
(app.getCamera().getWidth() - settingsContainer.getPreferredSize().x) / 2,
|
||||
(app.getCamera().getHeight() + settingsContainer.getPreferredSize().y) / 2,
|
||||
4
|
||||
8
|
||||
);
|
||||
|
||||
backgroundContainer.setLocalTranslation(
|
||||
(app.getCamera().getWidth() - settingsContainer.getPreferredSize().x - padding) / 2,
|
||||
(app.getCamera().getHeight() + settingsContainer.getPreferredSize().y+ padding) / 2,
|
||||
3
|
||||
7
|
||||
);
|
||||
|
||||
app.getGuiNode().attachChild(settingsContainer);
|
||||
|
Loading…
Reference in New Issue
Block a user