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

Function ToggleRoadButton_Remove

src/road_gui.cpp:316–322  ·  view source on GitHub ↗

* Toggles state of the Remove button of Build road toolbar * @param w window the button belongs to */

Source from the content-addressed store, hash-verified

314 * @param w window the button belongs to
315 */
316static void ToggleRoadButton_Remove(Window *w)
317{
318 w->ToggleWidgetLoweredState(WID_ROT_REMOVE);
319 w->SetWidgetDirty(WID_ROT_REMOVE);
320 _remove_button_clicked = w->IsWidgetLowered(WID_ROT_REMOVE);
321 SetSelectionRed(_remove_button_clicked);
322}
323
324/**
325 * Updates the Remove button because of Ctrl state change

Callers 2

RoadToolbar_CtrlChangedFunction · 0.85
OnClickMethod · 0.85

Calls 4

SetSelectionRedFunction · 0.85
SetWidgetDirtyMethod · 0.80
IsWidgetLoweredMethod · 0.80

Tested by

no test coverage detected