robust-parenting #12
@ -88,13 +88,11 @@ func (element *Piano) HandleMouseUp (x, y int, button input.Button) {
 | 
			
		||||
	element.redo()
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (element *Piano) HandleMouseMove (x, y int) {
 | 
			
		||||
func (element *Piano) HandleMotion (x, y int) {
 | 
			
		||||
	if element.pressed == nil { return }
 | 
			
		||||
	element.pressUnderMouseCursor(image.Pt(x, y))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (element *Piano) HandleMouseScroll (x, y int, deltaX, deltaY float64) { }
 | 
			
		||||
 | 
			
		||||
func (element *Piano) pressUnderMouseCursor (point image.Point) {
 | 
			
		||||
	// find out which note is being pressed
 | 
			
		||||
	newKey := (*pianoKey)(nil)
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user