conforms file names to consistant standard
This commit is contained in:
23
scripts/confirmation_popup.gd
Normal file
23
scripts/confirmation_popup.gd
Normal file
@@ -0,0 +1,23 @@
|
||||
class_name ConfirmationPopup
|
||||
extends PanelContainer
|
||||
|
||||
signal completed(outcome: bool)
|
||||
|
||||
func set_popup(prompt_text: String, confirm_text: String, cancel_text: String) -> void:
|
||||
$VBoxContainer/Label.text = tr(prompt_text)
|
||||
$VBoxContainer/HBoxContainer/Confirm.text = tr(confirm_text)
|
||||
$VBoxContainer/HBoxContainer/Cancel.text = tr(cancel_text)
|
||||
|
||||
|
||||
func _on_confirm_pressed() -> void:
|
||||
completed.emit(true)
|
||||
queue_free()
|
||||
|
||||
|
||||
func _on_cancel_pressed() -> void:
|
||||
completed.emit(false)
|
||||
queue_free()
|
||||
|
||||
|
||||
func _on_button_mouse_entered() -> void:
|
||||
$AudioStreamPlayer.play()
|
||||
Reference in New Issue
Block a user