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

Method scriptWindowResized

src/ofxLua.cpp:286–298  ·  view source on GitHub ↗

--------------------------------------------------------------------

Source from the content-addressed store, hash-verified

284
285//--------------------------------------------------------------------
286void ofxLua::scriptWindowResized(int w, int h) {
287 if(L == NULL || !isFunction("windowResized")) {
288 return;
289 }
290 lua_getglobal(L, "windowResized");
291 lua_pushinteger(L, w);
292 lua_pushinteger(L, h);
293 if(lua_pcall(L, 2, 0, 0) != 0) {
294 std::string msg = "Error running windowResized(): "
295 + (std::string) lua_tostring(L, LUA_STACK_TOP);
296 errorOccurred(msg);
297 }
298}
299
300void ofxLua::scriptKeyPressed(int key) {
301 if(L == NULL || !isFunction("keyPressed")) {

Callers 1

windowResizedMethod · 0.80

Calls 2

lua_getglobalFunction · 0.85
lua_pushintegerFunction · 0.85

Tested by

no test coverage detected