From 72863ffa31e27f4c6be862d80472cfb897fccaea Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Tue, 19 Nov 2024 15:24:50 +0100 Subject: next commit --- UI/lobby_setting.gd | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 UI/lobby_setting.gd (limited to 'UI/lobby_setting.gd') diff --git a/UI/lobby_setting.gd b/UI/lobby_setting.gd new file mode 100644 index 0000000..a5b9e7e --- /dev/null +++ b/UI/lobby_setting.gd @@ -0,0 +1,26 @@ +extends HBoxContainer + + +signal value_changed(value: String) + +var label := "": + set(value): + $Label.text = str(value) + name = str(value) + get(): + return $Label.text + +var value: Variant = "": + set(value): + $TextEdit.text = str(value) + get(): + return $TextEdit.text + +var disabled := false: + set(value): + disabled = value + $TextEdit.editable = !disabled + + +func _on_text_edit_text_changed(new_text: String) -> void: + value_changed.emit(new_text) -- cgit v1.2.3