From d6172a9c4c2fae17481533260d83c2690c21ea34 Mon Sep 17 00:00:00 2001 From: Laserlicht <13953785+Laserlicht@users.noreply.github.com> Date: Sat, 20 Jan 2024 13:42:37 +0100 Subject: [PATCH] disable buttons while loading (not changable) --- client/lobby/OptionsTabBase.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/client/lobby/OptionsTabBase.cpp b/client/lobby/OptionsTabBase.cpp index 218b1ccb4..19bc145b4 100644 --- a/client/lobby/OptionsTabBase.cpp +++ b/client/lobby/OptionsTabBase.cpp @@ -413,11 +413,20 @@ void OptionsTabBase::recreate() } if(auto buttonCheatAllowed = widget("buttonCheatAllowed")) + { buttonCheatAllowed->setSelectedSilent(SEL->getStartInfo()->extraOptionsInfo.cheatsAllowed); + buttonCheatAllowed->setInputEnabled(SEL->screenType != ESelectionScreen::loadGame); + } if(auto buttonUnlimitedReplay = widget("buttonUnlimitedReplay")) + { buttonUnlimitedReplay->setSelectedSilent(SEL->getStartInfo()->extraOptionsInfo.unlimitedReplay); + buttonUnlimitedReplay->setInputEnabled(SEL->screenType != ESelectionScreen::loadGame); + } if(auto buttonInviteHero = widget("buttonInviteHero")) + { buttonInviteHero->setSelectedSilent(SEL->getStartInfo()->extraOptionsInfo.inviteHero); + buttonInviteHero->setInputEnabled(SEL->screenType != ESelectionScreen::loadGame); + } }