1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-18 17:19:50 +00:00

Use exact match for the draw_color_picker shortcut

This commit is contained in:
Emmanouil Papadeas 2024-08-15 04:36:33 +03:00
parent cbd36c3243
commit 04a5292672
5 changed files with 9 additions and 9 deletions

View file

@ -89,7 +89,7 @@ func _input(event: InputEvent) -> void:
func draw_start(pos: Vector2i) -> void:
pos = snap_position(pos)
super.draw_start(pos)
if Input.is_action_pressed("draw_color_picker"):
if Input.is_action_pressed(&"draw_color_picker", true):
_picking_color = true
_pick_color(pos)
return
@ -111,7 +111,7 @@ func draw_move(pos: Vector2i) -> void:
pos = snap_position(pos)
super.draw_move(pos)
if _picking_color: # Still return even if we released draw_color_picker (Alt)
if Input.is_action_pressed("draw_color_picker"):
if Input.is_action_pressed(&"draw_color_picker", true):
_pick_color(pos)
return

View file

@ -151,7 +151,7 @@ func update_pattern() -> void:
func draw_start(pos: Vector2i) -> void:
super.draw_start(pos)
if Input.is_action_pressed("draw_color_picker"):
if Input.is_action_pressed(&"draw_color_picker", true):
_pick_color(pos)
return
_undo_data = _get_undo_data()

View file

@ -37,7 +37,7 @@ func set_config(config: Dictionary) -> void:
func draw_start(pos: Vector2i) -> void:
pos = snap_position(pos)
super.draw_start(pos)
if Input.is_action_pressed("draw_color_picker"):
if Input.is_action_pressed(&"draw_color_picker", true):
_picking_color = true
_pick_color(pos)
return
@ -71,7 +71,7 @@ func draw_move(pos_i: Vector2i) -> void:
pos = snap_position(pos)
super.draw_move(pos)
if _picking_color: # Still return even if we released Alt
if Input.is_action_pressed(&"draw_color_picker"):
if Input.is_action_pressed(&"draw_color_picker", true):
_pick_color(pos)
return

View file

@ -94,7 +94,7 @@ func draw_start(pos: Vector2i) -> void:
_old_spacing_mode = _spacing_mode
pos = snap_position(pos)
super.draw_start(pos)
if Input.is_action_pressed("draw_color_picker"):
if Input.is_action_pressed(&"draw_color_picker", true):
_picking_color = true
_pick_color(pos)
return
@ -136,7 +136,7 @@ func draw_move(pos_i: Vector2i) -> void:
pos = snap_position(pos)
super.draw_move(pos)
if _picking_color: # Still return even if we released Alt
if Input.is_action_pressed(&"draw_color_picker"):
if Input.is_action_pressed(&"draw_color_picker", true):
_pick_color(pos)
return

View file

@ -208,7 +208,7 @@ func update_strength() -> void:
func draw_start(pos: Vector2i) -> void:
pos = snap_position(pos)
super.draw_start(pos)
if Input.is_action_pressed("draw_color_picker"):
if Input.is_action_pressed(&"draw_color_picker", true):
_picking_color = true
_pick_color(pos)
return
@ -242,7 +242,7 @@ func draw_move(pos_i: Vector2i) -> void:
pos = snap_position(pos)
super.draw_move(pos)
if _picking_color: # Still return even if we released Alt
if Input.is_action_pressed(&"draw_color_picker"):
if Input.is_action_pressed(&"draw_color_picker", true):
_pick_color(pos)
return