|
|
@ -1440,7 +1440,7 @@ struct StationViewWindow : public Window {
|
|
|
|
if (!this->IsShaded()) {
|
|
|
|
if (!this->IsShaded()) {
|
|
|
|
/* Draw 'accepted cargo' or 'cargo ratings'. */
|
|
|
|
/* Draw 'accepted cargo' or 'cargo ratings'. */
|
|
|
|
const NWidgetBase *wid = this->GetWidget<NWidgetBase>(WID_SV_ACCEPT_RATING_LIST);
|
|
|
|
const NWidgetBase *wid = this->GetWidget<NWidgetBase>(WID_SV_ACCEPT_RATING_LIST);
|
|
|
|
const Rect r = {(int)wid->pos_x, (int)wid->pos_y, (int)(wid->pos_x + wid->current_x - 1), (int)(wid->pos_y + wid->current_y - 1)};
|
|
|
|
const Rect r = wid->GetCurrentRect();
|
|
|
|
if (this->GetWidget<NWidgetCore>(WID_SV_ACCEPTS_RATINGS)->widget_data == STR_STATION_VIEW_RATINGS_BUTTON) {
|
|
|
|
if (this->GetWidget<NWidgetCore>(WID_SV_ACCEPTS_RATINGS)->widget_data == STR_STATION_VIEW_RATINGS_BUTTON) {
|
|
|
|
int lines = this->DrawAcceptedCargo(r);
|
|
|
|
int lines = this->DrawAcceptedCargo(r);
|
|
|
|
if (lines > this->accepts_lines) { // Resize the widget, and perform re-initialization of the window.
|
|
|
|
if (lines > this->accepts_lines) { // Resize the widget, and perform re-initialization of the window.
|
|
|
@ -1468,7 +1468,7 @@ struct StationViewWindow : public Window {
|
|
|
|
|
|
|
|
|
|
|
|
/* Draw waiting cargo. */
|
|
|
|
/* Draw waiting cargo. */
|
|
|
|
NWidgetBase *nwi = this->GetWidget<NWidgetBase>(WID_SV_WAITING);
|
|
|
|
NWidgetBase *nwi = this->GetWidget<NWidgetBase>(WID_SV_WAITING);
|
|
|
|
Rect waiting_rect = { (int)nwi->pos_x, (int)nwi->pos_y, (int)(nwi->pos_x + nwi->current_x - 1), (int)(nwi->pos_y + nwi->current_y - 1)};
|
|
|
|
Rect waiting_rect = nwi->GetCurrentRect();
|
|
|
|
this->DrawEntries(&cargo, waiting_rect, pos, maxrows, 0);
|
|
|
|
this->DrawEntries(&cargo, waiting_rect, pos, maxrows, 0);
|
|
|
|
scroll_to_row = INT_MAX;
|
|
|
|
scroll_to_row = INT_MAX;
|
|
|
|
}
|
|
|
|
}
|
|
|
|