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

Method draw

src/OpenLoco/src/Ui/Widgets/ButtonWidget.cpp:11–24  ·  view source on GitHub ↗

0x004CB164

Source from the content-addressed store, hash-verified

9{
10 // 0x004CB164
11 void Button::draw(Gfx::DrawingContext& drawingCtx, const Widget& widget, const WidgetState& widgetState)
12 {
13 const auto* window = widgetState.window;
14
15 auto flags = widgetState.flags;
16 if (widgetState.activated)
17 {
18 flags |= Gfx::RectInsetFlags::borderInset;
19 }
20
21 drawingCtx.fillRectInset(window->position() + widget.position(), widget.size(), widgetState.colour, flags);
22
23 Label::draw(drawingCtx, widget, widgetState);
24 }
25}

Callers

nothing calls this directly

Calls 4

drawFunction · 0.50
fillRectInsetMethod · 0.45
positionMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected