How to get mouse input with 3.0 alpha build 1
I tried to get the mouse data in
if (ev.type == InputEvent.MOUSE_BUTTON and ev.button_index == BUTTON_LEFT and ev.pressed):
but as soon as the mouse is over the application window the app freezes and the Debugger says
'Invalid get index 'type' (on base: 'InputEventMouseMotion').'
So then I tried in
mouse_xy = get_viewport().get_mouse_pos()
but the Debugger says
'Invalid call. Nonexistent function 'get_mouse_pos' in base 'Viewport'.'
So I don't know what to do. Thanks for any suggestions.