* Draw accepted cargo in the #WID_SV_ACCEPT_RATING_LIST widget. * @param r Rectangle of the widget. * @return Number of lines needed for drawing the accepted cargo. */
| 1872 | * @return Number of lines needed for drawing the accepted cargo. |
| 1873 | */ |
| 1874 | int DrawAcceptedCargo(const Rect &r) const |
| 1875 | { |
| 1876 | const Station *st = Station::Get(this->window_number); |
| 1877 | Rect tr = r.Shrink(WidgetDimensions::scaled.framerect); |
| 1878 | |
| 1879 | int bottom = DrawStringMultiLine(tr.left, tr.right, tr.top, INT32_MAX, GetString(STR_STATION_VIEW_ACCEPTS_CARGO, GetAcceptanceMask(st))); |
| 1880 | return CeilDiv(bottom - r.top - WidgetDimensions::scaled.framerect.top, GetCharacterHeight(FS_NORMAL)); |
| 1881 | } |
| 1882 | |
| 1883 | /** |
| 1884 | * Draw cargo ratings in the #WID_SV_ACCEPT_RATING_LIST widget. |
no test coverage detected