| 951 | } |
| 952 | |
| 953 | int 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 | |
| 975 | void dfhack_lua_viewscreen::markInputAsHandled() { |
| 976 | if (!enabler) |
nothing calls this directly
no test coverage detected