This commit will align piece to their in game position #48

Merged
tonitch merged 4 commits from pieceDrawing into master 2023-05-11 20:09:46 +02:00
Showing only changes of commit e424cdca4e - Show all commits

View File

@ -50,6 +50,7 @@ public class GameUI extends Group{
piece_pos_click.y = (int) event.getY();
});
_piece.setOnMouseDragged(event -> {
_piece.toFront();
_piece.setLayoutX(event.getSceneX() - piece_pos_click.x);
_piece.setLayoutY(event.getSceneY() - piece_pos_click.y);
});