Represents a keyboard shortcut with its associated action. More...
#include <keyboard_shortcuts.h>
Public Member Functions | |
| std::string | GetDisplayString () const |
| bool | Matches (ImGuiKey pressed_key, bool ctrl, bool shift, bool alt) const |
Public Attributes | |
| std::string | id |
| std::string | description |
| ImGuiKey | key |
| bool | requires_ctrl = false |
| bool | requires_shift = false |
| bool | requires_alt = false |
| std::string | category |
| ShortcutContext | context |
| std::function< void()> | action |
| bool | enabled = true |
Represents a keyboard shortcut with its associated action.
Definition at line 43 of file keyboard_shortcuts.h.
| std::string yaze::gui::Shortcut::GetDisplayString | ( | ) | const |
Definition at line 112 of file keyboard_shortcuts.cc.
References yaze::gui::GetAltDisplayName(), yaze::gui::GetCtrlDisplayName(), yaze::gui::GetKeyName(), key, requires_alt, requires_ctrl, and requires_shift.
Referenced by yaze::gui::KeyboardShortcuts::DrawShortcutRow().

| bool yaze::gui::Shortcut::Matches | ( | ImGuiKey | pressed_key, |
| bool | ctrl, | ||
| bool | shift, | ||
| bool | alt ) const |
Definition at line 134 of file keyboard_shortcuts.cc.
References enabled, key, requires_alt, requires_ctrl, and requires_shift.
| std::string yaze::gui::Shortcut::id |
Definition at line 44 of file keyboard_shortcuts.h.
Referenced by yaze::gui::KeyboardShortcuts::RegisterShortcut(), and yaze::gui::KeyboardShortcuts::RegisterShortcut().
| std::string yaze::gui::Shortcut::description |
Definition at line 45 of file keyboard_shortcuts.h.
Referenced by yaze::gui::KeyboardShortcuts::DrawShortcutRow(), and yaze::gui::KeyboardShortcuts::RegisterShortcut().
| ImGuiKey yaze::gui::Shortcut::key |
Definition at line 46 of file keyboard_shortcuts.h.
Referenced by GetDisplayString(), Matches(), and yaze::gui::KeyboardShortcuts::RegisterShortcut().
| bool yaze::gui::Shortcut::requires_ctrl = false |
Definition at line 47 of file keyboard_shortcuts.h.
Referenced by GetDisplayString(), Matches(), and yaze::gui::KeyboardShortcuts::RegisterShortcut().
| bool yaze::gui::Shortcut::requires_shift = false |
Definition at line 48 of file keyboard_shortcuts.h.
Referenced by GetDisplayString(), Matches(), and yaze::gui::KeyboardShortcuts::RegisterShortcut().
| bool yaze::gui::Shortcut::requires_alt = false |
Definition at line 49 of file keyboard_shortcuts.h.
Referenced by GetDisplayString(), Matches(), and yaze::gui::KeyboardShortcuts::RegisterShortcut().
| std::string yaze::gui::Shortcut::category |
Definition at line 50 of file keyboard_shortcuts.h.
Referenced by yaze::gui::KeyboardShortcuts::RegisterShortcut().
| ShortcutContext yaze::gui::Shortcut::context |
Definition at line 51 of file keyboard_shortcuts.h.
Referenced by yaze::gui::KeyboardShortcuts::DrawShortcutRow(), yaze::gui::KeyboardShortcuts::IsShortcutActiveInContext(), and yaze::gui::KeyboardShortcuts::RegisterShortcut().
| std::function<void()> yaze::gui::Shortcut::action |
Definition at line 52 of file keyboard_shortcuts.h.
Referenced by yaze::gui::KeyboardShortcuts::RegisterShortcut().
| bool yaze::gui::Shortcut::enabled = true |
Definition at line 53 of file keyboard_shortcuts.h.
Referenced by Matches(), and yaze::gui::KeyboardShortcuts::RegisterShortcut().