Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
MyreMylar merged 9 commits intopygame:mainfromthanice:cursors-example-update
Feb 27, 2022

Conversation

@thanice
Copy link
Contributor

@thanicethanice commentedFeb 17, 2022
edited
Loading

Closes#3034

@thanicethanice reopened thisFeb 17, 2022
@Starbuck5
Copy link
Contributor

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:

  • It would be good to center the hotspot of the surface based cursors. They look sorta strange with (0,0) hotspot.
  • Variables should be insnake_case to conform with pep 8
  • The "Color cursor" and "Image cursor" are the same type of cursor, and they're labeled like they're different

@thanice
Copy link
ContributorAuthor

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
@thanice
Copy link
ContributorAuthor

I made the changes you noted and also added a button to click in order to change the cursor.
It is not ready yet but I wanted to know if it is like what you had in mind.

@Starbuck5
Copy link
Contributor

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.

@thanice
Copy link
ContributorAuthor

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?
And about the text with the info about the cursor type should i keep it as it is or change it to be more descriptive?

Copy link
Contributor

@MyreMylarMyreMylar left a 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.

thanice reacted with thumbs up emoji
use rect.collidepointuse black
@dr0id
Copy link
Contributor

Keep up the good work.

thanice reacted with heart emoji

Copy link
Contributor

@dr0iddr0id left a 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.

thanice reacted with thumbs up emoji
Copy link
Contributor

@MyreMylarMyreMylar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM 👍

thanice reacted with thumbs up emoji
@illumeillume added the cursorspygame.cursors labelOct 29, 2022
@illumeillume changed the titleCursors example updateCursors example improvements - including showing new system, color, and image cursorsOct 29, 2022
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

3 more reviewers

@Starbuck5Starbuck5Starbuck5 left review comments

@dr0iddr0iddr0id approved these changes

@MyreMylarMyreMylarMyreMylar approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

Projects

None yet

Milestone

2.1.3

Development

Successfully merging this pull request may close these issues.

Update cursors example

6 participants

@thanice@Starbuck5@dr0id@MyreMylar@illume@ankith26

[8]ページ先頭

©2009-2025 Movatter.jp