From 9e37421d6debfd1bf02c12b43a6ee2f75542e050 Mon Sep 17 00:00:00 2001 From: Sem van der Hoeven Date: Mon, 8 Apr 2019 13:08:20 +0200 Subject: [PATCH] ADD::added tooltip texts to all achievements --- .../client/controller/DashBoardController.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/Client/src/main/java/greenify/client/controller/DashBoardController.java b/src/Client/src/main/java/greenify/client/controller/DashBoardController.java index 463c537..7089d54 100644 --- a/src/Client/src/main/java/greenify/client/controller/DashBoardController.java +++ b/src/Client/src/main/java/greenify/client/controller/DashBoardController.java @@ -202,6 +202,7 @@ public class DashBoardController { */ public void initialize() throws InterruptedException { + hintText.setWrapText(true); hintText.setText(hints.randomHint()); //set the dashboardPane to visible @@ -256,6 +257,22 @@ public class DashBoardController { addExtraActivityButton2.setSkin(new ClickButtonSkin(addExtraActivityButton2)); addRandomHints(); + + addToolTip(achiev1Tip, "Starting off \n You did your first green activity!"); + addToolTip(achiev2Tip, "Social Butterfly \n You added three friends"); + addToolTip(achiev3Tip, "Green Saver \n You saved * of CO2"); + addToolTip(achiev4Tip, "Animal Friend \n You have eaten 10 vegetarian meals"); + addToolTip(achiev5Tip, "Tom Dumoulin \n You have biked * km"); + addToolTip(achiev6Tip, "Let it shine \n You installed solar panels"); + } + + /** + * adds a tooltip to the button. + * @param button the button to add the tooltip to. + * @param message the message to be displayed in the tooltip. + */ + public void addToolTip(Button button, String message) { + button.setTooltip(new Tooltip(message)); } /**