1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

touch hovering improvements

This commit is contained in:
Laserlicht 2024-08-22 23:27:21 +02:00
parent 5de5ac5eb5
commit d7ee268c76
2 changed files with 4 additions and 4 deletions

View File

@ -429,7 +429,7 @@ LineChart::LineChart(Rect position, std::string title, TData data, TIcons icons,
{
OBJECT_CONSTRUCTION;
addUsedEvents(LCLICK | MOVE);
addUsedEvents(LCLICK | MOVE | GESTURE);
pos = position + pos.topLeft();
@ -515,7 +515,7 @@ void LineChart::mouseMoved(const Point & cursorPosition, const Point & lastUpdat
updateStatusBar(cursorPosition);
}
void LineChart::clickPressed(const Point & cursorPosition)
void LineChart::gesturePanning(const Point & initialPosition, const Point & currentPosition, const Point & lastUpdateDistance)
{
updateStatusBar(cursorPosition);
updateStatusBar(currentPosition);
}

View File

@ -130,5 +130,5 @@ public:
LineChart(Rect position, std::string title, TData data, TIcons icons, float maxY);
void mouseMoved(const Point & cursorPosition, const Point & lastUpdateDistance) override;
void clickPressed(const Point & cursorPosition) override;
void gesturePanning(const Point & initialPosition, const Point & currentPosition, const Point & lastUpdateDistance) override;
};