1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

Refactoring. Regressions fixing.

This commit is contained in:
SoundSSGood
2024-03-02 20:30:29 +02:00
parent 433d55cac3
commit cc14f85445
33 changed files with 321 additions and 262 deletions

View File

@@ -75,13 +75,15 @@ public:
void gesturePanning(const Point & initialPosition, const Point & currentPosition, const Point & lastUpdateDistance) override;
void showAll(Canvas & to) override;
using SliderMovingFunctor = std::function<void(int)>;
/// @param position coordinates of slider
/// @param length length of slider ribbon, including left/right buttons
/// @param Moved function that will be called whenever slider moves
/// @param Capacity maximal number of visible at once elements
/// @param Amount total amount of elements, including not visible
/// @param Value starting position
CSlider(Point position, int length, const std::function<void(int)> & Moved, int Capacity, int Amount,
CSlider(Point position, int length, const SliderMovingFunctor & Moved, int Capacity, int Amount,
int Value, Orientation orientation, EStyle style = BROWN);
~CSlider();
};