Skip to content
Snippets Groups Projects
Commit e4eea60e authored by Harry Linrui XU's avatar Harry Linrui XU
Browse files

Linked food button in main menu to suggest recipe page

parent c0cc4f0e
No related branches found
No related tags found
1 merge request!43Merging frontend-testing into master
......@@ -242,7 +242,7 @@ public class MainMenu {
private void switchScene(ActionEvent event) throws IOException {
FXMLLoader loader = new FXMLLoader();
if (event.getSource() == foodBtn) {
System.out.println("Food button pressed");
loader.setLocation(getClass().getResource("/view/SuggestRecipes.fxml"));
} else if (event.getSource() == expenseBtn) {
loader.setLocation(getClass().getResource("/view/IncomeAndExpenses.fxml"));
} else if (event.getSource() == incomeBtn) {
......
......@@ -188,7 +188,7 @@
</BorderPane>
<TilePane alignment="CENTER" hgap="50.0" prefHeight="215.0" prefWidth="1131.0">
<children>
<Button fx:id="foodBtn" alignment="TOP_CENTER" contentDisplay="TOP" mnemonicParsing="false" prefHeight="100.0" prefWidth="150.0" text="Food">
<Button fx:id="foodBtn" alignment="TOP_CENTER" contentDisplay="TOP" mnemonicParsing="false" onAction="#switchScene" prefHeight="100.0" prefWidth="150.0" text="Food">
<graphic>
<ImageView fitHeight="75.0" fitWidth="75.0" pickOnBounds="true" preserveRatio="true">
<image>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment