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:
Rubidium
2024-02-25 19:42:28 +01:00
committed by Jonathan G Rennison
parent 2219b8e378
commit 5d8e40cad4
17 changed files with 73 additions and 69 deletions

View File

@@ -912,7 +912,7 @@ struct SchdispatchWindow : GeneralVehicleWindow {
int xm = x % this->resize.step_width;
if (xt >= this->num_columns) return { nullptr, false };
uint row = y / this->resize.step_height;
int32_t row = y / this->resize.step_height;
if (row >= this->vscroll->GetCapacity()) return { nullptr, false };
uint pos = ((row + this->vscroll->GetPosition()) * this->num_columns) + xt;