selected piece get to the front
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing

This commit is contained in:
Debucquoy Anthony 2023-05-11 12:01:59 +02:00
parent 201eb3ec10
commit e424cdca4e
Signed by: tonitch
GPG Key ID: A78D6421F083D42E

View File

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