| 145 | } |
| 146 | |
| 147 | void DrawCargoIcon(const Rect &r, int y_offset, CargoType cargo_type) const |
| 148 | { |
| 149 | bool rtl = _current_text_dir == TD_RTL; |
| 150 | SpriteID icon = CargoSpec::Get(cargo_type)->GetCargoIcon(); |
| 151 | Dimension d = GetSpriteSize(icon); |
| 152 | Rect ir = r.WithWidth(this->cargo_icon_size.width, rtl).WithHeight(GetCharacterHeight(FS_NORMAL)); |
| 153 | DrawSprite(icon, PAL_NONE, CentreBounds(ir.left, ir.right, d.width), CentreBounds(ir.top, ir.bottom, this->cargo_icon_size.height) + y_offset); |
| 154 | } |
| 155 | |
| 156 | void DrawWidget(const Rect &r, WidgetID widget) const override |
| 157 | { |
nothing calls this directly
no test coverage detected