-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add feature: Show Ghost piece #33
Conversation
- This feature allows player to see where their piece is going to land - Only py is calculated for ghost piece as px remains the same - It is done through generate_ghost_py() which checks where the peice can be dropped, and return that py - The color for the ghost pieces are generated by interpolating the original tile color and the background tile color through the function get_ghost_color()
Gdk.color_parse is deprecated in Gdk4.0 so we don't need to use it anymore Signed-off-by: Chihurumnaya Ibiam <ibiam@sugarlabs.org>
Signed-off-by: Chihurumnaya Ibiam <ibiam@sugarlabs.org>
Reviewed, added some commits. Please review. Also noticed that the key up event isn't handle sometimes, moving the block to the left or right then trying it makes it work and I haven't taken a look but it's possible it also happens on master. |
Reviewed, and I have made the necessary changes for getting the color through gdk.rgba |
- Now this functionality is replaced with a for loop and it copies the colors from the self.colors array which already contains parsed colors
Tested f89dd40, works as expected. I'll wait for others to test and review. |
reviewed and tested, working fine. |
Great! Merged by hand, thanks! |
please review @chimosky @sourabhaa