From c11fd6a6182491a9b90ec935c3420845c8f32191 Mon Sep 17 00:00:00 2001 From: minenice55 Date: Fri, 10 Nov 2023 20:04:39 -0500 Subject: [PATCH] touch style pause menu items only trigger if cursor is over an item --- Assets/Scripts/UI/PauseMenu.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Assets/Scripts/UI/PauseMenu.cs b/Assets/Scripts/UI/PauseMenu.cs index a509085a0..964d04897 100644 --- a/Assets/Scripts/UI/PauseMenu.cs +++ b/Assets/Scripts/UI/PauseMenu.cs @@ -158,7 +158,17 @@ namespace HeavenStudio.Common } else if (Input.GetKeyDown(KeyCode.Return) || PlayerInput.GetInputController(1).GetActionDown(PlayerInput.CurrentControlStyle, btConfirm, out _)) { - UseOption((Options)optionSelected); + if (PlayerInput.CurrentControlStyle == InputController.ControlStyles.Touch) + { + if (optionHolder.transform.GetChild(optionSelected).GetComponent().OverlapPoint(PlayerInput.GetInputController(1).GetPointer())) + { + UseOption((Options)optionSelected); + } + } + else + { + UseOption((Options)optionSelected); + } } }