tool
extends SummerDayTool
class_name SummerDayPenCanvasTool


func _init():
	priority = 1


func _check_for_use(event: InputEvent):
	if event is InputEventMouseButton:
		if event.button_index == BUTTON_LEFT:
			return true
	
	if event is InputEventMouseMotion:
		return true


func _run(event: InputEvent):
	if SummerDay.document:
		var transformed_event = event.xformed_by(
			SummerDay.canvas_state.inverse_view_transform
			)
		for track in SummerDay.document.tracks:
			track.pass_local_input(transformed_event)
