mirror of
https://github.com/edubart/otclient.git
synced 2025-12-15 05:09:46 +01:00
fix focus bug, change battle events
This commit is contained in:
@@ -579,6 +579,18 @@ void UIWidget::focus()
|
||||
parent->focusChild(asUIWidget(), Fw::ActiveFocusReason);
|
||||
}
|
||||
|
||||
void UIWidget::recursiveFocus(Fw::FocusReason reason)
|
||||
{
|
||||
if(m_destroyed)
|
||||
return;
|
||||
|
||||
if(UIWidgetPtr parent = getParent()) {
|
||||
if(m_focusable)
|
||||
parent->focusChild(asUIWidget(), reason);
|
||||
parent->recursiveFocus(reason);
|
||||
}
|
||||
}
|
||||
|
||||
void UIWidget::lower()
|
||||
{
|
||||
if(m_destroyed)
|
||||
|
||||
Reference in New Issue
Block a user