| 338 | } |
| 339 | |
| 340 | void ofxLua::scriptMouseDragged(int x, int y, int button) { |
| 341 | if(L == NULL || !isFunction("mouseDragged")) { |
| 342 | return; |
| 343 | } |
| 344 | lua_getglobal(L, "mouseDragged"); |
| 345 | lua_pushinteger(L, x); |
| 346 | lua_pushinteger(L, y); |
| 347 | lua_pushinteger(L, button); |
| 348 | if(lua_pcall(L, 3, 0, 0) != 0) { |
| 349 | std::string msg = "Error running mouseDragged(): " |
| 350 | + (std::string) lua_tostring(L, LUA_STACK_TOP); |
| 351 | errorOccurred(msg); |
| 352 | } |
| 353 | } |
| 354 | |
| 355 | void ofxLua::scriptMousePressed(int x, int y, int button) { |
| 356 | if(L == NULL || !isFunction("mousePressed")) { |
no test coverage detected