Compare commits

...

2 Commits

Author SHA1 Message Date
b87f32eac9 TextInput scrolls in the proper direction 2024-07-26 18:11:02 -04:00
793526238a Scrollbar drags on mouse motion 2024-07-26 18:10:48 -04:00
2 changed files with 2 additions and 1 deletions

View File

@ -229,6 +229,7 @@ func (this *Scrollbar) handleButtonUp (button input.Button) bool {
func (this *Scrollbar) handleMouseMove () bool {
if !this.dragging { return false }
this.drag()
return true
}

View File

@ -120,6 +120,6 @@ func (this *TextInput) handleKeyUp (key input.Key, numpad bool) bool {
}
func (this *TextInput) handleScroll (x, y float64) bool {
this.ScrollTo(this.ContentBounds().Min.Add(image.Pt(int(x), int(y))))
this.ScrollTo(this.ContentBounds().Min.Sub(image.Pt(int(x), int(y))))
return true
}