diff options
author | metamuffin <metamuffin@disroot.org> | 2025-06-09 14:32:35 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2025-06-09 14:32:35 +0200 |
commit | 6c3e56306c0e40081dc5a2389f1086bd8d10c2f3 (patch) | |
tree | af34d08ef2bb20f67b31d72f2252229f6b5dbfaf | |
parent | 0b343fbc8b1df891a09609e8f6079985e3351b79 (diff) | |
download | hurrycurry-6c3e56306c0e40081dc5a2389f1086bd8d10c2f3.tar hurrycurry-6c3e56306c0e40081dc5a2389f1086bd8d10c2f3.tar.bz2 hurrycurry-6c3e56306c0e40081dc5a2389f1086bd8d10c2f3.tar.zst |
disable lineedit context menu in general; fixes #300
-rw-r--r-- | client/menu/menu.gd | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/client/menu/menu.gd b/client/menu/menu.gd index 8d640f3b..9f3a827d 100644 --- a/client/menu/menu.gd +++ b/client/menu/menu.gd @@ -37,6 +37,7 @@ func _ready(): Global.focused_menu = self focus_first(self) connect_button_sounds(self) + disable_context_menus(self) update_parent_menu(self.get_parent()) if support_anim: anim_setup() if auto_anim: _menu_open() @@ -121,6 +122,12 @@ func connect_button_sounds(node: Node): for c in node.get_children(): connect_button_sounds(c) +func disable_context_menus(node: Node): + if node is LineEdit: + node.context_menu_enabled = false + for c in node.get_children(): + disable_context_menus(c) + func update_parent_menu(node: Node): if node is Menu: parent_menu = node elif node.get_parent() != null: update_parent_menu(node.get_parent()) |