From a1f1407e3d7389638b655b46ddcd4df36e5df4df Mon Sep 17 00:00:00 2001 From: RodZill4 Date: Mon, 8 Feb 2021 21:03:37 +0100 Subject: [PATCH] Added correct focus chaining in nodes. --- material_maker/nodes/generic/generic.gd | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/material_maker/nodes/generic/generic.gd b/material_maker/nodes/generic/generic.gd index 4c9871a1..0d6e85f9 100644 --- a/material_maker/nodes/generic/generic.gd +++ b/material_maker/nodes/generic/generic.gd @@ -338,6 +338,7 @@ func update_node() -> void: if !generator.minimized: controls = {} index = -1 + var previous_focus = null for p in generator.get_parameter_defs(): if !p.has("name") or !p.has("type"): continue @@ -371,6 +372,10 @@ func update_node() -> void: control.size_flags_horizontal = SIZE_EXPAND | SIZE_FILL if hsizer != null: hsizer.add_child(control) + if previous_focus != null: + previous_focus.focus_next = control.get_path() + control.focus_previous = previous_focus.get_path() + previous_focus = control initialize_properties() # Outputs var outputs = generator.get_output_defs()