|
|
|
@ -3040,7 +3040,7 @@ struct IndustryCargoesWindow : public Window {
|
|
|
|
|
pt.x -= nw->pos_x;
|
|
|
|
|
pt.y -= nw->pos_y;
|
|
|
|
|
|
|
|
|
|
int vpos = WidgetDimensions::scaled.framerect.top + CargoesField::small_height - this->vscroll->GetPosition() * nw->resize_y;
|
|
|
|
|
int vpos = WidgetDimensions::scaled.frametext.top + CargoesField::small_height - this->vscroll->GetPosition() * nw->resize_y;
|
|
|
|
|
if (pt.y < vpos) return false;
|
|
|
|
|
|
|
|
|
|
int row = (pt.y - vpos) / CargoesField::normal_height; // row is relative to row 1.
|
|
|
|
@ -3048,7 +3048,7 @@ struct IndustryCargoesWindow : public Window {
|
|
|
|
|
vpos = pt.y - vpos - row * CargoesField::normal_height; // Position in the row + 1 field
|
|
|
|
|
row++; // rebase row to match index of this->fields.
|
|
|
|
|
|
|
|
|
|
int xpos = 2 * WidgetDimensions::scaled.framerect.left + ((this->ind_cargo < NUM_INDUSTRYTYPES) ? 0 : (CargoesField::industry_width + CargoesField::cargo_field_width) / 2);
|
|
|
|
|
int xpos = 2 * WidgetDimensions::scaled.frametext.left + ((this->ind_cargo < NUM_INDUSTRYTYPES) ? 0 : (CargoesField::industry_width + CargoesField::cargo_field_width) / 2);
|
|
|
|
|
if (pt.x < xpos) return false;
|
|
|
|
|
int column;
|
|
|
|
|
for (column = 0; column <= 5; column++) {
|
|
|
|
|