Commit Graph

3459 Commits

Author SHA1 Message Date
Ian Clarkson 1dbac01659 Bitmap font sizes are not loaded from binary .fnt files.
This problem causes bitmap fonts based on .fnt files to not appear at all, and no error is thrown.
Fixes #15042.
2016-02-12 14:21:18 -05:00
Mikhail Shulepov ec664bc08b Added aliases for PixelFormat names 2016-02-12 17:25:11 +03:00
Mikhail Shulepov 8ad49c1bbc SpriteFrameCache: take pixelFormat into account if specified 2016-02-11 15:47:23 +03:00
Wenhai Lin 4992037c5c Avoid creating temporary string objects 2016-02-03 23:12:37 +08:00
zilongshanren 4f388d769a Merge pull request #15002 from WenhaiLin/v3-TargetedAction-donefix
Fixed TargetedAction::isDone always return false!
2016-02-03 17:44:26 +08:00
pandamicro fefd05e54d Fix Menu event get released issue 2016-02-02 16:44:32 +08:00
Wenhai Lin bae36b7a98 Label:Fixed characters are displayed incorrectly with some specific font. 2016-02-02 11:16:36 +08:00
Wenhai Lin eba594bb41 Fixed TargetedAction::isDone always return false! 2016-02-02 11:07:38 +08:00
pandamicro e2568b3a6f Merge branch 'v3' of github.com:cocos2d/cocos2d-x into hbmemory
Conflicts:
	tests/js-memory-gc-tests/src/tests-main.js
2016-01-28 01:12:49 +08:00
pandamicro de9b51c0cf Fix other GC issues 2016-01-28 01:03:50 +08:00
Justin Luong bd4615795e fixed documentation for better reading clarity 2016-01-27 11:42:25 +10:00
pandamicro d6cedb88ec Remove JS::Persistent and move js object reference into JS scope 2016-01-24 19:47:26 +08:00
Justin Luong c4df3ccd10 please ignore just a test 2016-01-22 11:05:43 +10:00
Ricardo Quesada ec2d29ed16 Merge pull request #14930 from ricardoquesada/rich_text_fixes
adds JS tests for RichText
2016-01-20 22:47:35 -08:00
Ricardo Quesada 4c11432781 fixed bold 2016-01-20 19:08:31 -08:00
zilongshanren 2ed4965b6d Merge pull request #14751 from newnon/v3_get_version_windows
getVersion win32 implementation
2016-01-21 10:42:19 +08:00
Ricardo Quesada 60d273e31b underline and strikethrough working ok on system fonts 2016-01-20 18:41:59 -08:00
zilongshanren fd0ed05f18 Merge pull request #14902 from mogemimi/update-docs-to-v3
Update docs to reflect latest API changes
2016-01-21 10:35:27 +08:00
zilongshanren e1e87c0205 Merge pull request #14914 from steerlink/font_family
Add ability to get the font family
2016-01-21 10:34:13 +08:00
mogemimi 9c5eecacc7 Update docs to reflect latest API changes 2016-01-21 01:08:32 +09:00
mogemimi 639bf3f682 Fix warning and a bug in FontAtlasCache::unloadFontAtlasTTF() 2016-01-20 23:59:45 +09:00
Ricardo Quesada 86e8f7d0b3 oops... removing debugging code 2016-01-19 20:46:57 -08:00
Ricardo Quesada 27c8e5227d Adds xml support in UIRichText
Supported tags:
- <small>: makes the font 20% smaller
- <big>: makes the font 25% bigger
- <img src="" />: to add an image
- <font face="path to font" size="size" color="#00ffaa">: font
  attributes
- <i>: italics
- <b>: bold
- <u>: underline
- <del> strike-through
- </br>: new line

Also adds support for strikethrough, italics, bold and underlie to
`Label`

Contains tests for UIRichText and Label

Squashed commit of the following:

commit a0d6ae0513d40dbf414930210ab032a49d8984a0
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Tue Jan 19 20:39:21 2016 -0800

    cleanup LabelTestNew

commit 0cf423af85d88a42fc1317207feeb3d05da7f8ab
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Tue Jan 19 20:34:53 2016 -0800

    adds maaaany tests

    ...and fixes width and height in <img src="">

commit e8ba6acd5d79bbc766d7aa02ef166e166c801d01
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Fri Jan 15 19:41:37 2016 -0800

    Label + URL working Ok

commit 36689e29ee3d77310e92264a09084cc06e30664c
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Fri Jan 15 18:24:44 2016 -0800

    adding this code just in case...

    ... should use a listener component instead

commit af03708950e74483b875d0baad593aa6ed242a04
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Thu Jan 14 20:23:36 2016 -0800

    URL node

    plus <de><u> and <a img

commit e3a4930b012c0b3756752dac6ffb5ad43d24ae99
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Wed Jan 13 18:42:18 2016 -0800

    strikethrough and underline implemented

    they support multiline and horizontal alignment as well
    includes test
    however vertical alignment might not work

commit 640ccf39f56e153db46785a61be7000e898174c7
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Tue Jan 12 18:14:57 2016 -0800

    bug fixes

commit 5e41fb76e91c571639585a609a255eb41797a302
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Tue Jan 12 16:47:20 2016 -0800

    adds italics and bold "disable test"

commit 202c5a45bb9c8ea160b9f6880ef858874e07814b
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Tue Jan 12 14:40:13 2016 -0800

    adds italics test

commit d1a8b421445053cc36860fc376f52692a3672dfe
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Mon Jan 11 20:53:23 2016 -0800

    italics is working ok

commit fdd02087fce920c27c2409301ec88685fe68085b
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Fri Jan 8 17:18:56 2016 -0800

    color, size and face working

commit c01bdef6b1d49f8805b69d4c162b74cd00c8f5b3
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Thu Jan 7 19:02:16 2016 -0800

    initial commit
2016-01-19 20:41:31 -08:00
sheldon.teerlink 535dfdac27 Fix warning. 2016-01-19 11:47:18 -07:00
sheldon.teerlink 41d7a27485 Implement getFontFamily(). 2016-01-19 11:43:35 -07:00
pandamicro fc19435123 Merge branch 'v3' of github.com:pandamicro/cocos2d-x into hbmemory
Conflicts:
	cocos/base/ccConfig.h
	cocos/scripting/js-bindings/manual/ScriptingCore.cpp
	cocos/scripting/js-bindings/manual/ScriptingCore.h
	cocos/scripting/js-bindings/script/jsb_prepare.js
2016-01-18 16:40:00 +08:00
James Chen 7e0a1344ca The fix for BMFontConfiguration::parseConfigFile reads string file.
'strchr' finds a char until it gets a '\0', if 'contents' self doesn't end with '\0',
'strchr' will search '\n' out of 'contents' 's buffer size, it will trigger potential and random crashes since
lineLength may bigger than 512 and 'memcpy(line, contents + parseCount, lineLength);' will cause stack buffer overflow.
2016-01-15 00:55:10 +08:00
xiaofeng11 be6f9c0f03 Merge pull request #14882 from geron-cn/playableframe
add PlayableFrame
2016-01-14 09:42:17 +08:00
Ricardo Quesada d589e44b0a Merge pull request #14692 from CodeAndWeb/spriteframe-anchor-from-plist
Load anchor points from plist files
2016-01-13 15:58:02 -08:00
geron-cn 0babe85947 add PlayableFrame 2016-01-12 17:21:01 +08:00
zilongshanren cf6fc000e7 Merge pull request #14709 from kcisoul/v3
Fix  #14428 CCRenderTexture does not work properly on some devices wh…
2016-01-12 11:35:00 +08:00
mogemimi 41dd44c75d Fix some typos in docs 2016-01-11 19:23:05 +09:00
XiaoFeng ab0efd933a Merge branch 'v3.10' of https://github.com/cocos2d/cocos2d-x into v3
Conflicts:
	CHANGELOG
	cocos/scripting/js-bindings/manual/cocos2d_specifics.cpp
	tests/js-tests/src/RenderTextureTest/RenderTextureTest.js
2016-01-09 18:01:56 +08:00
Ricardo Quesada dc785f63ea garbage collect when transition is finished 2016-01-07 10:52:03 -08:00
zilongshanren b45e96f77e fix indent issue 2016-01-05 10:20:05 +08:00
zilongshanren 100a119181 add overFlow enum to jsb and lua.
1. change clamp to 1 and shrink to 2
2016-01-04 21:43:37 +08:00
Andreas Loew 69eed4b99c Updated comment 2016-01-04 11:19:40 +01:00
Ricardo Quesada 7cd80cb669 Adds iOS tests, calls GC after replacing scene
and some bug fixes

Squashed commit of the following:

commit 36b74ce4e68bf2f4a4c464453e695497716506eb
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Tue Dec 22 19:07:01 2015 -0800

    adds missing file

commit 017d03807122faa38fefaa8f4554db8edc83561d
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Tue Dec 22 19:02:27 2015 -0800

    disables GC by default

commit a2f3767a952e052eb8f0391bb5cbd1a8d0ce1b38
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Tue Dec 22 18:57:14 2015 -0800

    Adds iOS test and calls GC after replacing the scene

commit 7b3b628caeb3366356d9a896aebd9c96887a85ed
Merge: 79e926a e311655
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Tue Dec 22 15:29:01 2015 -0800

    Merge branch 'v3' into v3_js_memory_test_and_fixes

commit 79e926a970e3153ee826b299c3417fb6ac599153
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Mon Dec 21 21:27:19 2015 -0800

    fixes crashes

commit 76f3910748e15c4ea179eab846f24f3e65d52d2d
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Mon Dec 21 11:57:56 2015 -0800

    Adds standalone test for JS GC memory

    and fixes leaks on extended/subclassed objects
2015-12-29 17:36:02 -08:00
xiaofeng11 434c79ae90 Merge pull request #14793 from super626/fixsprite2
It already been reviewed and compile by jenkins in https://github.com/cocos2d/cocos2d-x/pull/14697.
We need merge it to V3.10 to file TMX render bug.
2015-12-24 09:40:36 +08:00
Ricardo Quesada 707f08c557 Revert "fix setflip for batch sprite" 2015-12-23 09:54:04 -08:00
Ricardo Quesada 0d0534a2e1 Merge pull request #14697 from super626/v3.10-fixsprite
fix setflip for batch sprite
2015-12-23 09:53:24 -08:00
mogemimi b0c4adcbd0 Fix method name spelling in AutoPolygon 2015-12-23 19:07:03 +09:00
XiaoFeng 3fd8f36a90 Limit force GC in menu item only work in lua-binding 2015-12-23 12:30:59 +08:00
XiaoFeng 82867b0073 Roll back disable force GC change on windows platform, this cause lua binding can not respond mouse click
Remove 3d touch demo iOS sdk checking, it SDK defines won't work in cpp compile
2015-12-22 18:41:44 +08:00
pandamicro 6a6407f711 Pass native references to script scope 2015-12-21 00:16:16 +08:00
pandamicro 022bcc24f1 Merge branch 'v3.10' of github.com:cocos2d/cocos2d-x into v3
Conflicts:
	cocos/scripting/js-bindings/manual/chipmunk/js_bindings_chipmunk_manual.cpp
	cocos/scripting/js-bindings/manual/component/CCComponentJS.cpp
	cocos/scripting/js-bindings/manual/js_bindings_opengl.cpp
2015-12-20 22:56:33 +08:00
Sergey bac68bd0b8 getVersion win32 implementation 2015-12-20 00:09:45 +03:00
pandamicro 8f836162aa Temporary disable forceGC on win32 2015-12-19 22:45:57 +08:00
mogemimi 12ece31121 Mark the old functions as CC_DEPRECATED_ATTRIBUTE 2015-12-19 01:21:56 +09:00
mogemimi 689ee1081a Fix spelling of function name 2015-12-19 01:07:08 +09:00
pandamicro 4d9beb9d77 Merge pull request #14699 from WenhaiLin/v3-new-nothrow
Adds `std::nothrow` to the `new` statements
2015-12-18 14:38:28 +08:00
zilongshanren 2a6cec25fa Merge pull request #14701 from WenhaiLin/v3-label-letterfix
Fixed label's letter can't be hide by `setVisible(false)`.
2015-12-18 11:41:51 +08:00
kci d3898991af fix some logical error 2015-12-18 11:03:23 +09:00
kci 8a39c1a06a Windows/osx/linux build fail bug fixed 2015-12-17 15:40:16 +09:00
kci afc50be1ed Fix #14428 CCRenderTexture does not work properly on some devices which does not support "GL_OES_packed_depth_stencil". 2015-12-17 10:34:51 +09:00
zilongshanren 89c620eb4b Merge pull request #14696 from WenhaiLin/v3-labelfix
Improved robustness in release mode
2015-12-16 17:00:45 +08:00
pandamicro 05da27338a Merge branch 'fix/ios9_downloader_bug' of github.com:cezheng/cocos2d-x into v3.10 2015-12-16 15:24:42 +08:00
Wenhai Lin b91882f150 Fixed label's letter can't be hide by `setVisible(false)`. 2015-12-16 14:59:33 +08:00
Wenhai Lin 4fa58602a8 Adds `std::nothrow` to the `new` statements 2015-12-16 14:02:55 +08:00
yangxiao 74b480c1b6 fix setflip for batch sprite 2015-12-16 13:45:37 +08:00
Wenhai Lin e5952ad440 Improved robustness in release mode 2015-12-16 11:53:59 +08:00
Joachim Grill ba45e2df33 updated lua bindings; updated file format description 2015-12-15 10:56:10 +01:00
XiaoYang 727d857c88 Merge pull request #14674 from super626/tilemap
fix fast tilemap blend function
2015-12-15 17:23:53 +08:00
mogemimi 18aec7e942 Fix deprecation warning in FontFNT 2015-12-15 02:25:32 +09:00
Joachim Grill 4dd3595b1e added test with plist file containing anchor points 2015-12-14 16:17:41 +01:00
Joachim Grill 033b9aabf0 read sprite anchor point from plist file 2015-12-14 15:42:18 +01:00
yangxiao b6ec4c9c5d fix fast tilemap blend function 2015-12-14 16:51:53 +08:00
yangxiao eee7726f5f fix setflip for batch sprite 2015-12-14 15:35:26 +08:00
zilongshanren 96db089b64 Merge pull request #14665 from zilongshanren/fixMemoryLeak
fix memory leaks of stencileStateManager
2015-12-14 13:34:17 +08:00
pandamicro 41218a65e7 Merge pull request #14668 from pandamicro/v3
Sync v3 and Fix win32 js project crash issue
2015-12-14 13:12:42 +08:00
zilongshanren 3e64e09e69 fix memory leaks of stencileStateManager 2015-12-14 10:40:09 +08:00
xiaofeng11 1c53920a13 Merge pull request #14660 from chengstory/#24345
Fix #24345
2015-12-14 10:38:13 +08:00
zilongshanren b1d700ad33 fix bmfont size error 2015-12-13 13:59:42 +08:00
mogemimi 07673f71cd Fix inconsistent header include guards 2015-12-12 21:05:22 +09:00
zilongshanren d75767bfc4 Merge pull request #14639 from liamcindy/v3_ui_text
update for text effect clone
2015-12-11 13:54:46 +08:00
Liam 4c5c6e6d9b update for code format 2015-12-11 12:04:54 +08:00
Ricardo Quesada 2420c942c3 Merge pull request #14617 from chengstory/#24345
Fix #24345
2015-12-10 09:19:30 -08:00
Liam e92db43e14 update for text clone 2015-12-10 13:17:31 +08:00
Dale Stammen 35c855a565 updated dll name to v3.10 2015-12-09 17:33:14 -08:00
zhangcheng 2a806a82c6 Fix #24345
TMX Iso Zorder and TMX Ortho Zorder rendering error in TestCPP.
2015-12-09 15:07:58 +08:00
mogemimi f280a31323 Fix typo in documentation and comments 2015-12-09 01:48:24 +09:00
zilongshanren ea5dacedd0 Merge pull request #14608 from xiaofeng11/v3_310fix
Bug fix & make test case more clear.
2015-12-08 18:05:36 +08:00
zilongshanren 5ef1c92420 Merge pull request #14609 from zilongshanren/fixLabelClampIssue
fix horizontal clamp and shrink issue
2015-12-07 19:45:19 +08:00
XiaoFeng 73d0f8a46e Bug fix & make test case more clear.
1. In CameraBackgroundSkyBoxBrush _actived and _textureValid should set true as default, otherwise will cause user get wrong display status.
2. "Enable Wrap" check box in "31:Node: Label - New API -> 55:Resize content Test" is not used, so set it to disabled, won't let user to change it.
3. When set blank texture to UISlider or UISlider button, use resetRender function to clear texture, use init with blank file name will cause error.
2015-12-07 18:36:28 +08:00
zilongshanren 6c17ef4baf fix horizontal clamp and shrink issue 2015-12-07 18:13:03 +08:00
Ricardo Quesada aebfefd7a8 Merge branch 'v3' into js_more_conversions 2015-12-04 19:01:20 -08:00
pandamicro 1820a006ba Merge pull request #14502 from xiaofeng11/v3_combine_2d
Combine Studio change for 2d components
2015-12-04 16:05:24 +08:00
XiaoFeng 71217fd393 Fix indent 2015-12-04 15:14:47 +08:00
XiaoFeng 1171c6aaa1 Remove desktop only function, set ondraw serial function in DrawNode override able. 2015-12-04 14:55:54 +08:00
XiaoFeng 6fb65b5610 Editing code as comment.
Move CocosStudioExtension path and update related files.
2015-12-04 10:43:39 +08:00
zilongshanren 01644cb46e Merge pull request #14569 from mogemimi/fix-docs-typo
Fix typos in documentation
2015-12-04 09:55:30 +08:00
XiaoFeng 2da192a1c2 Remove cocostudio header file from sprite and particle, and adjust tests
Fix compile error under iOS & Mac
2015-12-04 09:26:14 +08:00
Ricardo Quesada 3100cba5a1 Animation ported to JS 2015-12-03 15:02:39 -08:00
Ricardo Quesada 3646d1e9fc Adds init(array) for Sequence and Spawn
it also makes the code cleaner.
this is needed for JS
2015-12-03 12:16:21 -08:00
mogemimi be213bf306 Fix typos in documentation 2015-12-03 21:03:00 +09:00
XiaoFeng 70b9183ddb Merge branch 'v3' of https://github.com/cocos2d/cocos2d-x into v3_combine_2d
Conflicts:
	tools/bindings-generator
2015-12-03 14:35:36 +08:00
XiaoFeng 32b81a69f5 Add test for new API
remove Sprite::setOffsetPosFromCenter api add by cocos studio, and reset _unflippedOffsetPositionFromCenter to zero in Sprite::setTexture
2015-12-03 14:21:00 +08:00
Ricardo Quesada 48523572b7 label JS fixes 2015-12-02 17:23:23 -08:00
XiaoFeng a804c67a12 Merge branch 'v3' of https://github.com/cocos2d/cocos2d-x into v3_combine_2d
Conflicts:
	cocos/scripting/lua-bindings/manual/LuaBasicConversions.h
2015-12-02 15:07:58 +08:00
zilongshanren ed55d41858 fix label clamp when scaled with bmfont 2015-12-02 13:48:20 +08:00