diff options
author | crupest <crupest@outlook.com> | 2021-11-15 16:26:25 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-11-15 16:26:25 +0800 |
commit | 4ac58d91bac0cebe2bdf5e11b9d63b9c41e6b39e (patch) | |
tree | 7a4a8f587ffadb9f722b33badf2568e1d325b818 /include/cru/ui/helper | |
parent | 63b4956c3a802ee1c0fd92d1ce56e9330b6de4d2 (diff) | |
download | cru-4ac58d91bac0cebe2bdf5e11b9d63b9c41e6b39e.tar.gz cru-4ac58d91bac0cebe2bdf5e11b9d63b9c41e6b39e.tar.bz2 cru-4ac58d91bac0cebe2bdf5e11b9d63b9c41e6b39e.zip |
...
Diffstat (limited to 'include/cru/ui/helper')
-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_; |