button * homework policy *
[I want to create two rect,one will be like another’s shadow
One is orange and one is black
Black will cover orange so I put mouseX but what I’m struggling is that I want the black will be on left if my cusor is right
Can someone help me?]
(/t/2147)
Thanks for the answer and sorry for not being not so clear in question.
According to the homework, the rectangle must be in center. Implement a
“shadow” for the black rectangle that moves based on the mouse cursor position.
Note that the side of the rectangle closer to the cursor should
remain orange, while the side in shadow should be the same color as the background.