2018-08-15 11:00:30 +00:00
|
|
|
extends ReferenceRect
|
|
|
|
|
|
|
|
func _ready():
|
|
|
|
|
|
|
|
for child in self.get_children():
|
|
|
|
child.connect( "window_clicked", self, "_on_window_clicked" )
|
|
|
|
|
2018-08-19 09:58:35 +00:00
|
|
|
# var new_label = Label.new()
|
|
|
|
# new_label.set_name( "azerty" )
|
|
|
|
# new_label.set_text( "azertyuiop sdfghjklm wxcvbn" )
|
|
|
|
# new_label.set_autowrap( true )
|
|
|
|
# $ui_window.add_child( new_label )
|
|
|
|
# new_label = Label.new()
|
|
|
|
# new_label.set_name( "azerty2" )
|
|
|
|
# new_label.set_text( "2azertyuiop2 2sdfghjklm2 wxcvbn2" )
|
|
|
|
# new_label.set_autowrap( true )
|
|
|
|
# $ui_window.add_child( new_label )
|
2018-08-17 09:00:27 +00:00
|
|
|
|
2018-08-15 11:00:30 +00:00
|
|
|
|
|
|
|
func _on_window_clicked( window ):
|
|
|
|
var index = 0
|
|
|
|
for child in self.get_children():
|
|
|
|
self.move_child(child, index)
|
|
|
|
index += 1
|
2018-08-16 12:53:10 +00:00
|
|
|
self.move_child(window, index)
|
|
|
|
|