selected piece get to the front
This commit is contained in:
parent
201eb3ec10
commit
e424cdca4e
@ -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);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user