Closed univeous closed 1 week ago
Yes, you're right. When I started creating the plugin I used TextureRect
nodes to take advantage of the native drag & drop system of Godot but it was a bit buggy and I didn't really get the flexibility I wanted.
So I created the DraggableSprite2D which is used for example in the scene CrossPiece.tscn
scene to do the cross swaps.
It would be a matter of adapting the behaviour of this scene for adjacent mode.
I'll make a note of it, I think it would be as easy as adding a new boolean parameter as export to enable or disable this behaviour in the adjacent mode and use the logic that already exists for the cross movement.
How does dragging work in Cross mode? I tried it, but it seems I can still only swap positions by clicking.
Hi @univeous, I'm working on a hard refactor in a new branch which simplifies adding pieces to the board and automates the whole issue of moves and can even change them at runtime. This includes the possibility of moving pieces by clicking or dragging, whatever the type of movement.
I'm also writing the documentation so I hope this week can have a stable version and make it easier to create boards with customised behaviour.
Currently it seems that you can only swap pieces by clicking on them and selecting a direction;
In many games swapping is achieved by simply dragging the pieces in different directions.
It would be handy if this could be implemented.