mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-18 17:19:50 +00:00
Removed coord clamping from fill_gaps()
This should make line making behave as expected when the mouse is outside of canvas boundaries
This commit is contained in:
parent
7a509a2047
commit
4fc2888b68
|
@ -258,8 +258,6 @@ func draw_brush(sprite : Image, pos : Vector2, color : Color, current_mouse_butt
|
|||
func fill_gaps(sprite : Image, end_pos : Vector2, start_pos : Vector2, color : Color, current_mouse_button : String, pen_pressure : float, current_action := "None") -> void:
|
||||
var previous_mouse_pos_floored = start_pos.floor()
|
||||
var mouse_pos_floored = end_pos.floor()
|
||||
mouse_pos_floored.x = clamp(mouse_pos_floored.x, Global.canvas.location.x - 1, Global.canvas.location.x + Global.canvas.size.x)
|
||||
mouse_pos_floored.y = clamp(mouse_pos_floored.y, Global.canvas.location.y - 1, Global.canvas.location.y + Global.canvas.size.y)
|
||||
var dx := int(abs(mouse_pos_floored.x - previous_mouse_pos_floored.x))
|
||||
var dy := int(-abs(mouse_pos_floored.y - previous_mouse_pos_floored.y))
|
||||
var err := dx + dy
|
||||
|
|
|
@ -238,8 +238,8 @@ func _notification(what : int) -> void:
|
|||
show_quit_dialog()
|
||||
|
||||
|
||||
func _on_files_dropped(files : PoolStringArray, _screen : int) -> void:
|
||||
handle_loading_files(files)
|
||||
func _on_files_dropped(_files : PoolStringArray, _screen : int) -> void:
|
||||
handle_loading_files(_files)
|
||||
|
||||
|
||||
func on_new_project_file_menu_option_pressed(id : int) -> void:
|
||||
|
|
Loading…
Reference in a new issue