示例#1
0
文件: widgets.go 项目: rmoreira/go-ui
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()
}
示例#2
0
文件: widgets.go 项目: rmoreira/go-ui
func (p *MyWidget) mouseMoveEvent(e *ui.MouseEvent) {
	p.line = append(p.line, e.Pos())
	p.Update()
}