waited far too long for an initial commit but here we are
This commit is contained in:
19
Scripts/confirmation_popup.gd
Normal file
19
Scripts/confirmation_popup.gd
Normal file
@ -0,0 +1,19 @@
|
||||
extends PanelContainer
|
||||
class_name ConfirmationPopup
|
||||
|
||||
signal completed(outcome)
|
||||
|
||||
func set_popup(prompt_text, confirm_text, cancel_text):
|
||||
$VBoxContainer/Label.text = prompt_text
|
||||
$VBoxContainer/HBoxContainer/Confirm.text = confirm_text
|
||||
$VBoxContainer/HBoxContainer/Cancel.text = cancel_text
|
||||
|
||||
|
||||
func _on_confirm_pressed() -> void:
|
||||
completed.emit(true)
|
||||
queue_free()
|
||||
|
||||
|
||||
func _on_cancel_pressed() -> void:
|
||||
completed.emit(false)
|
||||
queue_free()
|
Reference in New Issue
Block a user