| 368 | } |
| 369 | |
| 370 | void ofxLua::scriptMouseReleased(int x, int y, int button) { |
| 371 | if(L == NULL || !isFunction("mouseReleased")) { |
| 372 | return; |
| 373 | } |
| 374 | lua_getglobal(L, "mouseReleased"); |
| 375 | lua_pushinteger(L, x); |
| 376 | lua_pushinteger(L, y); |
| 377 | lua_pushinteger(L, button); |
| 378 | if(lua_pcall(L, 3, 0, 0) != 0) { |
| 379 | std::string msg = "Error running mouseReleased(): " |
| 380 | + (std::string) lua_tostring(L, LUA_STACK_TOP); |
| 381 | errorOccurred(msg); |
| 382 | } |
| 383 | } |
| 384 | |
| 385 | void ofxLua::scriptMouseScrolled(int x, int y, float scrollX, float scrollY) { |
| 386 | if(L == NULL || !isFunction("mouseScrolled")) { |
no test coverage detected