2 Commits

Author SHA1 Message Date
3ca6aa017a MenueController Button highlight 2023-02-01 18:21:40 +01:00
f5ca04983c MenueController Button highlight 2023-02-01 18:20:22 +01:00
2 changed files with 6 additions and 7 deletions

View File

@@ -5,9 +5,6 @@ import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.scene.Node;
import javafx.scene.control.*;
import javafx.scene.input.MouseEvent;
import java.util.HashMap;
public class MenueController {
@@ -90,12 +87,14 @@ public class MenueController {
buttons = p.getChildrenUnmodifiable();
for(Node button : buttons){
b.getStyleClass().remove("active");
System.out.println(b.getStyleClass());
/*
b.getStyleClass().remove("active");
if (button.equals(b)){
b.getStyleClass().add("active");;
}
*/
}
}
}

View File

@@ -32,9 +32,9 @@
</Label>
<VBox prefHeight="200.0" prefWidth="100.0">
<children>
<Button id="btFoodChoice" fx:id="btFirstMealMon" alignment="CENTER" mnemonicParsing="false" onAction="#onBtFirstMealMonClick" prefHeight="78.0" prefWidth="218.0" text="Mahlzeit 1" />
<Button id="btFoodChoice" fx:id="btSecondMealMon" alignment="CENTER" mnemonicParsing="false" onAction="#onBtSecondMealMonClick" prefHeight="78.0" prefWidth="218.0" text="Mahlzeit 2" />
<Button id="btFoodChoice" fx:id="btNoMealMon" alignment="CENTER" mnemonicParsing="false" onAction="#onBtNoMealMonClick" prefHeight="20.0" prefWidth="170.0" text="Keine Mahlzeit">
<Button id="btFoodChoice" fx:id="btFirstMealMon" alignment="CENTER" mnemonicParsing="false" onAction="#setButtonActive" prefHeight="78.0" prefWidth="218.0" text="Mahlzeit 1" />
<Button id="btFoodChoice" fx:id="btSecondMealMon" alignment="CENTER" mnemonicParsing="false" onAction="#setButtonActive" prefHeight="78.0" prefWidth="218.0" text="Mahlzeit 2" />
<Button id="btFoodChoice" fx:id="btNoMealMon" alignment="CENTER" mnemonicParsing="false" onAction="#setButtonActive" prefHeight="20.0" prefWidth="170.0" text="Keine Mahlzeit">
<VBox.margin>
<Insets bottom="20.0" />
</VBox.margin>