ADD::added tooltip texts to all achievements

This commit is contained in:
Sem van der Hoeven
2019-04-08 13:08:20 +02:00
parent 31def99398
commit 9e37421d6d

View File

@@ -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));
}
/**