diff options
Diffstat (limited to 'scene/gui/shortcut.cpp')
-rw-r--r-- | scene/gui/shortcut.cpp | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/scene/gui/shortcut.cpp b/scene/gui/shortcut.cpp index 262d8076f3..a529c52065 100644 --- a/scene/gui/shortcut.cpp +++ b/scene/gui/shortcut.cpp @@ -33,23 +33,19 @@ #include "core/os/keyboard.h" void ShortCut::set_shortcut(const Ref<InputEvent> &p_shortcut) { - shortcut = p_shortcut; emit_changed(); } Ref<InputEvent> ShortCut::get_shortcut() const { - return shortcut; } bool ShortCut::is_shortcut(const Ref<InputEvent> &p_event) const { - return shortcut.is_valid() && shortcut->shortcut_match(p_event); } String ShortCut::get_as_text() const { - if (shortcut.is_valid()) return shortcut->as_text(); else @@ -57,12 +53,10 @@ String ShortCut::get_as_text() const { } bool ShortCut::is_valid() const { - return shortcut.is_valid(); } void ShortCut::_bind_methods() { - ClassDB::bind_method(D_METHOD("set_shortcut", "event"), &ShortCut::set_shortcut); ClassDB::bind_method(D_METHOD("get_shortcut"), &ShortCut::get_shortcut); |