aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client
diff options
context:
space:
mode:
authorLoki Rautio <lokirautio@gmail.com>2026-03-06 19:05:12 -0600
committerLoki Rautio <lokirautio@gmail.com>2026-03-06 19:05:12 -0600
commit216943716b8797fa1b9014f337b8ce7bbe50af4d (patch)
tree91e309d8422d4b67594ed08593833f24e5fe9444 /Minecraft.Client
parent8f2ae54b3af76aa9691fdd44316d2957c9adebac (diff)
Revert "Fix UI button staying focused on mouse-out + controller snap (#773)"
This reverts commit 2f614a52c2afea79733379ce1a7595f5188a9158. Causes weird selection regression in certain menus
Diffstat (limited to 'Minecraft.Client')
-rw-r--r--Minecraft.Client/Common/UI/UIController.cpp19
1 files changed, 1 insertions, 18 deletions
diff --git a/Minecraft.Client/Common/UI/UIController.cpp b/Minecraft.Client/Common/UI/UIController.cpp
index 374e2c4d..840ed389 100644
--- a/Minecraft.Client/Common/UI/UIController.cpp
+++ b/Minecraft.Client/Common/UI/UIController.cpp
@@ -865,7 +865,6 @@ void UIController::tickInput()
int hitControlId = -1;
S32 hitArea = INT_MAX;
UIControl *hitCtrl = NULL;
- bool hitAny = false;
for (size_t i = 0; i < controls->size(); ++i)
{
UIControl *ctrl = (*controls)[i];
@@ -907,8 +906,7 @@ void UIController::tickInput()
hitControlId = -1;
hitArea = INT_MAX;
hitCtrl = NULL;
- hitAny = true;
- break; // ButtonList takes priority
+ break; // ButtonList takes priority
}
if (type == UIControl::eTexturePackList)
{
@@ -921,7 +919,6 @@ void UIController::tickInput()
hitControlId = -1;
hitArea = INT_MAX;
hitCtrl = NULL;
- hitAny = true;
break;
}
S32 area = cw * ch;
@@ -930,7 +927,6 @@ void UIController::tickInput()
hitControlId = ctrl->getId();
hitArea = area;
hitCtrl = ctrl;
- hitAny = true;
if (type == UIControl::eSlider)
m_bMouseHoverHorizontalList = true;
}
@@ -958,19 +954,6 @@ void UIController::tickInput()
}
}
}
- else if (!hitAny && !pScene->isDirectEditBlocking())
- {
- // Mouse moved away from all controls — clear focus if set
- Iggy *movie = pScene->getMovie();
- IggyFocusHandle currentFocus = IGGY_FOCUS_NULL;
- IggyFocusableObject focusables[64];
- S32 numFocusables = 0;
- IggyPlayerGetFocusableObjects(movie, &currentFocus, focusables, 64, &numFocusables);
- if (currentFocus != IGGY_FOCUS_NULL)
- {
- IggyPlayerSetFocusRS(movie, IGGY_FOCUS_NULL, 0);
- }
- }
}
}