This site requires JavaScript, please enable it in your browser!
Greenfoot back
completelyrubbish
completelyrubbish wrote ...

2011/10/27

help with clicking an overlapped object

completelyrubbish completelyrubbish

2011/10/27

#
Hello, I am doing a chess game(It seems that many classmates ask question here lol). Now I have a problem. When I click on chess A, 4 arrows(object) are displayed on the neighboring cells. But now I cannot click on the chess neighboring because there is an arrow covering on it. How can I solve this? Thank you.
danpost danpost

2011/10/27

#
The easiest way to solve this is to look for a click on the arrow instead of the chess. By the way, this also allows movement to square without a chess on it. If you just wanted to select a different chess and show arrows around it, you could have it so if you click anywhere except on an arrow, the arrows are removed, and if that click was on a different chess, show the arrows around it (if the click was not on a chess, no arrows will be present, and you can then click on any chess).
You need to login to post a reply.