Mercurial > hg > pub > prymula > com
view anielskiepuzzle/src/trefle/MouseMotion.java @ 17:e9c503d896a6
flappyufo-0.230919-1_add_pkgbuild
author | Przemyslaw <prymula76@outlook.com> |
---|---|
date | Sat, 24 Feb 2024 17:47:35 +0100 |
parents | 2787f5e749ae |
children |
line wrap: on
line source
package trefle; import java.awt.event.MouseMotionListener; import java.awt.event.MouseEvent; public class MouseMotion implements MouseMotionListener { public boolean move = false; int x,y; // wywoloywana w czasie przeciagania kursora myszy public void mouseDragged (MouseEvent e){ move = true; x=e.getX(); y=e.getY(); System.out.println("mouse drag"); } // wywolywana w czasie 'normlanego' przesuwania public void mouseMoved (MouseEvent e){ move = false; } public Coordinate get (){ return new Coordinate(x,y,true); } }