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

Method scriptMouseDragged

src/ofxLua.cpp:340–353  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

338}
339
340void 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
355void ofxLua::scriptMousePressed(int x, int y, int button) {
356 if(L == NULL || !isFunction("mousePressed")) {

Callers 2

mouseDraggedMethod · 0.80
mouseDraggedMethod · 0.80

Calls 2

lua_getglobalFunction · 0.85
lua_pushintegerFunction · 0.85

Tested by

no test coverage detected