I currently have a viewport that is just a window into the game map. I use the left mouse click and drag to move it around, and this is done with the input() function.
However, once I do this, none of the other buttons in the gui work unless I make it _unhandledinput() or disable the viewport input.
None of the viewport and buttons overlap and I've tried a mishmash of setting things to pass, stop, ignore, etc.
How can I fix this?
func _input(event: InputEvent) -> void:
if mapwindow.visible:
if event is InputEventMouseMotion:
if event.button_mask == BUTTON_MASK_LEFT:
position -= event.relative * zoom
if event is InputEventMouseButton:
if event.is_pressed():
if event.button_index == BUTTON_WHEEL_UP:
zoom_in()
if event.button_index == BUTTON_WHEEL_DOWN:
zoom_out()
if Input.is_action_pressed("ui_up"):
zoom_in()
if Input.is_action_pressed("ui_down"):
zoom_out()