mirror of
https://github.com/Relintai/uml_generator.git
synced 2025-01-27 15:39:21 +01:00
Multiple columns support.
This commit is contained in:
parent
e006794655
commit
b99e2bbaef
@ -82,6 +82,9 @@ func _process_state_next(delta):
|
|||||||
content = content.replace("\r\n", "\n")
|
content = content.replace("\r\n", "\n")
|
||||||
var lines : Array = content.split("\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 in_class : bool = false
|
||||||
var current_class_access_modifier : int = AccessModifierState.ACCESS_MODIFIER_PRIVATE
|
var current_class_access_modifier : int = AccessModifierState.ACCESS_MODIFIER_PRIVATE
|
||||||
var class_control : Control = null
|
var class_control : Control = null
|
||||||
@ -96,13 +99,19 @@ func _process_state_next(delta):
|
|||||||
if l[0] == "#":
|
if l[0] == "#":
|
||||||
continue
|
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 "):
|
if l.begins_with("base_class "):
|
||||||
var base_class : String = l.trim_prefix("base_class ")
|
var base_class : String = l.trim_prefix("base_class ")
|
||||||
|
|
||||||
var bcc = BaseClassControl.instance()
|
var bcc = BaseClassControl.instance()
|
||||||
bcc.set_base_class_name(base_class)
|
bcc.set_base_class_name(base_class)
|
||||||
|
|
||||||
_content_container.add_child(bcc)
|
current_content_container.add_child(bcc)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if l.begins_with("class "):
|
if l.begins_with("class "):
|
||||||
@ -110,7 +119,7 @@ func _process_state_next(delta):
|
|||||||
current_class_access_modifier = AccessModifierState.ACCESS_MODIFIER_PRIVATE
|
current_class_access_modifier = AccessModifierState.ACCESS_MODIFIER_PRIVATE
|
||||||
class_control = ClassControl.instance()
|
class_control = ClassControl.instance()
|
||||||
class_control.set_class_name(l.trim_prefix("class "))
|
class_control.set_class_name(l.trim_prefix("class "))
|
||||||
_content_container.add_child(class_control)
|
current_content_container.add_child(class_control)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if l.begins_with("struct "):
|
if l.begins_with("struct "):
|
||||||
@ -118,7 +127,7 @@ func _process_state_next(delta):
|
|||||||
current_class_access_modifier = AccessModifierState.ACCESS_MODIFIER_PUBLIC
|
current_class_access_modifier = AccessModifierState.ACCESS_MODIFIER_PUBLIC
|
||||||
class_control = ClassControl.instance()
|
class_control = ClassControl.instance()
|
||||||
class_control.set_class_name(l.trim_prefix("struct "))
|
class_control.set_class_name(l.trim_prefix("struct "))
|
||||||
_content_container.add_child(class_control)
|
current_content_container.add_child(class_control)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if l.begins_with("public:"):
|
if l.begins_with("public:"):
|
||||||
|
@ -14,6 +14,4 @@ content_container_path = NodePath("ScrollContainer/Content")
|
|||||||
margin_right = 1024.0
|
margin_right = 1024.0
|
||||||
margin_bottom = 600.0
|
margin_bottom = 600.0
|
||||||
|
|
||||||
[node name="Content" type="VBoxContainer" parent="ScrollContainer"]
|
[node name="Content" type="HBoxContainer" parent="ScrollContainer"]
|
||||||
custom_constants/separation = 0
|
|
||||||
alignment = 1
|
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
|
|
||||||
|
class ASd
|
||||||
|
current_content_container.set("custom_constants/separation", 0)
|
||||||
|
new_column
|
||||||
base_class Object
|
base_class Object
|
||||||
base_class Reference
|
base_class Reference
|
||||||
class Directory
|
class Directory
|
||||||
|
Loading…
Reference in New Issue
Block a user