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

[cocos2d-x] Cascading Color does not work - with suggested Fix #902

Closed
ForestRingGames opened this issue May 15, 2017 · 2 comments
Closed
Assignees
Milestone

Comments

@ForestRingGames
Copy link

ForestRingGames commented May 15, 2017

Hey Mario and/or Nate,

Cascading Colors in Cocos2d-x does not work with SpineSkeletons. If cascadeColor is enabled and one sets the color of the parent of a Skeleton, the Skeleton keeps its color.

The reason is that the draw-function uses color instead of displayedColor, suggested fix:

void SkeletonRenderer::draw (Renderer* renderer, const Mat4& transform, uint32_t transformFlags) {
	SkeletonBatch* batch = SkeletonBatch::getInstance();

	Color3B nodeColor = getDisplayedColor(); // Changed from getColor();

        // .... rest of function
}

The same logic is applied in other Cocos2d-x nodes, so it looks like an oversight to me - or is there a reason not to do this?

@badlogic badlogic self-assigned this May 16, 2017
@badlogic badlogic added this to the v3.6 milestone May 16, 2017
@badlogic
Copy link
Collaborator

Definitely an oversight. I'll apply the fix to the 3.6-beta branch asap.

@badlogic badlogic changed the title Cocos2d-x Cascading Color does not work - with suggested Fix [cocos2d-x] Cascading Color does not work - with suggested Fix May 16, 2017
@badlogic
Copy link
Collaborator

Thanks for reporting, fixed in 3.6-beta branch!

@NathanSweet NathanSweet removed the bug label May 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants