mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-23 00:28:08 +02:00
unlimited replay option
This commit is contained in:
@ -91,7 +91,15 @@ OptionsTabBase::OptionsTabBase(const JsonPath & configPath)
|
||||
});
|
||||
|
||||
addCallback("setCheatAllowed", [&](int index){
|
||||
CSH->setCheatAllowedInfo(index);
|
||||
ExtraOptionsInfo info = SEL->getStartInfo()->extraOptionsInfo;
|
||||
info.cheatsAllowed = index;
|
||||
CSH->setExtraOptionsInfo(info);
|
||||
});
|
||||
|
||||
addCallback("setUnlimitedReplay", [&](int index){
|
||||
ExtraOptionsInfo info = SEL->getStartInfo()->extraOptionsInfo;
|
||||
info.unlimitedReplay = index;
|
||||
CSH->setExtraOptionsInfo(info);
|
||||
});
|
||||
|
||||
addCallback("setTurnTimerAccumulate", [&](int index){
|
||||
@ -391,5 +399,8 @@ void OptionsTabBase::recreate()
|
||||
}
|
||||
|
||||
if(auto buttonCheatAllowed = widget<CToggleButton>("buttonCheatAllowed"))
|
||||
buttonCheatAllowed->setSelectedSilent(SEL->getStartInfo()->cheatAllowed);
|
||||
buttonCheatAllowed->setSelectedSilent(SEL->getStartInfo()->extraOptionsInfo.cheatsAllowed);
|
||||
|
||||
if(auto buttonUnlimitedReplay = widget<CToggleButton>("buttonUnlimitedReplay"))
|
||||
buttonUnlimitedReplay->setSelectedSilent(SEL->getStartInfo()->extraOptionsInfo.unlimitedReplay);
|
||||
}
|
||||
|
Reference in New Issue
Block a user