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

Method OnPaint

src/industry_gui.cpp:837–850  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

835 }
836
837 void OnPaint() override
838 {
839 this->DrawWidgets();
840
841 if (this->IsShaded()) return; // Don't draw anything when the window is shaded.
842
843 const Rect r = this->GetWidget<NWidgetBase>(WID_IV_INFO)->GetCurrentRect();
844 int expected = this->DrawInfo(r);
845 if (expected != r.bottom) {
846 this->info_height = expected - r.top + 1;
847 this->ReInit();
848 return;
849 }
850 }
851
852 void DrawCargoIcon(const Rect &r, CargoType cargo_type) const
853 {

Callers

nothing calls this directly

Calls 6

DrawInfoMethod · 0.95
DrawWidgetsMethod · 0.80
IsShadedMethod · 0.80
GetCurrentRectMethod · 0.80
ReInitMethod · 0.80

Tested by

no test coverage detected