| 1568 | } |
| 1569 | |
| 1570 | static 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 | |
| 1607 | static int gui_showPopupAnnouncement(lua_State *state) |
| 1608 | { |
nothing calls this directly
no test coverage detected