| 324 | } |
| 325 | |
| 326 | void ofxLua::scriptMouseMoved(int x, int y ) { |
| 327 | if(L == NULL || !isFunction("mouseMoved")) { |
| 328 | return; |
| 329 | } |
| 330 | lua_getglobal(L, "mouseMoved"); |
| 331 | lua_pushinteger(L, x); |
| 332 | lua_pushinteger(L, y); |
| 333 | if(lua_pcall(L, 2, 0, 0) != 0) { |
| 334 | std::string msg = "Error running mouseMoved(): " |
| 335 | + (std::string) lua_tostring(L, LUA_STACK_TOP); |
| 336 | errorOccurred(msg); |
| 337 | } |
| 338 | } |
| 339 | |
| 340 | void ofxLua::scriptMouseDragged(int x, int y, int button) { |
| 341 | if(L == NULL || !isFunction("mouseDragged")) { |
no test coverage detected