| 1551 | } |
| 1552 | |
| 1553 | void feed(set<df::interface_key> *input) override { |
| 1554 | bool key_processed = false; |
| 1555 | switch (selected_column) |
| 1556 | { |
| 1557 | case 0: |
| 1558 | key_processed = preferences_column.feed(input); |
| 1559 | break; |
| 1560 | case 1: |
| 1561 | key_processed = dwarf_column.feed(input); |
| 1562 | break; |
| 1563 | } |
| 1564 | |
| 1565 | if (key_processed) |
| 1566 | { |
| 1567 | if (selected_column == 0 && preferences_column.feed_changed_highlight) |
| 1568 | { |
| 1569 | populateDwarfColumn(); |
| 1570 | } |
| 1571 | |
| 1572 | return; |
| 1573 | } |
| 1574 | |
| 1575 | if (input->count(interface_key::LEAVESCREEN)) |
| 1576 | { |
| 1577 | input->clear(); |
| 1578 | Screen::dismiss(this); |
| 1579 | return; |
| 1580 | } |
| 1581 | else if (input->count(interface_key::CUSTOM_SHIFT_V)) |
| 1582 | { |
| 1583 | df::unit *unit = getSelectedUnit(); |
| 1584 | if (unit) |
| 1585 | { |
| 1586 | auto unitscr = df::allocate<df::viewscreen_unitst>(); |
| 1587 | unitscr->unit = unit; |
| 1588 | Screen::show(std::unique_ptr<df::viewscreen>(unitscr)); |
| 1589 | } |
| 1590 | } |
| 1591 | else if (input->count(interface_key::CUSTOM_SHIFT_Z)) |
| 1592 | { |
| 1593 | df::unit *selected_unit = getSelectedUnit(); |
| 1594 | if (selected_unit) |
| 1595 | { |
| 1596 | input->clear(); |
| 1597 | Screen::dismiss(this); |
| 1598 | Gui::resetDwarfmodeView(true); |
| 1599 | send_key(interface_key::D_VIEWUNIT); |
| 1600 | move_cursor(selected_unit->pos); |
| 1601 | } |
| 1602 | } |
| 1603 | else if (input->count(interface_key::CURSOR_LEFT)) |
| 1604 | { |
| 1605 | --selected_column; |
| 1606 | validateColumn(); |
| 1607 | } |
| 1608 | else if (input->count(interface_key::CURSOR_RIGHT)) |
| 1609 | { |
| 1610 | ++selected_column; |
nothing calls this directly
no test coverage detected