scripting rework

This commit is contained in:
Eduardo Bart
2011-05-02 19:48:41 -03:00
parent f290b4f89c
commit c052723477
24 changed files with 622 additions and 375 deletions

View File

@@ -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"));
}
}
}