add some more about buttons (#451)

This commit is contained in:
Logan McNaughton 2025-06-28 10:43:09 +02:00 committed by GitHub
parent 5d8ac37a0f
commit 3183a5eb0b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 51 additions and 0 deletions

View File

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

View File

@ -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 {

View File

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