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

Method draw

src/OpenLoco/src/Ui/Widgets/TextBoxWidget.cpp:36–51  ·  view source on GitHub ↗

0x4CB29C

Source from the content-addressed store, hash-verified

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

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