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

Method SetWidgetDirty

src/window.cpp:558–565  ·  view source on GitHub ↗

* Invalidate a widget, i.e. mark it as being changed and in need of redraw. * @param widget_index the widget to redraw. */

Source from the content-addressed store, hash-verified

556 * @param widget_index the widget to redraw.
557 */
558void Window::SetWidgetDirty(WidgetID widget_index) const
559{
560 /* Sometimes this function is called before the window is even fully initialized */
561 auto it = this->widget_lookup.find(widget_index);
562 if (it == std::end(this->widget_lookup)) return;
563
564 it->second->SetDirty(this);
565}
566
567/**
568 * A hotkey has been pressed.

Callers 15

OnDropdownCloseMethod · 0.95
HandleButtonClickMethod · 0.95
HandleEditBoxKeyMethod · 0.95
InsertTextStringMethod · 0.95
BuildSortSignListMethod · 0.80
UpdateSignEditWindowMethod · 0.80
OnClickMethod · 0.80
OnMouseOverMethod · 0.80
OnInvalidateDataMethod · 0.80
OnDragDropMethod · 0.80
OnMouseDragMethod · 0.80

Calls 3

endFunction · 0.50
findMethod · 0.45
SetDirtyMethod · 0.45

Tested by

no test coverage detected