瀏覽代碼

fixed gui.ScrollBar event propagation

leonsal 8 年之前
父節點
當前提交
c8e2b3e4d6
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      gui/scrollbar.go

+ 3 - 3
gui/scrollbar.go

@@ -137,7 +137,7 @@ func (sb *ScrollBar) onMouse(evname string, ev interface{}) {
 		newX := math32.Clamp(posx-(sb.button.width/2), 0, sb.content.Width-sb.button.width)
 		sb.button.SetPositionX(newX)
 	}
-	sb.root.StopPropagation(Stop3D)
+	sb.root.StopPropagation(StopAll)
 	sb.Dispatch(OnChange, nil)
 }
 
@@ -183,7 +183,7 @@ func (button *scrollBarButton) onMouse(evname string, ev interface{}) {
 	default:
 		return
 	}
-	button.sb.root.StopPropagation(Stop3D)
+	button.sb.root.StopPropagation(StopAll)
 }
 
 // onCursor receives subscribed cursor events for the scroll bar button
@@ -205,5 +205,5 @@ func (button *scrollBarButton) onCursor(evname string, ev interface{}) {
 	button.mouseX = e.Xpos
 	button.mouseY = e.Ypos
 	button.sb.Dispatch(OnChange, nil)
-	button.sb.root.StopPropagation(Stop3D)
+	button.sb.root.StopPropagation(StopAll)
 }