Commit Graph

232 Commits

Author SHA1 Message Date
WenhaiLin 1c9a181c35 Label:Fixed the color of letter will be overridden by fade action. 2015-07-15 20:17:05 +08:00
WenhaiLin b701fd9e73 Fixed compile error 2015-07-14 13:47:35 +08:00
WenhaiLin 964713355b Merge branch 'v3' of https://github.com/cocos2d/cocos2d-x into v3-label-createfail 2015-07-14 13:43:43 +08:00
WenhaiLin d4f62a8063 Label:improving the code readability. 2015-07-14 11:30:56 +08:00
andyque ef5d4ddf86 Merge remote-tracking branch 'upstream/v3' into v3
# Conflicts:
#	tests/cpp-tests/proj.win8.1-universal/cpp-tests.Shared/cpp-tests.Shared.vcxitems.filters
2015-07-14 11:24:38 +08:00
andyque fc673ee502 Merge branch 'v3.7-release' into v3 2015-07-13 22:44:54 +08:00
WenhaiLin 80dff7f1c4 Rollback pr12299 2015-07-13 11:32:25 +08:00
WenhaiLin 81bc0b09da Label:Fixed create fail if the font(TTF) not contain a Unicode charmap. 2015-07-10 14:39:21 +08:00
WenhaiLin 6a33702c80 Refine Label::onDraw 2015-07-08 17:59:24 +08:00
WenhaiLin 8cf27b9174 Update comments. 2015-07-08 15:30:34 +08:00
WenhaiLin 581f1ab42b Add test case 2015-07-07 15:41:54 +08:00
WenhaiLin 158d96046e Label:Support add child nodes. 2015-07-07 14:20:23 +08:00
WenhaiLin c11e91e215 Label:Fixed the characters are displayed incorrect with "dark roast.ttf" 2015-07-03 18:08:32 +08:00
Alex Peak 5328996a18 Fix event listener cleanup in destructor
Event listeners should always be removed at destroy (move out of
if-block)
2015-06-30 18:59:33 -07:00
Alex Peak 7cea464a11 Ensure CCLabel atlases are purged before resetting
The current purge->reset behavior occurs per label according to scene
graph priority.  This has two disadvanages; firstly, any labels that are
initialized but not part of the scene graph will not be reset.
Secondly, any labels which share atlases in the FontAtlasCache may not
be reset since each label will call releaseFontAtlas individually before
resetting its fontConfig.  This means that any shared atlases may not be
released all the way to a reference count of 0 and the invalid atlas
will not be deleted and reset from scratch.

By putting a fixed priority on both the purge and reset steps we can
ensure that firstly: all labels will be reset regardless of whether they
have been added to the scene-graph.  Secondly, ALL labels with the same
atlas must call releaseFontAtlas before any others are allowed to
rebuild their textures.  This will prevent any old atlases from sticking
around after a new GL context is created.

This is a fix for Github issue #8305
https://github.com/cocos2d/cocos2d-x/issues/8305
2015-06-30 13:16:25 -07:00
WenhaiLin fbe1bd8253 Label should be invisible when the line height is set to zero. 2015-06-23 09:42:48 +08:00
WenhaiLin d32a317ea0 Label:Fixed line wrap error without space. 2015-06-19 13:39:19 +08:00
Wenhai Lin cbd428f6ac Label:Fixed wrong letter spacing with outline enabled 2015-06-17 13:57:23 +08:00
WenhaiLin 5aa31ea83a Label:the texture of character have not cropped if character cross the axis-aligned bounding-box. 2015-06-11 17:16:44 +08:00
Dale Stammen 351a898a70 removed CC_PLATFORM_WP8 2015-05-08 09:19:13 -07:00
Wenhai Lin d09bd21da4 Label: Fixed position is wrong if label content is changed after invoking `getLetter(letterIndex)` 2015-05-07 11:20:22 +08:00
minggo 6351863b3c Merge pull request #11696 from WenhaiLin/v3-label-shadow-glerror
Label:Fixed shadow effect cause OpenGL error on IOS.
2015-05-06 09:53:39 +08:00
WenhaiLin 8f6277c540 Label:Fixed shadow effect cause OpenGL error on IOS. 2015-05-05 18:30:33 +08:00
WenhaiLin 22c46b5c14 Label:Fixed the character positions could be wrong if `getLetter(letterIndex)` get called. 2015-05-04 10:07:37 +08:00
WenhaiLin 004cb5464e Fixed crash 2015-05-03 22:15:58 +08:00
WenhaiLin 7472bafee3 Label:When you invoking `getLetter(letterIndex)` and `setString(text)` in sequence, and `letterIndex` greater than the length of `text`, it might crash your program. 2015-04-30 15:13:41 +08:00
WenhaiLin 9c2e39dd49 Label:Fixed the shadow color of system font may be incorrect. 2015-04-17 15:42:41 +08:00
WenhaiLin 5a438ed9a1 Label:Fixed the shadow effect of system font might not be shown. 2015-04-17 15:26:43 +08:00
WenhaiLin 0ac99002d5 Label:disableEffect(LabelEffect::XXXX) support disable all effect. 2015-04-17 14:39:52 +08:00
minggo 4211b20134 Merge pull request #11414 from likexx/patch-1
Update CCLabel.cpp
2015-04-14 10:06:09 +08:00
likexx 6f341e3284 Update CCLabel.cpp
in rare case, the texture atlas becomes NULL. Added an additional check to make sure it won't crash here.
2015-04-13 20:53:34 +08:00
WenhaiLin d24a1243da Label:Fixed the position of system font is wrong if it is visited by a new camera. 2015-04-13 18:22:05 +08:00
WenhaiLin 9ef04943a8 Label:Fixed System font can't scale. 2015-04-13 16:28:55 +08:00
WenhaiLin 927cda3f0d Add Label::disableEffect(LabelEffect effect) for better support disable the effect of Label. 2015-04-07 15:51:57 +08:00
WenhaiLin c5c5d3e39d Label: Fixed shadow color is incorrect. 2015-04-07 11:17:01 +08:00
yangxiao 44af57459e add comment 2015-03-18 11:58:36 +08:00
yangxiao 21d581a72c set camera mask when member created 2015-03-18 11:41:43 +08:00
yangxiao 5b26ba3c68 override setCameraMask 2015-03-16 17:11:17 +08:00
yangxiao f56d8c4784 fix camra mask for label does not work 2015-03-16 15:31:29 +08:00
WenhaiLin cd95905a04 Label:Fixed transform not update correctly if this camera mask of Label isn't visible by the current visiting camera 2015-03-09 17:26:43 +08:00
Chad befbc0a14e FIX for Build error when CC_USE_CULLING=0 #10373
Fix for build error when using CC_USE_CULLING
2015-02-09 18:15:22 -08:00
Wenhai Lin 342c582124 Fixed label may become white/black block after resume from background on android 2015-01-21 21:58:18 +08:00
WenhaiLin 415bbeba21 Fixed the alpha channel of text color of system font not take effect 2015-01-20 16:04:14 +08:00
WenhaiLin f2c6a48976 Fixed lose the precision of label's dimensions 2015-01-20 11:46:43 +08:00
Nite Luo 4a440e66c9 Refactor draw command 2015-01-15 14:00:49 -08:00
Huabing.Xu 34582ba268 Merge branch 'v3' into v3_AddOptionsForCulling
Conflicts:
	cocos/2d/CCLabel.cpp
2015-01-14 12:44:24 +08:00
Huabing.Xu f3d8798d39 add macro to enable to disable culling 2015-01-14 10:56:51 +08:00
Nite Luo 8591609128 Implement 3D drawing support for Sprite, Label, Particle, BatchNode 2015-01-12 20:06:50 -08:00
minggo 20beb3b9e0 Merge pull request #9567 from joewan/v3-improve-perf
fix serious performance problem of Animate.
2014-12-22 14:57:26 +08:00
joewanchen bb1267cd09 use auto&. 2014-12-21 14:05:34 +08:00