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

Method on_update

plugins/spectate.cpp:121–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119 }
120
121 void on_update(color_ostream &out) {
122 if (Gui::matchFocusString("dwarfmode/Settings")) {
123 if (!was_in_settings) {
124 DEBUG(cycle,out).print("settings screen active; restoring announcement settings\n");
125 restore_settings(out);
126 was_in_settings = true;
127 }
128 } else if (was_in_settings) {
129 was_in_settings = false;
130 if (config.auto_unpause) {
131 DEBUG(cycle,out).print("settings screen now inactive; disabling announcement pausing\n");
132 save_and_scrub_settings(out);
133 }
134 }
135 }
136
137 void restore_settings(color_ostream &out) {
138 if (!saved || was_in_settings)

Callers 1

Calls 1

printMethod · 0.45

Tested by

no test coverage detected