diff options
Diffstat (limited to 'include/cru/ui/helper/ShortcutHub.hpp')
-rw-r--r-- | include/cru/ui/helper/ShortcutHub.hpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/cru/ui/helper/ShortcutHub.hpp b/include/cru/ui/helper/ShortcutHub.hpp index 7f098a6d..ed90381d 100644 --- a/include/cru/ui/helper/ShortcutHub.hpp +++ b/include/cru/ui/helper/ShortcutHub.hpp @@ -32,6 +32,10 @@ class ShortcutKeyBind { platform::gui::KeyCode GetKey() const { return key_; } platform::gui::KeyModifier GetModifier() const { return modifier_; } + ShortcutKeyBind AddModifier(platform::gui::KeyModifier modifier) const { + return ShortcutKeyBind(key_, modifier_ | modifier); + } + bool Is(platform::gui::KeyCode key, platform::gui::KeyModifier modifier) const { return key == key_ && modifier == modifier_; |