diff --git a/Scripts/Canvas.gd b/Scripts/Canvas.gd index d7620aa57..4e04a1667 100644 --- a/Scripts/Canvas.gd +++ b/Scripts/Canvas.gd @@ -110,6 +110,10 @@ func _input(event : InputEvent) -> void: var ld := 0 var ld_amount := 0.1 + west_limit = location.x + east_limit = location.x + size.x + north_limit = location.y + south_limit = location.y + size.y if Global.selected_pixels.size() != 0: west_limit = max(west_limit, Global.selection_rectangle.polygon[0].x) east_limit = min(east_limit, Global.selection_rectangle.polygon[2].x) diff --git a/Scripts/Dialogs/ImportSprites.gd b/Scripts/Dialogs/ImportSprites.gd index de20070bc..012f26e09 100644 --- a/Scripts/Dialogs/ImportSprites.gd +++ b/Scripts/Dialogs/ImportSprites.gd @@ -88,7 +88,7 @@ func _on_ImportSprites_files_selected(paths : PoolStringArray) -> void: var cropped_image := Image.new() cropped_image = image.get_rect(Rect2(frame_width * xx, frame_height * yy, frame_width, frame_height)) canvas.size = cropped_image.get_size() - image.convert(Image.FORMAT_RGBA8) + cropped_image.convert(Image.FORMAT_RGBA8) cropped_image.lock() var tex := ImageTexture.new() tex.create_from_image(cropped_image, 0)