mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-12 20:18:59 +01:00
parent
f2f037ebda
commit
86f53b73e3
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user