* * rct2: 0x006EB765 */
| 172 | * rct2: 0x006EB765 |
| 173 | */ |
| 174 | static void WidgetResizeDraw(RenderTarget& rt, WindowBase& w, WidgetIndex widgetIndex) |
| 175 | { |
| 176 | // Get the widget |
| 177 | const auto& widget = w.widgets[widgetIndex]; |
| 178 | |
| 179 | // Resolve the absolute ltrb |
| 180 | auto leftTop = w.windowPos + ScreenCoordsXY{ widget.left, widget.top }; |
| 181 | int32_t r = w.windowPos.x + widget.right; |
| 182 | int32_t b = w.windowPos.y + widget.bottom; |
| 183 | |
| 184 | auto colour = w.colours[widget.colour]; |
| 185 | |
| 186 | // Draw the panel |
| 187 | Rectangle::fillInset(rt, { leftTop, { r, b } }, colour); |
| 188 | |
| 189 | if (!w.canBeResized()) |
| 190 | return; |
| 191 | |
| 192 | // Draw the resize sprite at the bottom right corner |
| 193 | leftTop = w.windowPos + ScreenCoordsXY{ widget.right - 18, widget.bottom - 18 }; |
| 194 | GfxDrawSprite(rt, ImageId(SPR_RESIZE, colour.colour), leftTop); |
| 195 | } |
| 196 | |
| 197 | /** |
| 198 | * |
no test coverage detected