equal
deleted
inserted
replaced
202 } |
202 } |
203 this->SetWidgetDisabledState(DPIW_FUND_WIDGET, !this->enabled[this->selected_index]); |
203 this->SetWidgetDisabledState(DPIW_FUND_WIDGET, !this->enabled[this->selected_index]); |
204 |
204 |
205 SetVScrollCount(this, this->count); |
205 SetVScrollCount(this, this->count); |
206 |
206 |
207 DrawWindowWidgets(this); |
207 this->DrawWidgets(); |
208 |
208 |
209 /* and now with the matrix painting */ |
209 /* and now with the matrix painting */ |
210 for (byte i = 0; i < this->vscroll.cap && ((i + this->vscroll.pos) < this->count); i++) { |
210 for (byte i = 0; i < this->vscroll.cap && ((i + this->vscroll.pos) < this->count); i++) { |
211 int offset = i * 13; |
211 int offset = i * 13; |
212 int x = 3; |
212 int x = 3; |
479 int y = this->widget[IVW_INFO].top + 1; |
479 int y = this->widget[IVW_INFO].top + 1; |
480 bool first = true; |
480 bool first = true; |
481 bool has_accept = false; |
481 bool has_accept = false; |
482 |
482 |
483 SetDParam(0, this->window_number); |
483 SetDParam(0, this->window_number); |
484 DrawWindowWidgets(this); |
484 this->DrawWidgets(); |
485 |
485 |
486 if (HasBit(ind->callback_flags, CBM_IND_PRODUCTION_CARGO_ARRIVAL) || HasBit(ind->callback_flags, CBM_IND_PRODUCTION_256_TICKS)) { |
486 if (HasBit(ind->callback_flags, CBM_IND_PRODUCTION_CARGO_ARRIVAL) || HasBit(ind->callback_flags, CBM_IND_PRODUCTION_256_TICKS)) { |
487 for (byte j = 0; j < lengthof(i->accepts_cargo); j++) { |
487 for (byte j = 0; j < lengthof(i->accepts_cargo); j++) { |
488 if (i->accepts_cargo[j] == CT_INVALID) continue; |
488 if (i->accepts_cargo[j] == CT_INVALID) continue; |
489 has_accept = true; |
489 has_accept = true; |
562 ResizeWindowForWidget(this, IVW_INFO, 0, y - this->widget[IVW_INFO].top); |
562 ResizeWindowForWidget(this, IVW_INFO, 0, y - this->widget[IVW_INFO].top); |
563 this->SetDirty(); |
563 this->SetDirty(); |
564 return; |
564 return; |
565 } |
565 } |
566 |
566 |
567 DrawWindowViewport(this); |
567 this->DrawViewport(); |
568 } |
568 } |
569 |
569 |
570 virtual void OnClick(Point pt, int widget) |
570 virtual void OnClick(Point pt, int widget) |
571 { |
571 { |
572 Industry *i; |
572 Industry *i; |
838 MakeSortedIndustryList(); |
838 MakeSortedIndustryList(); |
839 } |
839 } |
840 |
840 |
841 SetVScrollCount(w, _num_industry_sort); |
841 SetVScrollCount(w, _num_industry_sort); |
842 |
842 |
843 DrawWindowWidgets(w); |
843 w->DrawWidgets(); |
844 DrawSortButtonState(w, IDW_SORTBYNAME + (_industry_sort_order >> 1), _industry_sort_order & 1 ? SBS_DOWN : SBS_UP); |
844 w->DrawSortButtonState(IDW_SORTBYNAME + (_industry_sort_order >> 1), _industry_sort_order & 1 ? SBS_DOWN : SBS_UP); |
845 |
845 |
846 uint pos = w->vscroll.pos; |
846 uint pos = w->vscroll.pos; |
847 int n = 0; |
847 int n = 0; |
848 |
848 |
849 while (pos < _num_industry_sort) { |
849 while (pos < _num_industry_sort) { |