diff options
Diffstat (limited to 'UI/lobby_setting.gd')
-rw-r--r-- | UI/lobby_setting.gd | 26 |
1 files changed, 26 insertions, 0 deletions
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) |