MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / OnInvalidateData

Method OnInvalidateData

src/town_gui.cpp:593–599  ·  view source on GitHub ↗

* Some data on this window has become invalid. * @param data Information about the changed data. * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details. */

Source from the content-addressed store, hash-verified

591 * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details.
592 */
593 void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override
594 {
595 if (!gui_scope) return;
596 /* Called when setting station noise or required cargoes have changed, in order to resize the window */
597 this->SetDirty(); // refresh display for current size. This will allow to avoid glitches when downgrading
598 this->ResizeWindowAsNeeded();
599 }
600
601 void OnQueryTextFinished(std::optional<std::string> str) override
602 {

Callers

nothing calls this directly

Calls 2

ResizeWindowAsNeededMethod · 0.95
SetDirtyMethod · 0.45

Tested by

no test coverage detected