mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-25 05:24:43 -04:00
Minor changes to the shrink option
This commit is contained in:
parent
279228daba
commit
bd10680f63
4 changed files with 6 additions and 6 deletions
|
@ -50,10 +50,11 @@ func _input(event : InputEvent) -> void:
|
|||
# elif not get_viewport_rect().has_point(event.position):
|
||||
# return
|
||||
|
||||
#current_pixel = get_local_mouse_position() + location
|
||||
# Do not use self.get_local_mouse_position() because it return unexpected
|
||||
# value when shrink parameter is not equal to one. At godot version 3.2.3
|
||||
var tmp_transform = get_canvas_transform().affine_inverse()
|
||||
var tmp_position = Global.main_viewport.get_local_mouse_position()
|
||||
current_pixel = tmp_transform.basis_xform(tmp_position)+tmp_transform.origin
|
||||
current_pixel = tmp_transform.basis_xform(tmp_position) + tmp_transform.origin + location
|
||||
|
||||
if Global.has_focus:
|
||||
update()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue