fix focus bug, change battle events

This commit is contained in:
Eduardo Bart
2012-03-29 19:46:44 -03:00
parent e0325c4c3b
commit 959d9a87b0
5 changed files with 24 additions and 29 deletions

View File

@@ -88,10 +88,7 @@ void UIManager::inputEvent(const InputEvent& event)
m_mouseReceiver->propagateOnMouseEvent(event.mousePos, widgetList);
for(const UIWidgetPtr& widget : widgetList) {
if(widget->isFocusable()) {
if(UIWidgetPtr parent = widget->getParent())
parent->focusChild(widget, Fw::MouseFocusReason);
}
widget->recursiveFocus(Fw::MouseFocusReason);
if(widget->onMousePress(event.mousePos, event.mouseButton))
break;
}