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;
|
int hitControlId = -1;
|
||||||
S32 hitArea = INT_MAX;
|
S32 hitArea = INT_MAX;
|
||||||
UIControl *hitCtrl = NULL;
|
UIControl *hitCtrl = NULL;
|
||||||
bool hitAny = false;
|
|
||||||
for (size_t i = 0; i < controls->size(); ++i)
|
for (size_t i = 0; i < controls->size(); ++i)
|
||||||
{
|
{
|
||||||
UIControl *ctrl = (*controls)[i];
|
UIControl *ctrl = (*controls)[i];
|
||||||
@@ -907,8 +906,7 @@ void UIController::tickInput()
|
|||||||
hitControlId = -1;
|
hitControlId = -1;
|
||||||
hitArea = INT_MAX;
|
hitArea = INT_MAX;
|
||||||
hitCtrl = NULL;
|
hitCtrl = NULL;
|
||||||
hitAny = true;
|
break; // ButtonList takes priority
|
||||||
break; // ButtonList takes priority
|
|
||||||
}
|
}
|
||||||
if (type == UIControl::eTexturePackList)
|
if (type == UIControl::eTexturePackList)
|
||||||
{
|
{
|
||||||
@@ -921,7 +919,6 @@ void UIController::tickInput()
|
|||||||
hitControlId = -1;
|
hitControlId = -1;
|
||||||
hitArea = INT_MAX;
|
hitArea = INT_MAX;
|
||||||
hitCtrl = NULL;
|
hitCtrl = NULL;
|
||||||
hitAny = true;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
S32 area = cw * ch;
|
S32 area = cw * ch;
|
||||||
@@ -930,7 +927,6 @@ void UIController::tickInput()
|
|||||||
hitControlId = ctrl->getId();
|
hitControlId = ctrl->getId();
|
||||||
hitArea = area;
|
hitArea = area;
|
||||||
hitCtrl = ctrl;
|
hitCtrl = ctrl;
|
||||||
hitAny = true;
|
|
||||||
if (type == UIControl::eSlider)
|
if (type == UIControl::eSlider)
|
||||||
m_bMouseHoverHorizontalList = true;
|
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