* * rct2: 0x006EBBEB */
| 323 | * rct2: 0x006EBBEB |
| 324 | */ |
| 325 | static void WidgetTextButton(RenderTarget& rt, WindowBase& w, WidgetIndex widgetIndex) |
| 326 | { |
| 327 | // Get the widget |
| 328 | const auto& widget = w.widgets[widgetIndex]; |
| 329 | |
| 330 | // Resolve the absolute ltrb |
| 331 | ScreenRect rect{ w.windowPos + ScreenCoordsXY{ widget.left, widget.top }, |
| 332 | w.windowPos + ScreenCoordsXY{ widget.right, widget.bottom } }; |
| 333 | |
| 334 | auto colour = w.colours[widget.colour]; |
| 335 | |
| 336 | // Border |
| 337 | auto borderStyle = widgetIsPressed(w, widgetIndex) || isToolActive(w, widgetIndex) ? Rectangle::BorderStyle::inset |
| 338 | : Rectangle::BorderStyle::outset; |
| 339 | Rectangle::fillInset(rt, rect, colour, borderStyle); |
| 340 | |
| 341 | // Button caption |
| 342 | if (widget.type != WidgetType::tableHeader) |
| 343 | { |
| 344 | WidgetTextCentred(rt, w, widgetIndex); |
| 345 | } |
| 346 | else |
| 347 | { |
| 348 | WidgetText(rt, w, widgetIndex); |
| 349 | } |
| 350 | } |
| 351 | |
| 352 | /** |
| 353 | * |
no test coverage detected