mirror of
https://github.com/edubart/otclient.git
synced 2025-10-22 15:25:54 +02:00
refator some stuff, button implementation
This commit is contained in:
@@ -57,13 +57,20 @@ void UIContainer::render()
|
||||
UIElement::render();
|
||||
for(auto it = m_children.begin(); it != m_children.end(); ++it) {
|
||||
const UIElementPtr& child = (*it);
|
||||
child->render();
|
||||
if(child->isVisible())
|
||||
child->render();
|
||||
}
|
||||
}
|
||||
|
||||
bool UIContainer::onInputEvent(InputEvent* event)
|
||||
bool UIContainer::onInputEvent(const InputEvent& event)
|
||||
{
|
||||
return false;
|
||||
bool ret = false;
|
||||
for(auto it = m_children.begin(); it != m_children.end(); ++it) {
|
||||
const UIElementPtr& child = (*it);
|
||||
if(child->isEnabled() && child->isVisible())
|
||||
ret = child->onInputEvent(event) || ret;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
void UIContainer::setActiveElement(UIElementPtr activeElement)
|
||||
|
Reference in New Issue
Block a user