add mouse hiding on controller input

This commit is contained in:
Teatov 2025-02-25 03:56:14 +10:00
parent 2633390dd8
commit 9fca8b9687

View File

@ -46,10 +46,12 @@ func _input(event: InputEvent) -> void:
if mode == Mode.KB_MOUSE and event_mode == Mode.CONTROLLER:
mode = Mode.CONTROLLER
mode_changed.emit(mode)
Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
if mode == Mode.CONTROLLER and event_mode == Mode.KB_MOUSE:
mode = Mode.KB_MOUSE
mode_changed.emit(mode)
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
if Debugger.show_debug() and event.is_pressed():
Debugger.text("input", _get_event_prompt_current_mode(event))