LargeScreen/Modules/language_panel.gd
2024-12-19 19:13:12 +08:00

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