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

Fix event button attr for fast mousewheel#3642

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
Starbuck5 merged 1 commit intomainfromankith26-mousewheel-fix
Jan 15, 2023

Conversation

@ankith26
Copy link
Contributor

PR to fix the underlying issue of#3612
I think we should be fixing this issue instead of documenting broken legacy behaviour

Starbuck5 reacted with eyes emoji
@Starbuck5
Copy link
Contributor

Tested, works great.

Should we add a note to the docs about this changed behavior?

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.

Looks good to me

@MyreMylar
Copy link
Contributor

Tested, works great.

Should we add a note to the docs about this changed behavior?

I don't think we should add it to the docs in this case, as the wheel up generating specifically a 4 and 5.button value in the event is mainly backwards compatibility behaviour with SDL1 and neither the historic numbers (4 & 5), the recent broken ones ( 4,6,8,10,etc & 5,7,9,11 etc), or the now returned to normal ones (4 & 5) have ever been in the docs. The recent behaviour with adding 2 is also not consistent with historic pygame behaviour.

The 'correct' modern behaviour now for handling mouse wheels is the MOUSEWHEEL event and if you are using the supportedpygame.BUTTON_WHEELUP &BUTTON_WHEELDOWN constants those have always been set to 4 & 5.

I think this just qualifies as a straight up bug for 99% of users and documenting it is just going to cause confusion for people who had no idea about the strange behaviour somewhat 'behind the scenes'.

@Starbuck5
Copy link
Contributor

I don't think we should add it to the docs in this case

Ok.

Copy link
Contributor

@Starbuck5Starbuck5 left a comment

Choose a reason for hiding this comment

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

Thanks for tracking this down!

illume pushed a commit that referenced this pull requestApr 30, 2023
Fix event button attr for fast mousewheel
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

2 more reviewers

@MyreMylarMyreMylarMyreMylar approved these changes

@Starbuck5Starbuck5Starbuck5 approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

mousepygame.mouse

Projects

None yet

Milestone

2.2.0

Development

Successfully merging this pull request may close these issues.

pygame.MOUSEBUTTONUP andpygame.MOUSEBUTTONDOWN docs don't fully describe the behavior of those events when the mouse wheel is scrolled

4 participants

@ankith26@Starbuck5@MyreMylar

[8]ページ先頭

©2009-2025 Movatter.jp