mirror of
https://github.com/Relintai/broken_seals.git
synced 2024-11-13 20:47:19 +01:00
Now HSeparators can also be added to the property inspector.
This commit is contained in:
parent
cae4735ae2
commit
ef03b30dfe
@ -6,6 +6,16 @@ var EditorResourceWidget : PackedScene = preload("res://addons/world_generator/w
|
||||
var _edited_resource : WorldGenBaseResource = null
|
||||
var properties : Array = Array()
|
||||
|
||||
func add_h_separator() -> int:
|
||||
var hsep : HSeparator = HSeparator.new()
|
||||
|
||||
var content_node = $MainContainer/Content
|
||||
|
||||
content_node.add_child(hsep)
|
||||
var slot_idx : int = content_node.get_child_count() - 1
|
||||
|
||||
return slot_idx
|
||||
|
||||
func add_slot_color(getter : String, setter : String) -> int:
|
||||
var cp : ColorPickerButton = ColorPickerButton.new()
|
||||
|
||||
|
@ -173,6 +173,7 @@ func spawn_dungeon(chunk: TerraChunk, dungeon_seed : int, spawn_mobs : bool) ->
|
||||
func setup_property_inspector(inspector) -> void:
|
||||
.setup_property_inspector(inspector)
|
||||
|
||||
inspector.add_h_separator()
|
||||
inspector.add_slot_resource("get_dungeon_teleporter", "set_dungeon_teleporter", "Dungeon Teleporter", "PackedScene")
|
||||
inspector.add_slot_resource("get_prop_tree", "set_prop_tree", "Prop Tree", "PropData")
|
||||
inspector.add_slot_resource("get_prop_tree2", "set_prop_tree2", "Prop Tree2", "PropData")
|
||||
|
@ -62,5 +62,6 @@ func get_editor_additional_text() -> String:
|
||||
func setup_property_inspector(inspector) -> void:
|
||||
.setup_property_inspector(inspector)
|
||||
|
||||
inspector.add_h_separator()
|
||||
inspector.add_slot_resource("get_trainer", "set_trainer", "Trainer", "EntityData")
|
||||
inspector.add_slot_resource("get_vendor", "set_vendor", "Vendor", "EntityData")
|
||||
|
Loading…
Reference in New Issue
Block a user