| 766 | } |
| 767 | |
| 768 | void dfhack_viewscreen::logic() |
| 769 | { |
| 770 | check_resize(); |
| 771 | |
| 772 | // Various stuff works poorly unless always repainting |
| 773 | Screen::invalidate(); |
| 774 | |
| 775 | // if the DF screen immediately beneath the DFHack viewscreens is waiting to |
| 776 | // be dismissed, raise it to the top so DF never gets stuck |
| 777 | auto *p = parent; |
| 778 | while (p) { |
| 779 | bool is_df_screen = !is_instance(p); |
| 780 | auto *next_p = p->parent; |
| 781 | if (is_df_screen && Screen::isDismissed(p)) { |
| 782 | DEBUG(screen).print("raising dismissed DF viewscreen {}\n", static_cast<void*>(p)); |
| 783 | Screen::raise(p); |
| 784 | } |
| 785 | if (is_df_screen) |
| 786 | break; |
| 787 | p = next_p; |
| 788 | } |
| 789 | } |
| 790 | |
| 791 | void dfhack_viewscreen::render(uint32_t curtick) |
| 792 | { |
nothing calls this directly
no test coverage detected