mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-25 22:54:44 -04:00
Added guides
- Added horizontal & vertical guides which can be dragged from their respective rulers - Fixed bug when opening and importing files
This commit is contained in:
parent
8b5ee21d01
commit
224316256c
10 changed files with 186 additions and 98 deletions
|
@ -10,6 +10,7 @@ var frame := 0 setget frame_changed
|
|||
var frame_button : VBoxContainer
|
||||
var frame_texture_rect : TextureRect
|
||||
|
||||
var current_pixel := Vector2.ZERO #pretty much same as mouse_pos, but can be accessed externally
|
||||
var previous_mouse_pos := Vector2.ZERO
|
||||
var previous_action := "None"
|
||||
var mouse_inside_canvas := false #used for undo
|
||||
|
@ -75,7 +76,8 @@ func camera_zoom() -> void:
|
|||
func _process(delta) -> void:
|
||||
sprite_changed_this_frame = false
|
||||
update()
|
||||
var mouse_pos := get_local_mouse_position() - location
|
||||
current_pixel = get_local_mouse_position() - location
|
||||
var mouse_pos := current_pixel
|
||||
var mouse_pos_floored := mouse_pos.floor()
|
||||
var mouse_pos_ceiled := mouse_pos.ceil()
|
||||
var mouse_in_canvas := point_in_rectangle(mouse_pos, location, location + size)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue