You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Fix typo in BaseButton shortcut context methods
This commit is contained in:
@@ -349,7 +349,7 @@ Ref<Shortcut> BaseButton::get_shortcut() const {
|
|||||||
void BaseButton::unhandled_key_input(const Ref<InputEvent> &p_event) {
|
void BaseButton::unhandled_key_input(const Ref<InputEvent> &p_event) {
|
||||||
ERR_FAIL_COND(p_event.is_null());
|
ERR_FAIL_COND(p_event.is_null());
|
||||||
|
|
||||||
if (!_is_focus_owner_in_shorcut_context()) {
|
if (!_is_focus_owner_in_shortcut_context()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -404,7 +404,7 @@ Node *BaseButton::get_shortcut_context() const {
|
|||||||
return ctx_node;
|
return ctx_node;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BaseButton::_is_focus_owner_in_shorcut_context() const {
|
bool BaseButton::_is_focus_owner_in_shortcut_context() const {
|
||||||
if (shortcut_context == ObjectID()) {
|
if (shortcut_context == ObjectID()) {
|
||||||
// No context, therefore global - always "in" context.
|
// No context, therefore global - always "in" context.
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ protected:
|
|||||||
virtual void unhandled_key_input(const Ref<InputEvent> &p_event) override;
|
virtual void unhandled_key_input(const Ref<InputEvent> &p_event) override;
|
||||||
void _notification(int p_what);
|
void _notification(int p_what);
|
||||||
|
|
||||||
bool _is_focus_owner_in_shorcut_context() const;
|
bool _is_focus_owner_in_shortcut_context() const;
|
||||||
|
|
||||||
GDVIRTUAL0(_pressed)
|
GDVIRTUAL0(_pressed)
|
||||||
GDVIRTUAL1(_toggled, bool)
|
GDVIRTUAL1(_toggled, bool)
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
void MenuButton::unhandled_key_input(const Ref<InputEvent> &p_event) {
|
void MenuButton::unhandled_key_input(const Ref<InputEvent> &p_event) {
|
||||||
ERR_FAIL_COND(p_event.is_null());
|
ERR_FAIL_COND(p_event.is_null());
|
||||||
|
|
||||||
if (!_is_focus_owner_in_shorcut_context()) {
|
if (!_is_focus_owner_in_shortcut_context()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user