MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / WidgetTextInset

Function WidgetTextInset

src/openrct2-ui/interface/Widget.cpp:457–472  ·  view source on GitHub ↗

* * rct2: 0x006EBD1F */

Source from the content-addressed store, hash-verified

455 * rct2: 0x006EBD1F
456 */
457 static void WidgetTextInset(RenderTarget& rt, WindowBase& w, WidgetIndex widgetIndex)
458 {
459 // Get the widget
460 const auto& widget = w.widgets[widgetIndex];
461
462 // Resolve the absolute ltrb
463 ScreenRect rect{ w.windowPos + ScreenCoordsXY{ widget.left, widget.top },
464 w.windowPos + ScreenCoordsXY{ widget.right, widget.bottom } };
465
466 auto colour = w.colours[widget.colour];
467
468 Rectangle::fillInset(
469 rt, rect, colour, Rectangle::BorderStyle::inset, Rectangle::FillBrightness::light,
470 Rectangle::FillMode::dontLightenWhenInset);
471 WidgetText(rt, w, widgetIndex);
472 }
473
474 /**
475 *

Callers 1

widgetDrawFunction · 0.85

Calls 2

fillInsetFunction · 0.85
WidgetTextFunction · 0.85

Tested by

no test coverage detected