From 397ef566dbb44a68b6fc264d9b945c5bc9ab6fe8 Mon Sep 17 00:00:00 2001 From: Darshan Phaldesai <51489635+luiq54@users.noreply.github.com> Date: Tue, 17 Nov 2020 00:27:35 +0530 Subject: [PATCH] Added Fix for new Tile modes (#384) --- src/Tools/Base.gd | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Tools/Base.gd b/src/Tools/Base.gd index dd563634f..3bd0f63cd 100644 --- a/src/Tools/Base.gd +++ b/src/Tools/Base.gd @@ -82,7 +82,15 @@ func _get_draw_rect() -> Rect2: func _get_tile_mode_rect() -> Rect2: - return Rect2(-Global.current_project.size, Global.current_project.size * 3) + match Global.tile_mode: + Global.Tile_Mode.XAXIS: + return Rect2(Vector2(-Global.current_project.size.x,0), Vector2(Global.current_project.size.x * 3,Global.current_project.size.y)) + Global.Tile_Mode.YAXIS: + return Rect2(Vector2(0,-Global.current_project.size.y), Vector2(Global.current_project.size.x,Global.current_project.size.y * 3)) + Global.Tile_Mode.BOTH: + return Rect2(-Global.current_project.size, Global.current_project.size * 3) + return Rect2(Vector2(0,0),Global.current_project.size) + func _get_draw_image() -> Image: