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

Function get_one_widget

library/LuaApi.cpp:1816–1822  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1814}
1815
1816static df::widget * get_one_widget(lua_State *L, int32_t idx, df::widget_container *container) {
1817 if (lua_isinteger(L, idx))
1818 return Gui::getWidget(container, lua_tointeger(L, idx));
1819 else if (lua_isstring(L, idx))
1820 return Gui::getWidget(container, luaL_checkstring(L, idx));
1821 return NULL;
1822}
1823
1824static int gui_getWidget(lua_State *L) {
1825 df::widget_container *container = Lua::CheckDFObject<df::widget_container>(L, 1);

Callers 1

gui_getWidgetFunction · 0.85

Calls 2

lua_isintegerFunction · 0.85
lua_isstringFunction · 0.85

Tested by

no test coverage detected