From 2bef601230ae3f89f12cbe82e00b18ab3565f882 Mon Sep 17 00:00:00 2001 From: Sander Schobers Date: Mon, 7 Jun 2021 07:48:24 +0200 Subject: [PATCH] Added Pos methods to DisplayDrag{Enter,Move}Event. --- ui/event.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ui/event.go b/ui/event.go index 790dee7..ae7da2b 100644 --- a/ui/event.go +++ b/ui/event.go @@ -12,15 +12,23 @@ type DisplayDragEnterEvent struct { Files []string } +func (e DisplayDragEnterEvent) Pos() geom.PointF32 { + return geom.PtF32(e.X, e.Y) +} + type DisplayDragLeaveEvent struct { EventBase } -type DisplayDragMoveEnter struct { +type DisplayDragMoveEvent struct { EventBase X, Y float32 } +func (e DisplayDragMoveEvent) Pos() geom.PointF32 { + return geom.PtF32(e.X, e.Y) +} + type DisplayDropEvent struct { EventBase X, Y float32