| 340 | } |
| 341 | |
| 342 | void DrawSpriteIgnorePadding(SpriteID img, PaletteID pal, const Rect &r, StringAlignment align) |
| 343 | { |
| 344 | Point offset; |
| 345 | Dimension d = GetSpriteSize(img, &offset); |
| 346 | d.width -= offset.x; |
| 347 | d.height -= offset.y; |
| 348 | |
| 349 | Point p = GetAlignedPosition(r, d, align); |
| 350 | DrawSprite(img, pal, p.x - offset.x, p.y - offset.y); |
| 351 | } |
| 352 | |
| 353 | /** |
| 354 | * Draw an image button. |
no test coverage detected