mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-07 10:33:24 -08:00
fix: keep only the roll-die shortcut active in the lobby (#6754)
Player menu shortcuts were bound as soon as a local player was added in the deck-selection lobby. Defer full activation until GameMetaInfo reports the game has started, and bind only Player/aRollDie while in the lobby. Counters follow the deactivation signal, so they cannot re-enable shortcuts before the game starts.
This commit is contained in:
parent
d9cd308a2e
commit
257a584971
4 changed files with 52 additions and 2 deletions
|
|
@ -150,4 +150,13 @@ void UtilityMenu::setShortcutsInactive()
|
|||
aCreateAnotherToken->setShortcut(QKeySequence());
|
||||
aIncrementAllCardCounters->setShortcut(QKeySequence());
|
||||
}
|
||||
}
|
||||
|
||||
void UtilityMenu::setLobbyShortcutsActive()
|
||||
{
|
||||
if (!player->getLogic()->getPlayerInfo()->getLocalOrJudge()) {
|
||||
return;
|
||||
}
|
||||
|
||||
aRollDie->setShortcuts(SettingsCache::instance().shortcuts().getShortcut("Player/aRollDie"));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue