don't show hardcore switch if it is not enabled (#795)
This commit is contained in:
parent
03f83fe917
commit
6eb3367f1b
@ -52,6 +52,7 @@ export component AppWindow inherits Window {
|
||||
in-out property ra_hardcore <=> RAData.hardcore;
|
||||
in-out property ra_challenge <=> RAData.challenge;
|
||||
in-out property ra_leaderboard <=> RAData.leaderboard;
|
||||
in-out property ra_softcore_only <=> RAData.ra_softcore_only;
|
||||
in-out property integer_scaling <=> SettingsData.integer_scaling;
|
||||
in-out property fullscreen <=> SettingsData.fullscreen;
|
||||
in-out property widescreen <=> SettingsData.widescreen;
|
||||
|
||||
@ -11,6 +11,7 @@ export global RAData {
|
||||
in-out property <bool> leaderboard;
|
||||
in-out property <bool> ra_logging_in;
|
||||
in-out property <bool> ra_show_profile;
|
||||
in-out property <bool> ra_softcore_only;
|
||||
in-out property <string> ra_username;
|
||||
in-out property <string> ra_password;
|
||||
in-out property <string> current_user_message;
|
||||
@ -43,7 +44,7 @@ export component RetroAchievements inherits Page {
|
||||
}
|
||||
}
|
||||
}
|
||||
HorizontalBox {
|
||||
if !RAData.ra_softcore_only:HorizontalBox {
|
||||
alignment: start;
|
||||
Switch {
|
||||
text: @tr("Hardcore mode");
|
||||
|
||||
@ -18,6 +18,10 @@ pub fn ra_window(app: &ui::gui::AppWindow) {
|
||||
app.set_ra_hardcore(true);
|
||||
}
|
||||
|
||||
if !cfg!(ra_hardcore_enabled) {
|
||||
app.set_ra_softcore_only(true);
|
||||
}
|
||||
|
||||
if app.get_ra_enabled() && !app.get_ra_username().is_empty() {
|
||||
let (tx, rx) = tokio::sync::oneshot::channel::<bool>();
|
||||
retroachievements::login_token_user(app.get_ra_username().to_string(), token, tx);
|
||||
|
||||
Reference in New Issue
Block a user