Compare commits

..

1 Commits

Author SHA1 Message Date
7fa5601307 Added Pos methods to DisplayDrag{Enter,Move}Event. 2021-06-07 07:56:52 +02:00
2 changed files with 2 additions and 2 deletions

View File

@ -34,7 +34,7 @@ func (t *dragDropEventTarget) DragEnter(pos geom.PointF32, files []string) {
} }
func (t *dragDropEventTarget) DragMove(pos geom.PointF32) { func (t *dragDropEventTarget) DragMove(pos geom.PointF32) {
t.pushEvent(&DisplayDragMoveEnter{EventBase: t.eventBase(), X: pos.X, Y: pos.Y}) t.pushEvent(&DisplayDragMoveEvent{EventBase: t.eventBase(), X: pos.X, Y: pos.Y})
} }
func (t *dragDropEventTarget) DragLeave() { func (t *dragDropEventTarget) DragLeave() {

View File

@ -45,7 +45,7 @@ func (p *ping) Render(ctx ui.Context) {
func (d *dropFiles) Handle(ctx ui.Context, e ui.Event) bool { func (d *dropFiles) Handle(ctx ui.Context, e ui.Event) bool {
switch e := e.(type) { switch e := e.(type) {
case *ui.DisplayDragMoveEnter: case *ui.DisplayDragMoveEvent:
d.ping.tick = time.Now() d.ping.tick = time.Now()
d.ping.position = geom.PtF32(e.X, e.Y) d.ping.position = geom.PtF32(e.X, e.Y)
d.ping.over = true d.ping.over = true