Browse Source

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

Ivan Savenko 1 year ago
parent
commit
902db091da
1 changed files with 5 additions and 0 deletions
  1. 5 0
      client/widgets/Slider.cpp

+ 5 - 0
client/widgets/Slider.cpp

@@ -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);