mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-15 00:05:02 +02:00
Implemented panning/swiping gesture for sliders
This commit is contained in:
@ -94,6 +94,8 @@ CListBox::CListBox(CreateFunc create, Point Pos, Point ItemOffset, size_t Visibl
|
||||
OBJECT_CONSTRUCTION_CAPTURING(255-DISPOSE);
|
||||
slider = std::make_shared<CSlider>(SliderPos.topLeft(), SliderPos.w, std::bind(&CListBox::moveToPos, this, _1),
|
||||
(int)VisibleSize, (int)TotalSize, (int)InitialPos, Slider & 2, Slider & 4 ? CSlider::BLUE : CSlider::BROWN);
|
||||
|
||||
slider->setPanningStep(itemOffset.x + itemOffset.y);
|
||||
}
|
||||
reset();
|
||||
}
|
||||
|
Reference in New Issue
Block a user