From 60be6933be1030735dfb92e5f4e218cbdeb11071 Mon Sep 17 00:00:00 2001 From: Marc Beyer Date: Mon, 20 Dec 2021 16:56:58 +0100 Subject: [PATCH] Added back, today and next button --- .../src/main/java/main/MainController.java | 21 +++++++++++++++++++ .../src/main/resources/main/main-view.fxml | 10 +++++++-- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/client/app/src/main/java/main/MainController.java b/client/app/src/main/java/main/MainController.java index 984b955..cda918d 100644 --- a/client/app/src/main/java/main/MainController.java +++ b/client/app/src/main/java/main/MainController.java @@ -65,6 +65,27 @@ public class MainController { } } + @FXML + protected void onBackClick() { + weekOffset--; + setDates(); + updateEvents(); + } + + @FXML + protected void onTodayClick(){ + weekOffset = 0; + setDates(); + updateEvents(); + } + + @FXML + protected void onNextClick() { + weekOffset++; + setDates(); + updateEvents(); + } + @FXML protected void onAddBtnClick() { try { diff --git a/client/app/src/main/resources/main/main-view.fxml b/client/app/src/main/resources/main/main-view.fxml index b5bf7e2..31a3e46 100644 --- a/client/app/src/main/resources/main/main-view.fxml +++ b/client/app/src/main/resources/main/main-view.fxml @@ -30,7 +30,10 @@ - + + + + @@ -42,8 +45,11 @@ + + + - +