From 9fca8b96876683420d5ebcfc4621d8129eac45f0 Mon Sep 17 00:00:00 2001 From: teatov Date: Tue, 25 Feb 2025 03:56:14 +1000 Subject: [PATCH] add mouse hiding on controller input --- scripts/globals/inputer.gd | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/globals/inputer.gd b/scripts/globals/inputer.gd index 55d2aa9..7191533 100644 --- a/scripts/globals/inputer.gd +++ b/scripts/globals/inputer.gd @@ -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))