MCPcopy Create free account
hub / github.com/danomatika/ofxLua / scriptMouseMoved

Method scriptMouseMoved

src/ofxLua.cpp:326–338  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

324}
325
326void 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
340void ofxLua::scriptMouseDragged(int x, int y, int button) {
341 if(L == NULL || !isFunction("mouseDragged")) {

Callers 2

mouseMovedMethod · 0.80
mouseMovedMethod · 0.80

Calls 2

lua_getglobalFunction · 0.85
lua_pushintegerFunction · 0.85

Tested by

no test coverage detected