2022-08-25 10:56:43 +02:00
|
|
|
tool
|
|
|
|
extends AcceptDialog
|
|
|
|
|
|
|
|
signal on_entry_class_selected(entry_class)
|
|
|
|
|
2022-08-25 15:09:54 +02:00
|
|
|
var _init : bool = false
|
|
|
|
|
2022-08-25 10:56:43 +02:00
|
|
|
func _notification(what):
|
2022-08-25 15:09:54 +02:00
|
|
|
if what == NOTIFICATION_ENTER_TREE:
|
|
|
|
if !_init:
|
|
|
|
_init = true
|
|
|
|
|
|
|
|
get_ok().set_text("Close")
|
|
|
|
get_node("VBC/AddTitleTextButton").connect("pressed", self, "_add_title_text_button_pressed")
|
2022-08-25 16:05:45 +02:00
|
|
|
get_node("VBC/AddTextButton").connect("pressed", self, "_add_text_button_pressed")
|
2022-08-25 18:28:01 +02:00
|
|
|
get_node("VBC/AddimageButton").connect("pressed", self, "_add_image_button_pressed")
|
2022-08-25 10:56:43 +02:00
|
|
|
|
|
|
|
func _add_title_text_button_pressed() -> void:
|
|
|
|
emit_signal("on_entry_class_selected" , "WebPageEntryTitleText")
|
2022-08-25 15:09:54 +02:00
|
|
|
hide()
|
2022-08-25 16:05:45 +02:00
|
|
|
|
|
|
|
func _add_text_button_pressed() -> void:
|
|
|
|
emit_signal("on_entry_class_selected" , "WebPageEntryText")
|
|
|
|
hide()
|
2022-08-25 18:28:01 +02:00
|
|
|
|
|
|
|
func _add_image_button_pressed() -> void:
|
|
|
|
emit_signal("on_entry_class_selected" , "WebPageEntryImage")
|
|
|
|
hide()
|