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

Function gui_showZoomAnnouncement

library/LuaApi.cpp:1570–1605  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1568}
1569
1570static int gui_showZoomAnnouncement(lua_State *state)
1571{
1572 df::coord pos;
1573 int color = 0;
1574 bool bright = false;
1575
1576 auto type = (df::announcement_type)lua_tointeger(state, 1);
1577 Lua::CheckDFAssign(state, &pos, 2);
1578 string message = luaL_checkstring(state, 3);
1579
1580 switch (lua_gettop(state))
1581 {
1582 default:
1583 case 5:
1584 bright = lua_toboolean(state, 5);
1585 case 4:
1586 color = lua_tointeger(state, 4);
1587 case 3:
1588 break;
1589 }
1590
1591 switch (lua_gettop(state))
1592 { // Use the defaults in Gui.h
1593 default:
1594 case 5:
1595 Gui::showZoomAnnouncement(type, pos, message, color, bright);
1596 break;
1597 case 4:
1598 Gui::showZoomAnnouncement(type, pos, message, color);
1599 break;
1600 case 3:
1601 Gui::showZoomAnnouncement(type, pos, message);
1602 }
1603
1604 return 1;
1605}
1606
1607static int gui_showPopupAnnouncement(lua_State *state)
1608{

Callers

nothing calls this directly

Calls 3

CheckDFAssignFunction · 0.85
lua_gettopFunction · 0.85
lua_tobooleanFunction · 0.85

Tested by

no test coverage detected