1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-03-14 15:25:17 +00:00

Holding Ctrl when using the pencil tool makes it pick the color instead of drawing

This commit is contained in:
GreenBeakCrow 2020-01-11 15:34:54 +01:00
parent 50fa262a75
commit a9d6fe611c

View file

@ -191,6 +191,9 @@ func _input(event : InputEvent) -> void:
if previous_action != "None" && previous_action != "RectSelect" && current_action != "ColorPicker": if previous_action != "None" && previous_action != "RectSelect" && current_action != "ColorPicker":
handle_redo("Draw") handle_redo("Draw")
if current_action == "Pencil" and Input.is_action_pressed("ctrl"):
current_action = "ColorPicker"
match current_action: # Handle current tool match current_action: # Handle current tool
"Pencil": "Pencil":
pencil_and_eraser(mouse_pos, current_color, current_mouse_button) pencil_and_eraser(mouse_pos, current_color, current_mouse_button)