From 5525c72a316992106dfd3681c9916a57fa3f16f6 Mon Sep 17 00:00:00 2001 From: Juliano Leal Goncalves Date: Sun, 27 Jun 2021 00:36:29 -0300 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Leverage=20'Rectangle.Cent?= =?UTF-8?q?er'=20in=20'AttrIncBtnSnap'=20function=20implementation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/controls/plrctrls.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Source/controls/plrctrls.cpp b/Source/controls/plrctrls.cpp index f208168f6..e36196c54 100644 --- a/Source/controls/plrctrls.cpp +++ b/Source/controls/plrctrls.cpp @@ -488,8 +488,7 @@ void AttrIncBtnSnap(AxisDirection dir) // move cursor to our new location button = ChrBtnsRect[slot]; button.position = GetPanelPosition(UiPanels::Character, button.position); - Point position = { button.position.x + (button.size.width / 2), button.position.y + (button.size.height / 2) }; - SetCursorPos(position); + SetCursorPos(button.Center()); } Point InvGetEquipSlotCoord(const inv_body_loc invSlot)