waited far too long for an initial commit but here we are
This commit is contained in:
14
Scripts/text_input_popup.gd
Normal file
14
Scripts/text_input_popup.gd
Normal file
@ -0,0 +1,14 @@
|
||||
extends PanelContainer
|
||||
class_name TextInputPopup
|
||||
|
||||
signal completed(outcome)
|
||||
|
||||
func set_popup(prompt_text, placeholder_text, confirm_text):
|
||||
$VBoxContainer/LineEdit.text = prompt_text
|
||||
$VBoxContainer/LineEdit.placeholder_text = placeholder_text
|
||||
$VBoxContainer/Button.text = confirm_text
|
||||
|
||||
|
||||
func _on_button_pressed() -> void:
|
||||
completed.emit($VBoxContainer/LineEdit.text)
|
||||
queue_free()
|
Reference in New Issue
Block a user