touch style pause menu items only trigger if cursor is over an item
This commit is contained in:
parent
dd2d16634e
commit
c11fd6a618
|
|
@ -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<Collider2D>().OverlapPoint(PlayerInput.GetInputController(1).GetPointer()))
|
||||
{
|
||||
UseOption((Options)optionSelected);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
UseOption((Options)optionSelected);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue