Revert "Fix UI button staying focused on mouse-out + controller snap (#773)"
This reverts commit 2f614a52c2.
Causes weird selection regression in certain menus
This commit is contained in:
@@ -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, ¤tFocus, focusables, 64, &numFocusables);
|
||||
if (currentFocus != IGGY_FOCUS_NULL)
|
||||
{
|
||||
IggyPlayerSetFocusRS(movie, IGGY_FOCUS_NULL, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user