Codechange: use int32_t instead of uint16_t for scroll bar position/size/capacity
(cherry picked from commit d09b5aaeba
)
# Conflicts:
# src/newgrf_debug_gui.cpp
# src/newgrf_gui.cpp
# src/widget_type.h
This commit is contained in:

committed by
Jonathan G Rennison

parent
2219b8e378
commit
5d8e40cad4
@@ -461,10 +461,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 */
|
||||
|
Reference in New Issue
Block a user