Codechange: use int32_t instead of uint16_t for scroll bar position/size/capacity

This commit is contained in:
Rubidium
2024-02-25 19:42:28 +01:00
committed by rubidium42
parent c01bf06ee1
commit d09b5aaeba
11 changed files with 57 additions and 53 deletions

View File

@@ -459,10 +459,10 @@ struct DepotWindow : Window {
}
ym = (y - matrix_widget->pos_y) % this->resize.step_height;
int row = this->vscroll->GetScrolledRowFromWidget(y, this, WID_D_MATRIX);
int32_t row = this->vscroll->GetScrolledRowFromWidget(y, this, WID_D_MATRIX);
uint pos = (row * this->num_columns) + xt;
if (row == INT_MAX || this->vehicle_list.size() + this->wagon_list.size() <= pos) {
if (row == INT32_MAX || this->vehicle_list.size() + this->wagon_list.size() <= pos) {
/* Clicking on 'line' / 'block' without a vehicle */
if (this->type == VEH_TRAIN) {
/* End the dragging */