diff --git a/project/UMLGenerator.gd b/project/UMLGenerator.gd index 2af9e50..7fc27f5 100644 --- a/project/UMLGenerator.gd +++ b/project/UMLGenerator.gd @@ -3,6 +3,7 @@ extends Control var BaseClassArrow = preload("res://BaseClassArrow.tscn") var ClassControl = preload("res://ClassControl.tscn") +export(NodePath) var main_container_path : NodePath export(NodePath) var content_container_path : NodePath enum States { @@ -156,11 +157,13 @@ func _process_state_next(delta): _current_state = States.STATE_RESIZE_WINDOW func _process_state_resize_window(delta): - pass - #_current_state = States.STATE_TAKE_SCREENSHOT + var rs : Vector2 = get_node(main_container_path).rect_size + OS.window_size = rs + _current_state = States.STATE_TAKE_SCREENSHOT func _process_state_take_screenshot(delta): + return _current_index += 1 _current_state = States.STATE_NEXT diff --git a/project/UMLGenerator.tscn b/project/UMLGenerator.tscn index c56768e..87be774 100644 --- a/project/UMLGenerator.tscn +++ b/project/UMLGenerator.tscn @@ -8,10 +8,23 @@ anchor_right = 1.0 anchor_bottom = 1.0 theme = ExtResource( 4 ) script = ExtResource( 1 ) -content_container_path = NodePath("ScrollContainer/Content") +main_container_path = NodePath("ScrollContainer/MarginContainer") +content_container_path = NodePath("ScrollContainer/MarginContainer") [node name="ScrollContainer" type="ScrollContainer" parent="."] margin_right = 1024.0 margin_bottom = 600.0 -[node name="Content" type="HBoxContainer" parent="ScrollContainer"] +[node name="MarginContainer" type="MarginContainer" parent="ScrollContainer"] +margin_right = 16.0 +margin_bottom = 16.0 +custom_constants/margin_right = 8 +custom_constants/margin_top = 8 +custom_constants/margin_left = 8 +custom_constants/margin_bottom = 8 + +[node name="Content" type="HBoxContainer" parent="ScrollContainer/MarginContainer"] +margin_left = 8.0 +margin_top = 8.0 +margin_right = 8.0 +margin_bottom = 8.0