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

Simple fix for slider activation when clicking on left/right buttons

This commit is contained in:
Ivan Savenko 2023-12-09 18:09:10 +02:00
parent df78c9c6f1
commit 902db091da

View File

@ -156,6 +156,11 @@ void CSlider::clickPressed(const Point & cursorPosition)
bool CSlider::receiveEvent(const Point &position, int eventType) const
{
if (eventType == LCLICK)
{
return pos.isInside(position) && !left->pos.isInside(position) && !right->pos.isInside(position);
}
if(eventType != WHEEL && eventType != GESTURE)
{
return CIntObject::receiveEvent(position, eventType);