pandemonium_cms/game/addons/web_pages/classes/WebPageList.gd

21 lines
463 B
GDScript3
Raw Normal View History

tool
2022-08-23 16:21:12 +02:00
extends WebNode
2022-08-25 02:07:31 +02:00
class_name WebPageList, "res://addons/web_page_list/icons/icon_web_page_list.svg"
2022-08-23 15:54:28 +02:00
2022-08-25 01:51:27 +02:00
func add_post(post : WebPage) -> void:
2022-08-23 22:33:18 +02:00
if (get_child_count() > 0):
add_child_below_node(get_child(0), post)
move_child(get_child(1), 0)
else:
add_child(post)
if Engine.editor_hint:
post.owner = get_tree().edited_scene_root
2022-08-25 01:51:27 +02:00
func remove_post(post : WebPage) -> void:
2022-08-23 22:33:18 +02:00
remove_child(post)
# Temp hack for undoredo
func null_method() -> void:
pass