mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
Add keyboard shortcuts for replays (#5136)
* add keyboard shortcut for play/pause * add keyboard shortcut for fast-forward * make shortcuts rebindable * run formatter
This commit is contained in:
parent
fa999880ee
commit
d26f96db9e
2 changed files with 17 additions and 2 deletions
|
|
@ -257,6 +257,12 @@ void TabGame::refreshShortcuts()
|
|||
if (aFocusChat) {
|
||||
aFocusChat->setShortcuts(shortcuts.getShortcut("tab_game/aFocusChat"));
|
||||
}
|
||||
if (replayPlayButton) {
|
||||
replayPlayButton->setShortcut(shortcuts.getSingleShortcut("Replays/playButton"));
|
||||
}
|
||||
if (replayFastForwardButton) {
|
||||
replayFastForwardButton->setShortcut(shortcuts.getSingleShortcut("Replays/fastForwardButton"));
|
||||
}
|
||||
}
|
||||
|
||||
void DeckViewContainer::loadLocalDeck()
|
||||
|
|
|
|||
|
|
@ -28,7 +28,8 @@ public:
|
|||
Drawing,
|
||||
Chat_room,
|
||||
Game_window,
|
||||
Load_deck
|
||||
Load_deck,
|
||||
Replays
|
||||
};
|
||||
|
||||
static QString getGroupName(ShortcutGroup::Groups group)
|
||||
|
|
@ -68,6 +69,8 @@ public:
|
|||
return QApplication::translate("shortcutsTab", "Game Window");
|
||||
case Load_deck:
|
||||
return QApplication::translate("shortcutsTab", "Load Deck from Clipboard");
|
||||
case Replays:
|
||||
return QApplication::translate("shortcutsTab", "Replays");
|
||||
}
|
||||
|
||||
return {};
|
||||
|
|
@ -586,7 +589,13 @@ private:
|
|||
ShortcutGroup::Game_window)},
|
||||
{"DlgLoadDeckFromClipboard/refreshButton", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Refresh"),
|
||||
parseSequenceString("F5"),
|
||||
ShortcutGroup::Load_deck)}};
|
||||
ShortcutGroup::Load_deck)},
|
||||
{"Replays/playButton", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Play/Pause"),
|
||||
parseSequenceString("Space"),
|
||||
ShortcutGroup::Replays)},
|
||||
{"Replays/fastForwardButton", ShortcutKey(QT_TRANSLATE_NOOP("shortcutsTab", "Toggle Fast Forward"),
|
||||
parseSequenceString("Ctrl+Right"),
|
||||
ShortcutGroup::Replays)}};
|
||||
};
|
||||
|
||||
#endif // SHORTCUTSSETTINGS_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue