28 lines
524 B
GDScript
28 lines
524 B
GDScript
extends Control
|
|
|
|
@export var button_arr:Array[LanguageButton]
|
|
@export var close_button:TextureButton
|
|
signal click(index:int)
|
|
|
|
signal close_requeset()
|
|
func _ready() -> void:
|
|
for i in button_arr:
|
|
i.click.connect(
|
|
func(node):
|
|
for j in button_arr:
|
|
j.is_selected=false
|
|
node.is_selected=true
|
|
click.emit(button_arr.find(node))
|
|
)
|
|
close_button.pressed.connect(
|
|
func():
|
|
close_requeset.emit()
|
|
)
|
|
|
|
pass
|
|
|
|
func set_select(ind:int):
|
|
for j in button_arr:
|
|
j.is_selected=false
|
|
button_arr[ind].is_selected=true
|