summaryrefslogtreecommitdiffstats
path: root/scene/gui/control.h
diff options
context:
space:
mode:
authorEric M <itsjusteza@gmail.com>2022-09-25 00:32:53 +1000
committerEric M <itsjusteza@gmail.com>2022-10-13 21:07:19 +1000
commita3ed9e6f2cfb539418b06d75fc96352634b81352 (patch)
treefd2bba9175b4435b5dfd5247e8023a136e1d5794 /scene/gui/control.h
parentfd4572cc45506f901e68a2cb485f44ffd01b937e (diff)
downloadredot-engine-a3ed9e6f2cfb539418b06d75fc96352634b81352.tar.gz
Move Shortcut Context to Control and ensure that `shortcut_input` adheres to contexts. Also ensure that controls with no context are only triggered AFTER nodes which do have a context.
Diffstat (limited to 'scene/gui/control.h')
-rw-r--r--scene/gui/control.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/scene/gui/control.h b/scene/gui/control.h
index ee6443c81c..7e997ef3d5 100644
--- a/scene/gui/control.h
+++ b/scene/gui/control.h
@@ -218,6 +218,8 @@ private:
NodePath focus_next;
NodePath focus_prev;
+ ObjectID shortcut_context;
+
// Theming.
ThemeOwner *theme_owner = nullptr;
@@ -487,6 +489,10 @@ public:
void warp_mouse(const Point2 &p_position);
+ bool is_focus_owner_in_shortcut_context() const;
+ void set_shortcut_context(const Node *p_node);
+ Node *get_shortcut_context() const;
+
// Drag and drop handling.
virtual void set_drag_forwarding(Object *p_target);