MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / draw

Method draw

src/OpenLoco/src/Ui/Widgets/DropdownWidget.cpp:39–54  ·  view source on GitHub ↗

0x004CB164

Source from the content-addressed store, hash-verified

37
38 // 0x004CB164
39 void ComboBox::draw(Gfx::DrawingContext& drawingCtx, const Widget& widget, const WidgetState& widgetState)
40 {
41 const auto* window = widgetState.window;
42
43 const auto pos = window->position() + widget.position();
44 const auto size = widget.size();
45
46 const auto flags = widgetState.flags | Gfx::RectInsetFlags::borderInset | Gfx::RectInsetFlags::fillDarker;
47 drawingCtx.fillRectInset(
48 pos,
49 size,
50 widgetState.colour,
51 flags);
52
53 drawText(drawingCtx, widget, widgetState);
54 }
55}

Callers

nothing calls this directly

Calls 4

drawTextFunction · 0.70
positionMethod · 0.45
sizeMethod · 0.45
fillRectInsetMethod · 0.45

Tested by

no test coverage detected