From 3183a5eb0b71e7c2b5290f160a19da958a62af46 Mon Sep 17 00:00:00 2001 From: Logan McNaughton <848146+loganmc10@users.noreply.github.com> Date: Sat, 28 Jun 2025 10:43:09 +0200 Subject: [PATCH] add some more about buttons (#451) --- src/ui/gui.rs | 9 +++++++++ src/ui/gui/about_page.slint | 30 ++++++++++++++++++++++++++++++ src/ui/gui/appwindow.slint | 12 ++++++++++++ 3 files changed, 51 insertions(+) diff --git a/src/ui/gui.rs b/src/ui/gui.rs index b5e5be3..dc5f300 100644 --- a/src/ui/gui.rs +++ b/src/ui/gui.rs @@ -282,6 +282,15 @@ fn about_window(app: &AppWindow) { app.on_discord_button_clicked(move || { open::that_detached("https://discord.gg/9RGXq8W8JQ").unwrap(); }); + app.on_patreon_button_clicked(move || { + open::that_detached("https://patreon.com/loganmc10").unwrap(); + }); + app.on_github_sponsors_button_clicked(move || { + open::that_detached("https://github.com/sponsors/loganmc10").unwrap(); + }); + app.on_source_code_button_clicked(move || { + open::that_detached("https://github.com/gopher64/gopher64").unwrap(); + }); app.on_newversion_button_clicked(move || { open::that_detached("https://github.com/gopher64/gopher64/releases/latest").unwrap(); }); diff --git a/src/ui/gui/about_page.slint b/src/ui/gui/about_page.slint index 85aff1e..ebdb628 100644 --- a/src/ui/gui/about_page.slint +++ b/src/ui/gui/about_page.slint @@ -27,6 +27,9 @@ export component About inherits Page { callback wiki_button_clicked; callback discord_button_clicked; callback newversion_button_clicked; + callback patreon_button_clicked; + callback github_sponsors_button_clicked; + callback source_code_button_clicked; title: @tr("About"); VerticalBox { @@ -51,6 +54,33 @@ export component About inherits Page { } } + HorizontalBox { + alignment: center; + Button { + text: @tr("Source Code"); + clicked => { + source_code_button_clicked(); + } + } + } + + HorizontalBox { + alignment: center; + Button { + text: @tr("Donate (via Patreon)"); + clicked => { + patreon_button_clicked(); + } + } + + Button { + text: @tr("Donate (via GitHub)"); + clicked => { + github_sponsors_button_clicked(); + } + } + } + HorizontalBox { alignment: center; Text { diff --git a/src/ui/gui/appwindow.slint b/src/ui/gui/appwindow.slint index 3d4a574..de64355 100644 --- a/src/ui/gui/appwindow.slint +++ b/src/ui/gui/appwindow.slint @@ -18,6 +18,9 @@ export component AppWindow inherits Window { callback wiki_button_clicked; callback discord_button_clicked; callback newversion_button_clicked; + callback patreon_button_clicked; + callback github_sponsors_button_clicked; + callback source_code_button_clicked; callback open_rom_button_clicked; callback saves_folder_button_clicked; callback input_profile_button_clicked; @@ -92,6 +95,15 @@ export component AppWindow inherits Window { newversion_button_clicked => { newversion_button_clicked(); } + patreon_button_clicked => { + patreon_button_clicked(); + } + github_sponsors_button_clicked => { + github_sponsors_button_clicked(); + } + source_code_button_clicked => { + source_code_button_clicked(); + } } } }