mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-14 19:18:55 -07:00
Introduce additional checks for playerMenu shortcut activation for judges (#6275)
* Introduce additional checks for playerMenu shortcut activation when they are accessed by a judge, only activating them if the player is a local player. Took 2 hours 7 minutes Took 17 minutes * Undo example change. Took 5 minutes --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
parent
a8a3fca8c9
commit
55aaca0e0d
1 changed files with 8 additions and 1 deletions
|
|
@ -139,7 +139,14 @@ void PlayerMenu::retranslateUi()
|
||||||
void PlayerMenu::refreshShortcuts()
|
void PlayerMenu::refreshShortcuts()
|
||||||
{
|
{
|
||||||
if (shortcutsActive) {
|
if (shortcutsActive) {
|
||||||
setShortcutsActive();
|
// Judges get access to every player's menus but only want shortcuts to be set for their own.
|
||||||
|
if (player->getPlayerInfo()->getLocalOrJudge() && !player->getPlayerInfo()->getLocal()) {
|
||||||
|
setShortcutsInactive();
|
||||||
|
} else {
|
||||||
|
setShortcutsActive();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
setShortcutsInactive();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue