yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::gui::Shortcut Struct Reference

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
 

Detailed Description

Represents a keyboard shortcut with its associated action.

Definition at line 43 of file keyboard_shortcuts.h.

Member Function Documentation

◆ GetDisplayString()

std::string yaze::gui::Shortcut::GetDisplayString ( ) const

◆ Matches()

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.

Member Data Documentation

◆ id

std::string yaze::gui::Shortcut::id

◆ description

std::string yaze::gui::Shortcut::description

◆ key

ImGuiKey yaze::gui::Shortcut::key

◆ requires_ctrl

bool yaze::gui::Shortcut::requires_ctrl = false

◆ requires_shift

bool yaze::gui::Shortcut::requires_shift = false

◆ requires_alt

bool yaze::gui::Shortcut::requires_alt = false

◆ category

std::string yaze::gui::Shortcut::category

Definition at line 50 of file keyboard_shortcuts.h.

Referenced by yaze::gui::KeyboardShortcuts::RegisterShortcut().

◆ context

◆ action

std::function<void()> yaze::gui::Shortcut::action

Definition at line 52 of file keyboard_shortcuts.h.

Referenced by yaze::gui::KeyboardShortcuts::RegisterShortcut().

◆ enabled

bool yaze::gui::Shortcut::enabled = true

Definition at line 53 of file keyboard_shortcuts.h.

Referenced by Matches(), and yaze::gui::KeyboardShortcuts::RegisterShortcut().


The documentation for this struct was generated from the following files: