Add .rgb properties + tests for Color, Sprite, and BasicSprite#2060
Merged
einarf merged 14 commits intopythonarcade:developmentfrom Apr 16, 2024
Merged
Add .rgb properties + tests for Color, Sprite, and BasicSprite#2060einarf merged 14 commits intopythonarcade:developmentfrom
einarf merged 14 commits intopythonarcade:developmentfrom
Conversation
Member
Author
|
The GitHub basd tests / Code inspections step is failing on GUI / Text pyright issues as it has been recently. |
* Updated the color setter so that it does not change the current alpha * Updated it to check for use arcade.Color * Added an isintance check to the len3 check and moved those before the len4 check. So now if the user does a tuple of 3 (ie (255,255,255)) or uses the arcade.Color type (i.e. arcade.Color.BLACK) it will just reuse the old alpha. * Demo 1 * Added deeper RGB class * cleaned up RGB
b358a24 to
bf84bf1
Compare
Member
Author
|
TL;DR: This is ready to review. The recent force-push is a rebase onto development to get #2062's pyright fixes. |
Contributor
|
In regards to my previous merge request, should I close it or is there something still relevant about it? |
Member
Author
|
@FriendlyGecko TL;DR: Don't delete the branch yet. We split the types module recently in #2065. That makes it easier to do future color improvements, but they'll probably have to wait till 3.1+ at the earliest. Before we do more with color, we first have a bunch of other things to do:
After 3.0, we might be able to start improving color types further. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
To the old PR:
Supersedes #1970 by:
To Arcade
Closes #1838 (Marked as 3.0 Mandatory) by:
.rgbsyntactic sugar property toColor.rgbproperty toBasicSpriteand subclasses:BasicSprite.colorThe groundwork for this was handled by #2029.
Remaining questions
.color?