mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-18 09:09:47 +00:00
Fix moving selections with arrow keys moving two pixels instead of one
This commit is contained in:
parent
ff5713ae91
commit
b48bb4a094
|
@ -5,6 +5,7 @@ const SPLASH_DIALOG_SCENE_PATH := "res://src/UI/Dialogs/SplashDialog.tscn"
|
|||
var opensprite_file_selected := false
|
||||
var redone := false
|
||||
var is_quitting_on_save := false
|
||||
var is_writing_text := false
|
||||
var changed_projects_on_quit: Array[Project]
|
||||
var cursor_image := preload("res://assets/graphics/cursor.png")
|
||||
## Used to download an image when dragged and dropped directly from a browser into Pixelorama
|
||||
|
@ -202,7 +203,7 @@ func _ready() -> void:
|
|||
|
||||
|
||||
func _input(event: InputEvent) -> void:
|
||||
if event is InputEventKey and is_instance_valid(Global.main_viewport):
|
||||
if is_writing_text and event is InputEventKey and is_instance_valid(Global.main_viewport):
|
||||
Global.main_viewport.get_child(0).push_input(event)
|
||||
left_cursor.position = get_global_mouse_position() + Vector2(-32, 32)
|
||||
right_cursor.position = get_global_mouse_position() + Vector2(32, 32)
|
||||
|
|
|
@ -10,6 +10,7 @@ var text_edit: TextToolEdit:
|
|||
set(value):
|
||||
text_edit = value
|
||||
confirm_buttons.visible = is_instance_valid(text_edit)
|
||||
get_tree().current_scene.is_writing_text = is_instance_valid(text_edit)
|
||||
var text_size := 16
|
||||
var font := FontVariation.new()
|
||||
var font_name := "":
|
||||
|
|
Loading…
Reference in a new issue