From d44b31b5a8985d73eb2b63d0bb5eaecfff109c75 Mon Sep 17 00:00:00 2001 From: OverloadedOrama <35376950+OverloadedOrama@users.noreply.github.com> Date: Wed, 20 Nov 2019 14:42:52 +0200 Subject: [PATCH] Merge pull request #20 with previous commit --- Main.tscn | 1 + Scripts/Canvas.gd | 4 ++-- Scripts/FrameButton.gd | 2 +- Scripts/HorizontalRuler.gd | 2 +- Scripts/LayerContainer.gd | 2 +- Scripts/VerticalRuler.gd | 2 +- 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Main.tscn b/Main.tscn index b932bc7..b4df5d9 100644 --- a/Main.tscn +++ b/Main.tscn @@ -904,6 +904,7 @@ margin_right = 224.0 margin_bottom = 530.0 [node name="TabContainer" type="TabContainer" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc"] +editor/display_folded = true margin_top = 533.0 margin_right = 224.0 margin_bottom = 605.0 diff --git a/Scripts/Canvas.gd b/Scripts/Canvas.gd index e62b751..e73b03f 100644 --- a/Scripts/Canvas.gd +++ b/Scripts/Canvas.gd @@ -650,8 +650,8 @@ func point_in_rectangle(p : Vector2, coord1 : Vector2, coord2 : Vector2) -> bool return p.x > coord1.x && p.y > coord1.y && p.x < coord2.x && p.y < coord2.y #Returns the position in the middle of a rectangle -func rectangle_center(pos : Vector2, size : Vector2) -> Vector2: - return (pos - size / 2).floor() +func rectangle_center(rect_position : Vector2, rect_size : Vector2) -> Vector2: + return (rect_position - rect_size / 2).floor() func _on_Timer_timeout() -> void: Global.can_draw = true diff --git a/Scripts/FrameButton.gd b/Scripts/FrameButton.gd index 709b409..2d17bc3 100644 --- a/Scripts/FrameButton.gd +++ b/Scripts/FrameButton.gd @@ -119,4 +119,4 @@ func change_frame_order(rate : int) -> void: Global.undo_redo.add_undo_method(Global, "undo", [Global.canvases[frame]]) Global.undo_redo.add_do_method(Global, "redo", [Global.canvases[frame]]) - Global.undo_redo.commit_action() \ No newline at end of file + Global.undo_redo.commit_action() diff --git a/Scripts/HorizontalRuler.gd b/Scripts/HorizontalRuler.gd index 4aa4ec2..d7b9f0e 100644 --- a/Scripts/HorizontalRuler.gd +++ b/Scripts/HorizontalRuler.gd @@ -52,4 +52,4 @@ func _draw() -> void: if i % minor_subdivision == 0: draw_line(Vector2(position.x + RULER_WIDTH, RULER_WIDTH * 0.33), Vector2(position.x + RULER_WIDTH, RULER_WIDTH), Color.white) else: - draw_line(Vector2(position.x + RULER_WIDTH, RULER_WIDTH * 0.66), Vector2(position.x + RULER_WIDTH, RULER_WIDTH), Color.white) \ No newline at end of file + draw_line(Vector2(position.x + RULER_WIDTH, RULER_WIDTH * 0.66), Vector2(position.x + RULER_WIDTH, RULER_WIDTH), Color.white) diff --git a/Scripts/LayerContainer.gd b/Scripts/LayerContainer.gd index 0f2b65f..c8e1f43 100644 --- a/Scripts/LayerContainer.gd +++ b/Scripts/LayerContainer.gd @@ -65,4 +65,4 @@ func _on_VisibilityButton_pressed() -> void: func _on_LineEdit_text_changed(new_text : String) -> void: Global.canvas.layers[i][2] = new_text - $HBoxContainer/Label.text = new_text \ No newline at end of file + $HBoxContainer/Label.text = new_text diff --git a/Scripts/VerticalRuler.gd b/Scripts/VerticalRuler.gd index cc2f5b6..29e246a 100644 --- a/Scripts/VerticalRuler.gd +++ b/Scripts/VerticalRuler.gd @@ -52,4 +52,4 @@ func _draw() -> void: if i % minor_subdivision == 0: draw_line(Vector2(RULER_WIDTH * 0.33, position.y), Vector2(RULER_WIDTH, position.y), Color.white) else: - draw_line(Vector2(RULER_WIDTH * 0.66, position.y), Vector2(RULER_WIDTH, position.y), Color.white) \ No newline at end of file + draw_line(Vector2(RULER_WIDTH * 0.66, position.y), Vector2(RULER_WIDTH, position.y), Color.white)