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

Function gui_getMousePos

library/LuaApi.cpp:1441–1450  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1439}
1440
1441static int gui_getMousePos(lua_State *L)
1442{
1443 bool allow_out_of_bounds = lua_toboolean(L, 1);
1444 df::coord pos = Gui::getMousePos(allow_out_of_bounds);
1445 if ((allow_out_of_bounds && pos.z >= 0) || pos.isValid())
1446 Lua::Push(L, pos);
1447 else
1448 lua_pushnil(L);
1449 return 1;
1450}
1451
1452static const LuaWrapper::FunctionReg dfhack_gui_module[] = {
1453 WRAPN(addCombatReport, (bool (*)(df::unit *, df::unit_report_type, int, bool))Gui::addCombatReport),

Callers

nothing calls this directly

Calls 4

lua_tobooleanFunction · 0.85
PushFunction · 0.85
lua_pushnilFunction · 0.85
isValidMethod · 0.45

Tested by

no test coverage detected