From 86f53b73e3894097722c89df7b516d76920d6289 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Fri, 22 Mar 2024 12:41:05 +0900 Subject: [PATCH] examples/dragmascot: add a comment Updates #2783 --- examples/dragmascot/main.go | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/dragmascot/main.go b/examples/dragmascot/main.go index 8371e3a2d..0a8138cf4 100644 --- a/examples/dragmascot/main.go +++ b/examples/dragmascot/main.go @@ -90,6 +90,7 @@ func (m *mascot) Update() error { m.dragStartCursorX, m.dragStartCursorY = ebiten.CursorPosition() } if m.dragging { + // Move the window only by the delta of the cursor. cx, cy := ebiten.CursorPosition() dx := int(float64(cx-m.dragStartCursorX) * m.cursorToWindowX) dy := int(float64(cy-m.dragStartCursorY) * m.cursorToWindowY)