From 1e7fc7aad56dab1b996a802e138e18060a6d81a4 Mon Sep 17 00:00:00 2001 From: Sean Gilligan Date: Fri, 17 Sep 2021 10:07:02 -0700 Subject: [PATCH] =?UTF-8?q?walletfx:=20Hook=20up=20the=20unused=20?= =?UTF-8?q?=E2=80=9CPrimary=E2=80=9D=20and=20=E2=80=9CSecondary=E2=80=9D?= =?UTF-8?q?=20buttons?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I did this for two reasons: 1. So users will know why the buttons are there and that they work 2. A convenient way to test the informational alert function. --- .../src/main/java/wallettemplate/MainController.java | 9 +++++++++ .../src/main/resources/wallettemplate/main.fxml | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/wallettemplate/src/main/java/wallettemplate/MainController.java b/wallettemplate/src/main/java/wallettemplate/MainController.java index 3ceda7b12..dee6d4172 100644 --- a/wallettemplate/src/main/java/wallettemplate/MainController.java +++ b/wallettemplate/src/main/java/wallettemplate/MainController.java @@ -33,6 +33,7 @@ import javafx.util.Duration; import wallettemplate.controls.ClickableBitcoinAddress; import wallettemplate.controls.NotificationBarPane; import org.bitcoinj.walletfx.utils.BitcoinUIModel; +import org.bitcoinj.walletfx.utils.GuiUtils; import org.bitcoinj.walletfx.utils.easing.EasingMode; import org.bitcoinj.walletfx.utils.easing.ElasticInterpolator; @@ -100,6 +101,14 @@ public class MainController { screen.controller.initialize(null); } + public void primaryClicked(ActionEvent event) { + GuiUtils.informationalAlert("Unused button #1", "You can hook this up in your app"); + } + + public void secondaryClicked(ActionEvent event) { + GuiUtils.informationalAlert("Unused button #2", "You can hook this up in your app"); + } + public void restoreFromSeedAnimation() { // Buttons slide out ... TranslateTransition leave = new TranslateTransition(Duration.millis(1200), controlsBox); diff --git a/wallettemplate/src/main/resources/wallettemplate/main.fxml b/wallettemplate/src/main/resources/wallettemplate/main.fxml index 339e0ecd2..55b79273a 100644 --- a/wallettemplate/src/main/resources/wallettemplate/main.fxml +++ b/wallettemplate/src/main/resources/wallettemplate/main.fxml @@ -36,8 +36,8 @@ -