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

Function SetWindowWidgetDirty

src/window.cpp:3192–3199  ·  view source on GitHub ↗

* Mark a particular widget in a particular window as dirty (in need of repainting) * @param cls Window class * @param number Window number in that class * @param widget_index Index number of the widget that needs repainting */

Source from the content-addressed store, hash-verified

3190 * @param widget_index Index number of the widget that needs repainting
3191 */
3192void SetWindowWidgetDirty(WindowClass cls, WindowNumber number, WidgetID widget_index)
3193{
3194 for (const Window *w : Window::Iterate()) {
3195 if (w->window_class == cls && w->window_number == number) {
3196 w->SetWidgetDirty(widget_index);
3197 }
3198 }
3199}
3200
3201/**
3202 * Mark all windows of a particular class as dirty (in need of repainting)

Callers 15

CheckIfShipNeedsServiceFunction · 0.85
ShipAccelerateFunction · 0.85
ShipMoveUpDownOnLockFunction · 0.85
ShipControllerFunction · 0.85
SetLastSpeedMethod · 0.85
PowerChangedMethod · 0.85
NormaliseTrainHeadFunction · 0.85
MarkTrainAsStuckFunction · 0.85
ReverseTrainDirectionFunction · 0.85
ChooseTrainTrackFunction · 0.85
TryPathReserveFunction · 0.85
TrainLocoHandlerFunction · 0.85

Calls 1

SetWidgetDirtyMethod · 0.80

Tested by

no test coverage detected