From 900af16a9e0db104e37e307b1ccec17e32b441ea Mon Sep 17 00:00:00 2001 From: staphen Date: Thu, 21 Oct 2021 02:16:52 -0400 Subject: [PATCH] Fix distributing stat points using gamepad --- Source/controls/plrctrls.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/controls/plrctrls.cpp b/Source/controls/plrctrls.cpp index 88a875c4c..bd3244e23 100644 --- a/Source/controls/plrctrls.cpp +++ b/Source/controls/plrctrls.cpp @@ -1394,7 +1394,9 @@ void PerformPrimaryAction() if (chrflag && !chrbtnactive && Players[MyPlayerId]._pStatPts > 0) { CheckChrBtns(); for (int i = 0; i < 4; i++) { - if (ChrBtnsRect[i].Contains(MousePosition)) { + Rectangle button = ChrBtnsRect[i]; + button.position = GetPanelPosition(UiPanels::Character, button.position); + if (button.Contains(MousePosition)) { chrbtn[i] = true; chrbtnactive = true; ReleaseChrBtns(false);