From 767de8dd75c40e5cdf6e30489bc0dc303134f335 Mon Sep 17 00:00:00 2001 From: sirjonasxx <36828922+sirjonasxx@users.noreply.github.com> Date: Mon, 28 Dec 2020 02:10:07 +0100 Subject: [PATCH] donate button --- .../java/gearth/ui/info/InfoController.java | 25 +++++++++++-- .../main/resources/gearth/ui/info/Info.fxml | 35 ++++++++++--------- 2 files changed, 40 insertions(+), 20 deletions(-) diff --git a/G-Earth/src/main/java/gearth/ui/info/InfoController.java b/G-Earth/src/main/java/gearth/ui/info/InfoController.java index 3e89178..59991b6 100644 --- a/G-Earth/src/main/java/gearth/ui/info/InfoController.java +++ b/G-Earth/src/main/java/gearth/ui/info/InfoController.java @@ -2,12 +2,13 @@ package gearth.ui.info; import gearth.Main; import javafx.event.ActionEvent; -import javafx.scene.control.Hyperlink; +import javafx.scene.control.*; import gearth.ui.SubForm; -import javafx.scene.control.Label; -import javafx.scene.control.Tooltip; import javafx.scene.image.Image; import javafx.scene.image.ImageView; +import javafx.scene.layout.FlowPane; +import javafx.scene.layout.Region; +import javafx.scene.web.WebView; /** * Created by Jonas on 06/04/18. @@ -51,4 +52,22 @@ public class InfoController extends SubForm { activateHyperlink(link_g_gearth); activateHyperlink(link_g_tanji); } + + public void donate(ActionEvent actionEvent) { + String pubkey = "1GEarthEV9Ua3RcixsKTcuc1PPZd9hqri3"; + + Alert alert = new Alert(Alert.AlertType.INFORMATION, "Donate Bitcoins", ButtonType.OK); + alert.setHeaderText("Donate Bitcoins"); + + WebView webView = new WebView(); + webView.getEngine().loadContent("Bitcoin public address:

" + + "" + + ""); + webView.setPrefSize(200, 100); + + alert.setResizable(false); + alert.getDialogPane().setMinHeight(Region.USE_PREF_SIZE); + alert.getDialogPane().setContent(webView); + alert.show(); + } } diff --git a/G-Earth/src/main/resources/gearth/ui/info/Info.fxml b/G-Earth/src/main/resources/gearth/ui/info/Info.fxml index 5c15c43..6d7397a 100644 --- a/G-Earth/src/main/resources/gearth/ui/info/Info.fxml +++ b/G-Earth/src/main/resources/gearth/ui/info/Info.fxml @@ -5,7 +5,7 @@ - + @@ -20,62 +20,63 @@ -