diff options
Diffstat (limited to 'src/ui/ShortcutHub.cpp')
-rw-r--r-- | src/ui/ShortcutHub.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ui/ShortcutHub.cpp b/src/ui/ShortcutHub.cpp index 145cfa87..c9ce6cdd 100644 --- a/src/ui/ShortcutHub.cpp +++ b/src/ui/ShortcutHub.cpp @@ -10,11 +10,11 @@ #include <optional> namespace cru::ui { -int ShortcutHub::RegisterShortcut(std::u16string name, ShortcutKeyBind bind, - std::function<bool()> handler) { +int ShortcutHub::RegisterShortcut(Shortcut shortcut) { const int id = current_id_++; - ShortcutInfo info{id, std::move(name), bind, std::move(handler)}; - map_[bind].push_back(std::move(info)); + map_[shortcut.key_bind].push_back({id, std::move(shortcut.name), + shortcut.key_bind, + std::move(shortcut.handler)}); return id; } |