MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / KeyRelease

Method KeyRelease

src/lua/LuaHandleCallIns.cpp:665–685  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

663
664
665bool LuaHandle::KeyRelease(bool taken, int key, int mods) {
666 BzfDisplay* dpy = getDisplay();
667 if (dpy == NULL) {
668 return false;
669 }
670
671 LUA_CALL_IN_CHECK(L, 3)
672 if (!PushCallIn(LUA_CI_KeyRelease)) {
673 return false; // the call is not defined, do not take the event
674 }
675
676 lua_pushboolean(L, taken);
677 lua_pushinteger(L, key);
678 lua_pushinteger(L, mods);
679
680 if (!RunCallIn(LUA_CI_KeyRelease, 3, 1)) {
681 return false;
682 }
683
684 return PopBool(L, false);
685}
686
687
688bool LuaHandle::UnicodeText(bool taken, uint32_t unicode) {

Callers 1

handleEventFunction · 0.45

Calls 4

PopBoolFunction · 0.85
getDisplayFunction · 0.50
lua_pushbooleanFunction · 0.50
lua_pushintegerFunction · 0.50

Tested by

no test coverage detected