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

Method BuildRoadToolbarWindow

src/road_gui.cpp:349–362  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

347 WidgetID last_started_action = INVALID_WIDGET; ///< Last started user action.
348
349 BuildRoadToolbarWindow(WindowDesc &desc, WindowNumber window_number) : Window(desc), roadtype(_cur_roadtype)
350 {
351 this->CreateNestedTree();
352 this->FinishInitNested(window_number);
353 this->SetWidgetDisabledState(WID_ROT_REMOVE, true);
354
355 if (RoadTypeIsRoad(this->roadtype)) {
356 this->SetWidgetDisabledState(WID_ROT_ONE_WAY, true);
357 }
358
359 this->OnInvalidateData();
360
361 if (_settings_client.gui.link_terraform_toolbar) ShowTerraformToolbar(this);
362 }
363
364 void Close([[maybe_unused]] int data = 0) override
365 {

Callers

nothing calls this directly

Calls 6

OnInvalidateDataMethod · 0.95
RoadTypeIsRoadFunction · 0.85
ShowTerraformToolbarFunction · 0.85
CreateNestedTreeMethod · 0.80
FinishInitNestedMethod · 0.80

Tested by

no test coverage detected