diff options
| author | Ayush Thoren <ayushthoren@gmail.com> | 2026-03-11 23:44:32 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-12 01:44:32 -0500 |
| commit | bb8ffee0d3249303e0691275166ff7e5741acfd8 (patch) | |
| tree | d12518ff304115b10e0623a516a28dce1f2db70e | |
| parent | 44fc8a4db21252ee2d0a53a9e50d884d8ae76e36 (diff) | |
Fix mouse being pulled to the bottom right (#1156)
Signed-off-by: Ayush Thoren <ayushthoren@gmail.com>
| -rw-r--r-- | Minecraft.Client/Common/UI/IUIScene_AbstractContainerMenu.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Minecraft.Client/Common/UI/IUIScene_AbstractContainerMenu.cpp b/Minecraft.Client/Common/UI/IUIScene_AbstractContainerMenu.cpp index d18bfd8f..7502d6bf 100644 --- a/Minecraft.Client/Common/UI/IUIScene_AbstractContainerMenu.cpp +++ b/Minecraft.Client/Common/UI/IUIScene_AbstractContainerMenu.cpp @@ -1298,10 +1298,8 @@ void IUIScene_AbstractContainerMenu::onMouseTick() } } - vPointerPos.x = floor(vPointerPos.x); - vPointerPos.x += ( static_cast<int>(vPointerPos.x)%2); - vPointerPos.y = floor(vPointerPos.y); - vPointerPos.y += ( static_cast<int>(vPointerPos.y)%2); + vPointerPos.x = static_cast<float>(floor(vPointerPos.x + 0.5f)); + vPointerPos.y = static_cast<float>(floor(vPointerPos.y + 0.5f)); m_pointerPos = vPointerPos; adjustPointerForSafeZone(); |
