Example #1
0
func (p *MyWidget) mouseReleaseEvent(e *ui.MouseEvent) {
	p.line = append(p.line, e.Pos())
	p.lines = append(p.lines, p.line)
	p.line = []ui.Point{}
	p.Update()
}
Example #2
0
func (p *MyWidget) mouseMoveEvent(e *ui.MouseEvent) {
	p.line = append(p.line, e.Pos())
	p.Update()
}