Hi.
I've created a modal popup with nested LineEdits, the problem is that the popup closes when I try to select one of the LineEdits with a mouse. TAB-select works fine though. i've tried messing with set_focus_mode
and set_stop_mouse
but nothing seems to work. Here's a example code.
tool
extends Button
onready var m_popup = Popup.new()
onready var m_x = LineEdit.new()
onready var m_y = LineEdit.new()
func _ready():
connect("pressed", self, "clicked")
m_x.set_text("0")
m_y.set_text("0")
var hBox = HBoxContainer.new()
hBox.add_child(m_x)
hBox.add_child(m_y)
m_popup.add_child(hBox)
add_child(m_popup)
func clicked():
var pos = get_global_mouse_pos()
pos.x -= 125
pos.y += 10
m_popup.set_global_pos(pos)
m_popup.popup()