new script engine, and things maybe be bugged for a while

This commit is contained in:
Eduardo Bart
2011-07-26 20:13:27 -03:00
parent ab7394f357
commit 70f0b0dace
137 changed files with 2905 additions and 2578 deletions

View File

@@ -10,7 +10,10 @@ void UIButton::onInputEvent(const InputEvent& event)
} else if(event.type == EV_MOUSE_LUP && m_state == ButtonDown) {
m_state = ButtonUp;
if(getRect().contains(event.mousePos)) {
g_dispatcher.addTask(boost::bind(&ScriptObject::callScriptTableField, shared_from_this(), "onClick", 0));
LuaObjectPtr me = asLuaObject();
g_dispatcher.addTask([me] {
me->callField("onClick");
});
}
} else if(event.type == EV_MOUSE_MOVE && m_state != ButtonDown) {
if(isMouseOver())