MCPcopy Create free account
hub / github.com/DFHack/dfhack / do_notify

Method do_notify

library/modules/Screen.cpp:953–973  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

951}
952
953int dfhack_lua_viewscreen::do_notify(lua_State *L)
954{
955 int args = lua_gettop(L);
956
957 auto self = get_self(L);
958 if (!self) return 0;
959
960 lua_pushvalue(L, 2);
961 lua_gettable(L, -2);
962 if (lua_isnil(L, -1))
963 return 0;
964
965 // self field args table fn -> table fn table args
966 lua_replace(L, 1);
967 lua_copy(L, -1, 2);
968 lua_insert(L, 1);
969 lua_call(L, args-1, 1);
970
971 self->update_focus(L, 1);
972 return 1;
973}
974
975void dfhack_lua_viewscreen::markInputAsHandled() {
976 if (!enabler)

Callers

nothing calls this directly

Calls 5

update_focusMethod · 0.95
lua_gettopFunction · 0.85
lua_pushvalueFunction · 0.85
lua_gettableFunction · 0.85
lua_copyFunction · 0.85

Tested by

no test coverage detected