Godot Version
4.2.1 Stable version
Question
I have a search container (Vbox container) with buttons that are hidden initially.
I have a LineEdit that when selected (has focus) will make the search container visible with the clickable buttons (the LineEdit has code that displays what buttons are visible/not as typing text, functions as a search bar).
My problem is that when I attempt to click the buttons the search container disappears because the LineEdit no longer has focus on it. This makes the clickable buttons unclickable. I was thinking of trying await commands or making it while the search container is active and mouse inside vbox container it would stop the container from disappearing, but at a loss at how to code that. All efforts that round end with it disappearing anyways.
example code
func is_search_bar_selected():
if search_bar.has_focus():
search_container.visible=true
if not cleared_text:
search_bar.text=""
cleared_text=true
else:
var list = search_menu_list.get_children()
var selected_button=null
for button in list:
if button.has_focus():
selected_button=button
break
if selected_button:
await(is_mouse_inside_search_container())
print(selected_button)
#problem is specifiically with search_container.visible=false
# (disappearing before buttons get clicked)
search_container.visible=false
search_bar.text=menu_state
cleared_text=false