diff --git a/project/UMLGenerator.gd b/project/UMLGenerator.gd index 45adea2..b9d43e0 100644 --- a/project/UMLGenerator.gd +++ b/project/UMLGenerator.gd @@ -82,6 +82,9 @@ func _process_state_next(delta): content = content.replace("\r\n", "\n") var lines : Array = content.split("\n") + var current_content_container : VBoxContainer = VBoxContainer.new() + current_content_container.set("custom_constants/separation", 0) + _content_container.add_child(current_content_container) var in_class : bool = false var current_class_access_modifier : int = AccessModifierState.ACCESS_MODIFIER_PRIVATE var class_control : Control = null @@ -96,13 +99,19 @@ func _process_state_next(delta): if l[0] == "#": continue + if l.begins_with("new_column"): + current_content_container = VBoxContainer.new() + current_content_container.set("custom_constants/separation", 0) + _content_container.add_child(current_content_container) + continue + if l.begins_with("base_class "): var base_class : String = l.trim_prefix("base_class ") var bcc = BaseClassControl.instance() bcc.set_base_class_name(base_class) - _content_container.add_child(bcc) + current_content_container.add_child(bcc) continue if l.begins_with("class "): @@ -110,7 +119,7 @@ func _process_state_next(delta): current_class_access_modifier = AccessModifierState.ACCESS_MODIFIER_PRIVATE class_control = ClassControl.instance() class_control.set_class_name(l.trim_prefix("class ")) - _content_container.add_child(class_control) + current_content_container.add_child(class_control) continue if l.begins_with("struct "): @@ -118,7 +127,7 @@ func _process_state_next(delta): current_class_access_modifier = AccessModifierState.ACCESS_MODIFIER_PUBLIC class_control = ClassControl.instance() class_control.set_class_name(l.trim_prefix("struct ")) - _content_container.add_child(class_control) + current_content_container.add_child(class_control) continue if l.begins_with("public:"): diff --git a/project/UMLGenerator.tscn b/project/UMLGenerator.tscn index d2a5c33..c56768e 100644 --- a/project/UMLGenerator.tscn +++ b/project/UMLGenerator.tscn @@ -14,6 +14,4 @@ content_container_path = NodePath("ScrollContainer/Content") margin_right = 1024.0 margin_bottom = 600.0 -[node name="Content" type="VBoxContainer" parent="ScrollContainer"] -custom_constants/separation = 0 -alignment = 1 +[node name="Content" type="HBoxContainer" parent="ScrollContainer"] diff --git a/project/data/directory.umlg b/project/data/directory.umlg index 9af3a6e..0b1304f 100644 --- a/project/data/directory.umlg +++ b/project/data/directory.umlg @@ -1,4 +1,7 @@ +class ASd +current_content_container.set("custom_constants/separation", 0) +new_column base_class Object base_class Reference class Directory