i have the problem that i need to know which mouse-button pressed a Button.
I have this solution:
var last_mouse_button : int = -1
var mouse_buttons : Array = ["None", "Left", "Right", "Middle"]
func _input(event : InputEvent) -> void:
if event is InputEventMouseButton:
last_mouse_button = event.button_index
func _on_Button_pressed() -> void:
but i dont think its very elegant and i dont know how reliable this is...
Does anyone know a better solution?