mirror of
https://github.com/edubart/otclient.git
synced 2025-12-24 00:47:10 +01:00
scripting rework
This commit is contained in:
@@ -33,8 +33,7 @@ void UIButton::onInputEvent(const InputEvent& event)
|
||||
} else if(event.type == EV_MOUSE_LUP && m_state == UI::ButtonDown) {
|
||||
m_state = UI::ButtonUp;
|
||||
if(getRect().contains(event.mousePos)) {
|
||||
if(m_onClickCallback)
|
||||
g_dispatcher.addTask(boost::bind(m_onClickCallback, asUIElement()));
|
||||
g_dispatcher.addTask(boost::bind(&Scriptable::callLuaTableField, shared_from_this(), "onClick"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user