Scroll most lists by finger dragging list contents

This commit is contained in:
Sergii Pylypenko
2019-08-31 23:34:02 +03:00
committed by pelya
parent d65c932893
commit 17ee6fa299
7 changed files with 64 additions and 10 deletions

View File

@@ -1031,7 +1031,7 @@ public:
this->vscroll->SetPosition(Clamp(_railstation.station_class - 2, 0, max(this->vscroll->GetCount() - this->vscroll->GetCapacity(), 0)));
NWidgetMatrix *matrix = this->GetWidget<NWidgetMatrix>(WID_BRAS_MATRIX);
matrix->SetScrollbar(this->vscroll2);
matrix->SetScrollbar(this->vscroll2, this->vscroll2 ? WID_BRAS_MATRIX_SCROLL : -1);
matrix->SetCount(_railstation.station_count);
matrix->SetClicked(_railstation.station_type);
}
@@ -1851,7 +1851,7 @@ struct BuildRailWaypointWindow : PickerWindowBase {
this->CreateNestedTree();
NWidgetMatrix *matrix = this->GetWidget<NWidgetMatrix>(WID_BRW_WAYPOINT_MATRIX);
matrix->SetScrollbar(this->GetScrollbar(WID_BRW_SCROLL));
matrix->SetScrollbar(this->GetScrollbar(WID_BRW_SCROLL), WID_BRW_SCROLL);
this->FinishInitNested(TRANSPORT_RAIL);