aboutsummaryrefslogtreecommitdiff
path: root/include/cru/ui/helper
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-11-15 16:26:25 +0800
committercrupest <crupest@outlook.com>2021-11-15 16:26:25 +0800
commit4ac58d91bac0cebe2bdf5e11b9d63b9c41e6b39e (patch)
tree7a4a8f587ffadb9f722b33badf2568e1d325b818 /include/cru/ui/helper
parent63b4956c3a802ee1c0fd92d1ce56e9330b6de4d2 (diff)
downloadcru-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.hpp4
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_;