mirror of
https://github.com/edubart/otclient.git
synced 2025-06-15 14:54:28 +02:00
fix combobox
This commit is contained in:
parent
a475384b73
commit
6ace984440
@ -36,7 +36,8 @@ function UIComboBox:addOption(text, data)
|
||||
end
|
||||
|
||||
function UIComboBox:onMousePress(mousePos, mouseButton)
|
||||
local menu = createWidget(self:getStyleName() .. 'PopupMenu', self)
|
||||
local menu = createWidget(self:getStyleName() .. 'PopupMenu')
|
||||
menu:setId(self:getId() .. 'PopupMenu')
|
||||
for i,v in ipairs(self.options) do
|
||||
menu:addOption(v.text, function() self:setCurrentOption(v.text) end)
|
||||
end
|
||||
|
@ -92,7 +92,8 @@ void UIManager::inputEvent(const InputEvent& event)
|
||||
if(UIWidgetPtr parent = widget->getParent())
|
||||
parent->focusChild(widget, Fw::MouseFocusReason);
|
||||
}
|
||||
widget->onMousePress(event.mousePos, event.mouseButton);
|
||||
if(widget->onMousePress(event.mousePos, event.mouseButton))
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user