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

Method resetDwarfmodeView

library/modules/Gui.cpp:2771–2797  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2769}
2770
2771void Gui::resetDwarfmodeView(bool pause)
2772{
2773 using df::global::cursor;
2774
2775 unfollow();
2776
2777 if (plotinfo)
2778 plotinfo->main.mode = ui_sidebar_mode::Default;
2779
2780 if (selection_rect)
2781 {
2782 selection_rect->start_x = -30000;
2783 selection_rect->start_y = -30000;
2784 selection_rect->start_z = -30000;
2785 selection_rect->end_x = -30000;
2786 selection_rect->end_y = -30000;
2787 selection_rect->end_z = -30000;
2788 }
2789 // NOTE: There's an unidentified global coord after selection_rect that is reset to -30000 here.
2790 // This coord goes into game->main_interface.keyboard_last_track_s if the x value is not -30000. Probably okay to ignore?
2791
2792 if (cursor)
2793 cursor->x = cursor->y = cursor->z = -30000;
2794
2795 if (pause && df::global::pause_state)
2796 *df::global::pause_state = true;
2797}
2798
2799bool Gui::revealInDwarfmodeMap(int32_t x, int32_t y, int32_t z, bool center, bool highlight)
2800{ // Reverse-engineered from DF announcement and scrolling code

Callers

nothing calls this directly

Calls 1

unfollowFunction · 0.85

Tested by

no test coverage detected