Sfoglia il codice sorgente

Fixed invisible scroll-bar bug in the new TextBox component.

David Piuva 3 anni fa
parent
commit
fe2ef18574
1 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  1. 3 0
      Source/DFPSR/gui/components/helpers/ScrollBarImpl.cpp

+ 3 - 0
Source/DFPSR/gui/components/helpers/ScrollBarImpl.cpp

@@ -187,6 +187,9 @@ bool ScrollBarImpl::pressScrollBar(const IRect &parentLocation, int64_t localCoo
 }
 
 bool ScrollBarImpl::receiveMouseEvent(const IRect &parentLocation, const MouseEvent& event) {
+	if (!this->visible) {
+		return false;
+	}
 	bool intercepted = false;
 	IVector2D localPosition = event.position - parentLocation.upperLeft();
 	IRect scrollBarLocation = this->getScrollBarLocation(parentLocation.width(), parentLocation.height());