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

Method logic

library/modules/Screen.cpp:768–789  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

766}
767
768void 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
791void dfhack_viewscreen::render(uint32_t curtick)
792{

Callers

nothing calls this directly

Calls 4

invalidateFunction · 0.85
is_instanceFunction · 0.85
lua_pushstringFunction · 0.85
printMethod · 0.45

Tested by

no test coverage detected