add button for netplay discord (#452)
This commit is contained in:
parent
3183a5eb0b
commit
11830b0222
@ -87,6 +87,10 @@ fn netplay_window(app: &AppWindow, controller_paths: &[Option<String>]) {
|
||||
})
|
||||
.unwrap();
|
||||
});
|
||||
|
||||
app.on_netplay_discord_button_clicked(move || {
|
||||
open::that_detached("https://discord.gg/JyW6ZgBUyS").unwrap();
|
||||
});
|
||||
}
|
||||
|
||||
fn local_game_window(app: &AppWindow, controller_paths: &[Option<String>]) {
|
||||
|
||||
@ -26,6 +26,7 @@ export component AppWindow inherits Window {
|
||||
callback input_profile_button_clicked;
|
||||
callback create_session_button_clicked;
|
||||
callback join_session_button_clicked;
|
||||
callback netplay_discord_button_clicked;
|
||||
in property version <=> AboutData.version;
|
||||
in property has_update <=> AboutData.has_update;
|
||||
in-out property integer_scaling <=> SettingsData.integer_scaling;
|
||||
@ -83,6 +84,9 @@ export component AppWindow inherits Window {
|
||||
join_session_button_clicked => {
|
||||
join_session_button_clicked();
|
||||
}
|
||||
netplay_discord_button_clicked => {
|
||||
netplay_discord_button_clicked();
|
||||
}
|
||||
}
|
||||
if(side-bar.current-item == 3): Settings { }
|
||||
if(side-bar.current-item == 4): About {
|
||||
|
||||
@ -36,6 +36,7 @@ export component NetplayDialog inherits Dialog {
|
||||
export component Netplay inherits Page {
|
||||
callback create_session_button_clicked;
|
||||
callback join_session_button_clicked;
|
||||
callback netplay_discord_button_clicked;
|
||||
title: @tr("Netplay");
|
||||
|
||||
VerticalBox {
|
||||
@ -59,5 +60,15 @@ export component Netplay inherits Page {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
HorizontalBox {
|
||||
alignment: center;
|
||||
Button {
|
||||
text: @tr("Netplay Discord Channel");
|
||||
clicked => {
|
||||
netplay_discord_button_clicked();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user