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

The color of the underline is different from the text color. #15214

Closed
m-yukio opened this issue Mar 9, 2016 · 2 comments
Closed

The color of the underline is different from the text color. #15214

m-yukio opened this issue Mar 9, 2016 · 2 comments
Assignees
Milestone

Comments

@m-yukio
Copy link
Contributor

m-yukio commented Mar 9, 2016

If use TrueType font, the color of the underline is different from the text color.

Label* label = Label::createWithTTF("CHECK!", "ipaexm.ttf", 48.0f);
label->enableUnderline();
label->setColor(cocos2d::Color3B::BLUE);
label->setPosition(200.0, 400.0);
this->addChild(label);
label = Label::createWithSystemFont("CHECK!", "Verdana", 48.0f);
label->enableUnderline();
label->setColor(cocos2d::Color3B::BLUE);
label->setPosition(200.0, 300.0);
this->addChild(label);

uilabel

ricardoquesada added a commit to ricardoquesada/cocos2d-x that referenced this issue Jun 18, 2016
underline will have the same solor as text in TTF when calling
`setColor`. There is another method called `setTextColor` which is
confusing. What does each function?

github issue cocos2d#15214
@ricardoquesada ricardoquesada self-assigned this Jun 18, 2016
@ricardoquesada ricardoquesada added this to the next milestone Jun 18, 2016
@ricardoquesada
Copy link
Contributor

ricardoquesada commented Jun 18, 2016

either wait until v3.13 is released, or use setTextColor() instead. thanks.

dumganhar pushed a commit to dumganhar/cocos2d-x that referenced this issue Jun 26, 2016
underline will have the same solor as text in TTF when calling
`setColor`. There is another method called `setTextColor` which is
confusing. What does each function?

github issue cocos2d#15214
ricardoquesada added a commit to ricardoquesada/cocos2d-x that referenced this issue Sep 1, 2016
fixes Github issue cocos2d#15214 correctly. underline uses _displayColor
and not _textColorF. _textColorF is only for the text.
This also emulates the SystemFont underline behavior

fixes Github issue cocos2d#16471
ricardoquesada added a commit that referenced this issue Sep 1, 2016
fixes Github issue #15214 correctly. underline uses _displayColor
and not _textColorF. _textColorF is only for the text.
This also emulates the SystemFont underline behavior

fixes Github issue #16471
@ricardoquesada
Copy link
Contributor

re-fixed in v3.14.

setColor() changes the color of the text and underline.
setTextColor() changes the color of only the text. This is the same behavior as system fonts.

minggo pushed a commit that referenced this issue Sep 1, 2016
* fix: Label updateColor() and underline color work as expected

fixes Github issue #15214 correctly. underline uses _displayColor
and not _textColorF. _textColorF is only for the text.
This also emulates the SystemFont underline behavior

fixes Github issue #16471

* docs: added more internal doc for issue_16471
minggo pushed a commit to minggo/cocos2d-x that referenced this issue Sep 5, 2016
…d#16486)

fixes Github issue cocos2d#15214 correctly. underline uses _displayColor
and not _textColorF. _textColorF is only for the text.
This also emulates the SystemFont underline behavior

fixes Github issue cocos2d#16471
minggo pushed a commit to minggo/cocos2d-x that referenced this issue Sep 5, 2016
* fix: Label updateColor() and underline color work as expected

fixes Github issue cocos2d#15214 correctly. underline uses _displayColor
and not _textColorF. _textColorF is only for the text.
This also emulates the SystemFont underline behavior

fixes Github issue cocos2d#16471

* docs: added more internal doc for issue_16471
minggo added a commit that referenced this issue Sep 7, 2016
* fix: Label updateColor() and underline color work as expected (#16486)

fixes Github issue #15214 correctly. underline uses _displayColor
and not _textColorF. _textColorF is only for the text.
This also emulates the SystemFont underline behavior

fixes Github issue #16471

* fix conflict

* Issue 16471 (#16489)

* fix: Label updateColor() and underline color work as expected

fixes Github issue #15214 correctly. underline uses _displayColor
and not _textColorF. _textColorF is only for the text.
This also emulates the SystemFont underline behavior

fixes Github issue #16471

* docs: added more internal doc for issue_16471
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants