This commit will align piece to their in game position #48
@ -54,6 +54,8 @@ public class GameUI extends Group{
|
||||
_piece.setLayoutY(event.getSceneY() - piece_pos_click.y);
|
||||
});
|
||||
_piece.setOnMouseReleased(event -> {
|
||||
if(event.getButton() != MouseButton.PRIMARY)
|
||||
return;
|
||||
if(event.getSceneX() > grid.getLayoutX() && event.getSceneX() < grid.getLayoutX() + grid.boundary_size.x
|
||||
&& event.getSceneY() > grid.getLayoutY() && event.getSceneY() < grid.getLayoutY() + grid.boundary_size.y )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user