Skip to content
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

Clarify event.custom_type docs #2527

Merged
merged 3 commits into from
Oct 28, 2023

Conversation

JorasOliveira
Copy link
Contributor

@JorasOliveira JorasOliveira commented Oct 23, 2023

I tried to keep in mind the original suggestion made by @Felix3qH4 and the correction made by @oddbookworm. Hopefully the behaviour of pygame.event.custom_type() is clearer now.

@JorasOliveira JorasOliveira requested a review from a team as a code owner October 23, 2023 11:57
@oddbookworm
Copy link
Member

The issue this is meant to address for convenience of reviewers: #1758

@oddbookworm oddbookworm linked an issue Oct 24, 2023 that may be closed by this pull request
@@ -455,7 +455,8 @@ On Android, the following events can be generated
| :sl:`make custom user event type`
| :sg:`custom_type() -> int`

Reserves a ``pygame.USEREVENT`` for a custom use.
Returns an integer value that represents a reserved ``pygame.USEREVENT`` for a custom use.
Copy link
Member

Choose a reason for hiding this comment

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

Hmmmmm, this doesn't really seem any clearer IMO. Maybe something alone the lines of

"Reserves an event slot for use in a custom event (pygame.USEREVENT) and returns the integer that the event slot is reserved to"

Choose a reason for hiding this comment

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

I think @oddbookworm solution is easier to understand.

@yunline yunline added docs event pygame.event labels Oct 24, 2023
Copy link
Member

@MyreMylar MyreMylar left a comment

Choose a reason for hiding this comment

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

LGTM 👍

docs/reST/ref/event.rst Outdated Show resolved Hide resolved
Copy link
Member

@ankith26 ankith26 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the PR 🎉

@ankith26 ankith26 added this to the 2.4.0 milestone Oct 28, 2023
@ankith26 ankith26 merged commit 6157363 into pygame-community:main Oct 28, 2023
2 checks passed
@ankith26 ankith26 changed the title changed to wording in order to make it more clear Clarify event.custom_type docs Dec 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs event pygame.event
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make pygame.event.custom_type() documentation more clear (3569)
6 participants