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

Fixed an issue where ProgressTimer didn't properly set or cascade its opacity #1830

Merged
merged 1 commit into from
Apr 18, 2024

Conversation

TyelorD
Copy link
Contributor

@TyelorD TyelorD commented Apr 17, 2024

Describe your changes

This fixes a long standing bug from the Cocos2d-x 3.x days that I fixed in our source code for our games with it. I never made a pull request to Cocos2d-x since they stopped development and maintenance, but thought it might be useful for Axmol!

Issue ticket number and link

N/A

Checklist before requesting a review

For each PR

  • Add Copyright if it missed:
    - "Copyright (c) 2019-present Axmol Engine contributors (see AUTHORS.md)."

  • I have performed a self-review of my code.

    Optional:

    • I have checked readme and add important infos to this PR.
    • I have added/adapted some tests too.

For core/new feature PR

  • I have checked readme and add important infos to this PR.
  • I have added thorough tests.

… opacity

This fixes a long standing bug from the Cocos2d-x  3.x days that I fixed in our source code for our games with it. I never made a pull request to Cocos2d-x since they stopped development and maintenance, but thought it might be useful for Axmol!
@halx99 halx99 added this to the 2.1.3 milestone Apr 18, 2024
@halx99 halx99 added the enhancement New feature or request label Apr 18, 2024
@halx99 halx99 merged commit 8e37464 into axmolengine:dev Apr 18, 2024
14 of 15 checks passed
@TyelorD TyelorD deleted the fix-progresstimer-opacity branch April 18, 2024 16:34

if (_cascadeOpacityEnabled)
{
_sprite->updateDisplayedOpacity(_displayedOpacity);
Copy link
Contributor

Choose a reason for hiding this comment

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

I may be wrong, but since _sprite is considered part of ProgressTimer widget, then shouldn't _sprite->updateDisplayedOpacity(_displayedOpacity); be always called? As I understand _cascadeOpacityEnabled part should only apply for the children.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants