Skip to content

Property color in CCLabelTTF is evil #855

Open
@agro1986

Description

@agro1986

People change it expecting to change the font color, and instead it messes up outline color etc.

See for example: http://forum.cocos2d-swift.org/t/fail-to-add-stroke-for-cclabelttf/14188/2

I've also done the mistake.

So, just food for thought. The current property color should be changed to tintColor. Cause that's what it is. I know, it breaks existing code.

Another solution is to make the property color in CCLabelTTF change the font's color. It breaks consistency to the "color" supposed meaning, but everyone will be happy. Just add another property tintColor to CCLabelTTF to change the tint's color.

Or just leave it as it is and answer people's question on the forum again and again.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions