- Notifications
You must be signed in to change notification settings - Fork3.8k
Cursors example improvements - including showing new system, color, and image cursors#3037
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Wow, this already looks way better. This gives me more ideas though! Like wouldn't it be cool to have something to mouse over in the cursor example? Maybe some circles that are one color and change to a different color when moused over? It could also be good to have some explanatory text on screen explaining how the currently active cursor is created. Like "this is a system cursor", and then "this cursor was created from a surface," or something like that. What do you think? I'd also like to de-emphasize the bitmap cursors, since they are much less capable than the new types. That could be accomplished by using fewer examples of them, and placing them at the end of the slideshow. And if you go with the text it could be like "you can even make cursors from strings, if that suits your fancy." Other notes:
|
Yes that would be better! I will make the changes you mentioned and add them to the pr. |
* Add circles that change color when the cursor hovers over them* Add a button that changes the cursor when clicked* Remove one bitmap cursor example* Center hotspot on surface based cursors* Change variable names* Put color cursor and image cursor under the same label
I made the changes you noted and also added a button to click in order to change the cursor. |
I was envisioning a couple circles scattered across the screen area just to give the cursors something to interact with. I like the click to advance mechanic, I think that should be kept. It would be cool to have a couple more system cursor examples as well. HAND and IBEAM would be good. |
So i should add more circles and change their positions? Also should i keep the hover to change color or make them change color when clicked? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
All seems to work OK, couple of minor tweaks - and it could use a general formatting pass. Download the latest version ofblack and do:
black examples/cursors.py in the terminal from the pygame directory.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
use rect.collidepointuse black
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Keep up the good work. |
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Although there is some repetitions in the code I think it is ok for a simple example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM 👍
Uh oh!
There was an error while loading.Please reload this page.
Closes#3034