diff options
author | metamuffin <metamuffin@disroot.org> | 2025-07-17 22:05:26 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2025-07-17 22:05:28 +0200 |
commit | 5bc14ed9464bf9520cfc3841b46da85ec33583f1 (patch) | |
tree | ceac2bfdaaa5a93c8d9038573c29d2b4f557779b /client | |
parent | 838a48f0c9c16486ceb051121fc4a6eacbac07d5 (diff) | |
download | hurrycurry-5bc14ed9464bf9520cfc3841b46da85ec33583f1.tar hurrycurry-5bc14ed9464bf9520cfc3841b46da85ec33583f1.tar.bz2 hurrycurry-5bc14ed9464bf9520cfc3841b46da85ec33583f1.tar.zst |
Disable automatic focus grab for character menu name edit; fix #361
Diffstat (limited to 'client')
-rw-r--r-- | client/menu/character.tscn | 2 | ||||
-rw-r--r-- | client/menu/menu.gd | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/client/menu/character.tscn b/client/menu/character.tscn index b4f05fe2..ce5cb4d5 100644 --- a/client/menu/character.tscn +++ b/client/menu/character.tscn @@ -85,7 +85,7 @@ layout_mode = 2 text = "c.settings.username" horizontal_alignment = 1 -[node name="username" type="LineEdit" parent="VBoxContainer/top_panel/a"] +[node name="username" type="LineEdit" parent="VBoxContainer/top_panel/a" groups=["no_autoselect"]] layout_mode = 2 max_length = 32 diff --git a/client/menu/menu.gd b/client/menu/menu.gd index fa70d301..f5b99d4f 100644 --- a/client/menu/menu.gd +++ b/client/menu/menu.gd @@ -109,7 +109,7 @@ func focus_first(node: Node) -> bool: focus_auto_changed = true if node.is_in_group("no_auto_focus"): return false - if node is Button: + if node is Button or node is LineEdit and not node.is_in_group("no_autoselect"): node.grab_focus() print("Node %s (%s) was selected for focus" % [node.name, node]) return true |