Commit Graph

545 Commits

Author SHA1 Message Date
James Chen 6f37529236 [dispatcher] Adding 'Node::updateEventPriorityIndex' and making 'Node::addEventId(removeEventId)' method to be private. 2013-09-12 20:47:15 +08:00
James Chen 6a2536b5bd [Dispatcher] Fixing logic errors in CCScrollView after using EventDispatcher. 2013-09-12 16:03:03 +08:00
James Chen 5d95711865 [EventDispatcher] Fixing compilation error after changing of Touch(It doesn't inherit from Object). 2013-09-12 14:42:56 +08:00
James Chen da1101beeb [Dispatcher] New event dispatcher, first commit. 2013-09-11 22:09:34 +08:00
James Chen b8c82ae5a9 [develop] Warning fixes. 2013-09-08 11:26:38 +08:00
minggo c4a97cdfa1 Merge pull request #3485 from ricardoquesada/perf_and_bug_fixes
Perf and bug fixes
2013-08-26 23:22:33 -07:00
Ricardo Quesada 0093263c18 Little performance improvements
Uses `AffineTransform::IDENTITY`

Signed-off-by: Ricardo Quesada <ricardoquesada@gmail.com>
2013-08-26 18:08:21 -07:00
samuele3hu 3b90d0b5b6 Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into iss2433-lua-bindings-generator 2013-08-22 13:40:35 +08:00
Ricardo Quesada d7590affda Merge branch 'develop' into dictionary_array_fixes
Conflicts:
	cocos2dx/cocoa/CCArray.cpp
	cocos2dx/cocoa/CCArray.h
	cocos2dx/label_nodes/CCLabel.cpp
	extensions/CCArmature/datas/CCDatas.cpp
	extensions/CCArmature/display/CCDisplayManager.cpp
2013-08-21 21:27:44 -07:00
minggo d9da52ce86 Merge pull request #3454 from minggo/array-support-sort
Array can be use in stl::sort() when not using vector inside
2013-08-21 20:50:03 -07:00
Ricardo Quesada a3eb0a058e Merge branch 'develop' into dictionary_array_fixes
Conflicts:
	cocos2dx/platform/mac/CCFileUtilsMac.mm
	extensions/CCBReader/CCBAnimationManager.cpp
	extensions/CCBReader/CCBReader.cpp
	extensions/CCBReader/CCBSequenceProperty.cpp
	extensions/GUI/CCScrollView/CCScrollView.cpp
2013-08-21 20:27:19 -07:00
Ricardo Quesada 2e221ee6cc Array & Dictionary fixes
In many places `Dictionary` and `Array` are not being initialized. In fact `Dictionary` doesn't  have the `init()` method creating potential leaks.
Also in objects like `Armature` and the new `LabelTTF`, the `Array` object is not being used a pointer. So it doesn't use the 2 phase initialization, creating potential leaks.

This patch fixes all those issues.

Signed-off-by: Ricardo Quesada <ricardoquesada@gmail.com>
2013-08-21 20:12:09 -07:00
samuele3hu 27c59a799d Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into iss2433-lua-bindings-generator 2013-08-22 11:01:38 +08:00
minggo 2de8963a0a fix warnings caused by deprecating some functions of Array 2013-08-22 10:45:47 +08:00
samuele3hu 3cb095f48a Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into iss2433-lua-bindings-generator 2013-08-22 10:17:59 +08:00
James Chen 1ee7790f0e Initializing Array after it was constructed. 2013-08-22 10:15:47 +08:00
xbruce d2684338a5 Update CCScrollView.cpp
change release mode
2013-08-20 14:58:26 +08:00
minggo f97f7edeb6 Merge pull request #3440 from ricardoquesada/better_array
Better array
2013-08-19 23:39:36 -07:00
samuele3hu 39686ea503 Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into iss2433-lua-bindings-generator 2013-08-20 13:46:26 +08:00
James Chen 7e3d3b3d3e Merge pull request #2950 from zcgit/develop
a potential bug in Layer.
2013-08-19 19:02:53 -07:00
Ricardo Quesada 511ec1cc5d Compiles with improved CCArray
Compiles both with std::vector or ccCArray
2013-08-19 17:09:28 -07:00
James Chen 175316f2c6 Merge pull request #3404 from timothyqiu/docfix
Documentation fix: broken links and wrong encoding in the doc...
2013-08-18 19:35:47 -07:00
samuele3hu c8b75a1080 Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into iss2433-lua-bindings-generator 2013-08-16 10:13:38 +08:00
samuele3hu 7f8099ce69 Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into iss2433-lua-bindings-generator
Conflicts:
	cocos2d_libs.xcodeproj/project.pbxproj
	tools/bindings-generator
2013-08-15 16:21:32 +08:00
samuele3hu 13fd369beb issue #2433:Modify lua binding generator template and releated action test 2013-08-14 21:35:55 +08:00
James Chen 86fef75963 issue #2521: Removing an unused method ControlStepper::setValue(double value, bool send); since it's not implemented and there is an similar method 'setValueWithSendingEvent' could replace it. 2013-08-12 11:20:48 +08:00
James Chen fc437c5ef4 (Array*) --> static_cast<Array*>() for CCControl.cpp. 2013-08-09 10:56:39 +08:00
Timothy Qiu 3c394da6a4 Changed two 'XXX class for cocos2d for iphone'. 2013-08-09 02:31:51 +08:00
Timothy Qiu 3d8d0e40ee Fixed broken links and wrong encoding in the doc.
Fixed Obj-C names when referening functions.
Changed some GB2312 encoded characters to UTF-8.
2013-08-09 02:31:51 +08:00
Timothy Qiu 5ad5cfed7a Yet another documentation fix.
Modified mismatching parameters doc caused by refactoring.
Added the missing doc of some parameters.
Removed Hungarian notation from parts of the code.
2013-08-01 21:40:13 +08:00
James Chen 343c98af13 Fixing warnings of the order of member variables and fixing errors for tizen projects. 2013-07-29 14:07:57 +08:00
James Chen e66e429bb2 issue #2430: Moving enum type to class for CCBReader. 2013-07-27 21:44:49 +08:00
James Chen feadd2b2dd issue #2430: Moved constant to header file to avoid errors in 'switch case', the error is 'case value is not a constant expression'.
Also added more deprecated constants.
2013-07-27 00:55:41 +08:00
James Chen 387ae822b1 issue #2430: Compilation error fix for CCEditBox/CCEditBoxImplWin.cpp 2013-07-26 22:57:15 +08:00
James Chen 58a3560bca More enum class: ScrollView::Direction, TableView::VerticalFillOrder 2013-07-26 22:55:41 +08:00
James Chen 2bfccb4a43 A typo fix: EditBox::EditBox::KeyboardReturnType --> EditBox::KeyboardReturnType 2013-07-26 21:36:32 +08:00
minggo 3cb40b36e4 issue #2430:fix some errors 2013-07-26 18:07:40 +08:00
minggo a7c1904eb8 issue #2430:move EditBox enum into class 2013-07-26 17:45:01 +08:00
minggo 0870581623 fix warnings 2013-07-26 15:22:45 +08:00
minggo f55d73194e issue 2430:use enum class for Control enum values 2013-07-26 14:37:26 +08:00
Ricardo Quesada 8bf24f0475 ccGLXXX -> GL::xxx
Adds GL namespace. Deprecates the `ccGLFunctionName` functions. New functions are `GL::functionName`

Also, converts the class `DrawPrimitives` into a namespace
2013-07-25 18:42:53 -07:00
minggo acdd1cfe9d issue #2430:move GLProgram enum into class 2013-07-25 17:48:22 +08:00
minggo 3d6f3bf8b2 issue #2430:move ProgressTimer enum into class 2013-07-25 15:11:36 +08:00
minggo 658bffbb69 issue #2430:use upper letter for enum item in ccGLStateCache.h 2013-07-25 15:04:13 +08:00
Ricardo Quesada 1f37d4d00a More best practices fixes and other bug fixes
- Adds `CC_REQUIRES_NULL_TERMINATION` to methods that require a NULL at the end
- Removes more Hungarian notations in samples
- s/sprite/scene: fix from previous commit
- `CCLog` -> `log`
- `getLayerNamed` -> `getLayer`
- `getPropertyNamed` -> `getProperty`
- and other small fixes
2013-07-23 15:20:22 -07:00
James Chen 1db847ad7c issue #2344: ScriptEngineManager::sharedManager --> ScriptEngineManager::getInstance, ScriptEngineManager::purgeSharedManager --> ScriptEngineManager::destroyInstance 2013-07-22 17:24:54 +08:00
James Chen 2228614748 issue #2344: JSB also uses 'ScriptEngineManager::sharedManager()->getScriptEngine()->sendEvent(XXX);' now. 2013-07-22 17:12:53 +08:00
James Chen b58d18e20a More unsinged int -> int in some places where it could be difficult to find underflow bugs. And some warnings fix. 2013-07-22 14:28:19 +08:00
Ricardo Quesada 89d210bdb3 CCAssert -> CCASSERT
and other best pracitces like:

capacity and "index" are ints and not unsigned int (google's recomendation).
 It is easier to detect underflow bugs like this

plus other minor improvements
2013-07-19 22:01:27 -07:00
Ricardo Quesada ba6ab126c6 More best practices fixes
- class order fixes
  - static methods (creators) at the beginning
  - then constructors / destructors
  - then init
- more `const` fixes
  - adds some const getters
  - some getters have 2 versions: `const` and no-const version
- renamed CocosDenshion::sharedEngine -> getInstance()
2013-07-18 16:30:19 -07:00
Ricardo Quesada 6e25301b43 more best practices fixes
- Adds more `const` in getters
- Overriden methods have the `override` keyword
- Reorganizes the structure of the class:
  # creators first, then constructor, destructors, init
  # then overridden methods
  # variables at the end
- removes Hungarian notation from parts of the code
2013-07-17 16:56:19 -07:00
Ricardo Quesada 5d499d351d Some more changes to make the code more c++ friendly:
- nodeToParentTransform -> getNodeToParentTransform() (the same for its friends)
   - Deprecates the old methods
   - adds 'consts' to those methods
- boundingBox() -> getBoundingBox()
   - the new one is const
   - Deprecates the old method.
- Adds overrides keywords in CCNodeRGBA and CCArmature
- AffineMatrix are mutables
2013-07-16 18:16:04 -07:00
samuele3hu 241c01bec3 Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into ScriptHandler 2013-07-16 14:47:46 +08:00
James Chen 13e939b55e Merge pull request #3157 from ricardoquesada/override_love
closed 2407: Adds more readability to the class internals.
2013-07-15 22:05:33 -07:00
samuele3hu 1761669832 issue #2377:Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into ScriptHandlerMgr 2013-07-16 12:47:40 +08:00
samuele3hu c955a559bf issue #2377:Del register/unregister function in .cpp and .h files 2013-07-16 09:55:06 +08:00
Ricardo Quesada 9958e0d7f9 Adds more readability to the class internals.
Changes:
  - creator (static) methods, and singleton methods (static) are always at the top of the class
  - Constructors, destructros, and init methods comes next
  - Then the instance methods for the class
  - Then the overriden methods
  - and finally the ivars

Also, overriden methos have the "override" context keyword
2013-07-15 12:43:22 -07:00
pktangyue 652f679d50 override updateDisplayedColor and updateDisplayedOpacity method in Scale9Sprite class 2013-07-15 20:13:30 +08:00
minggo eada29ee40 issue #2404:created CCDprecated.h and move all global functions and variables into it 2013-07-15 16:14:26 +08:00
minggo 6abe6fce78 closed #2393: fix conflicts 2013-07-12 18:04:32 +08:00
minggo 58fe3c7563 closed #2393: fixed conflicts 2013-07-12 15:07:44 +08:00
minggo 5d9fea1416 issue #2393:mark PointZero RectZero and SizeZero as deprecated 2013-07-12 14:47:36 +08:00
minggo 15096b0716 issue #2393:mark CCPointMake CCSizeMake CCRectMake as deprecated 2013-07-12 14:30:26 +08:00
James Chen 6038d69183 issue #2397: sharedSpriteFrameCache --> getInstance, purgeSharedSpriteFrameCache --> destroyInstance. 2013-07-12 14:12:58 +08:00
minggo bb758df0d0 issue #2393:mark ccp as deprecated 2013-07-12 14:11:55 +08:00
James Chen 2c1b26acf8 issue #2397: EGLView::sharedOpenGLView() --> EGLView::getInstance() 2013-07-12 13:11:21 +08:00
Ricardo Quesada cf262c28e2 getInstance() / destroyInstance() are used...
... instead of sharedXXX / purgeXXX.
They are more C++ friendly, and also easier to remember.

common files + Mac files + iOS files + tests/samples files were updated.

The old methods are deprecated now.
2013-07-11 15:24:23 -07:00
James Chen 093d9a507c closed #2396: indentation fix. 2013-07-11 17:07:41 +08:00
minggo c37af8fa77 issue #2393:mark functions in CCPointExtensions deprecated 2013-07-11 16:38:58 +08:00
pktangyue 8f7d9093c9 Merge remote-tracking branch 'origin/develop' into patch1 2013-07-11 16:08:46 +08:00
James Chen 5727d7099b issue #2395: Scale9Sprite's default anchor point is center now. 2013-07-11 13:59:57 +08:00
James Chen 5eb849a789 closed #2381: ControlSwitch was displayed ugly when adding more than one switch. 2013-07-09 17:23:13 +08:00
James Chen 596c4c3cf2 issue #2387: Using static_cast instead of C style cast while iterating CCDictionary. 2013-07-09 14:40:43 +08:00
James Chen 9b9fe67d25 issue #2387: Using static_cast instead of C style cast in iteration of CCArray. 2013-07-09 14:29:51 +08:00
minggo 87125e4b2a issue #2129:use capital words for static const member variables 2013-07-08 18:11:32 +08:00
pktangyue 3e5c62f905 fix CCScale9Sprite CapInsets bug for rotated sprite frame 2013-07-08 17:00:27 +08:00
minggo dfde41b932 issue #2129:fix conflicts 2013-07-05 17:32:50 +08:00
minggo 04465622b7 issue #2129:remove prefix of types in ccTypes.h 2013-07-05 16:49:22 +08:00
minggo 7e56bb57c8 Merge pull request #3076 from samuele3hu/execDev
issue #2244:Modify CallFunc event bug and modify a function name to createCCBreader
2013-07-05 01:32:06 -07:00
samuele3hu ec2f5376f1 issue #2244:Add namespace to some enums 2013-07-05 16:05:38 +08:00
James Chen ec902c3550 issue #2373: Adding missing overload const getter functions. 2013-07-05 15:08:52 +08:00
minggo 7bcafb46a4 Merge pull request #3051 from samuele3hu/execDev
issue #2244:make some execute funs into one fun in ScriptEngineProtocol
2013-07-04 03:33:12 -07:00
samuele3hu 570f2663f4 issue #2244:Modify ScriptData struct and functions related with sendEvent 2013-07-04 15:44:42 +08:00
YangLe 18b662c942 fix CCScale9Sprite for rotated sprite frame
fix Issue #1145
2013-07-04 00:03:44 +08:00
samuele3hu 9b08cee01f issue #22434:make some execute funs into one funs in ScriptEngineProtocol 2013-07-02 15:23:51 +08:00
Justin Hawkwood 9067918d73 Set textview_hidden to true on init 2013-06-26 13:44:49 -07:00
zcgit 912a52a677 a potential bug in ScrollView
check _touches in setTouchEnabled
2013-06-21 18:00:56 +08:00
samuele3hu e36c6f544a issue #2276: Modify ScrollView and LuaScrollView class 2013-06-21 14:17:41 +08:00
samuele3hu 35f0b07aa6 Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into scrollview_develop 2013-06-21 11:16:46 +08:00
James Chen 0879a12516 issue #2129: Re-adds 'CC' prefix to objective-c classes for all projects. 2013-06-21 11:14:03 +08:00
samuele3hu a862543a4c Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into scrollview_develop 2013-06-21 10:44:03 +08:00
Ricardo Quesada 578bce4bc8 Re-adds 'CC' prefix to objective-c classes.
And also makes it compile on Mac, which was broken
2013-06-20 17:46:22 -07:00
samuele3hu 15c69563e2 issue #2276: Add ScrollView lua binding and test sample 2013-06-20 22:39:30 +08:00
James Chen cb67ed0227 issue #2129: Removing CC prefix for extension module. 2013-06-20 14:15:53 +08:00
James Chen e281fdfa73 issue #2129: Renaming EditBoxImplIOS to EditBoxImplIOS_objc since it will be conflict with CCEditBoxImplIOS after removing CC prefix. 2013-06-20 13:07:09 +08:00
James Chen c0d44cb2e4 fixed #2129: Rename m_iVar to _var, remove CC prefixes. 2013-06-15 14:03:30 +08:00
James Chen 920418c21f Crash fix in CCControlColurPickerTest. 2013-06-09 16:38:37 +08:00
minggo c4ab295846 issue #2271: fixed memory leak of CCControlColorPicker 2013-06-09 15:07:58 +08:00
James Chen 47c8205e39 issue #2143: Adding CCEditBox::getDelegate. 2013-06-05 14:55:13 +08:00
James Chen 7b98808aa7 Merge pull request #2640 from sunxiaoyu/patch-1
fixed #2253: Adding UITextField only when keyboard was opened, removing it when keyboard was closed.
2013-06-04 02:08:42 -07:00
Lee, Jae-Hong c20e4f3700 Keep a previous text on Tizen CCEditBox. 2013-05-28 20:43:47 +09:00
Lee, Jae-Hong 47fac0ed98 Implement CCEditBox for Tizen. (develop branch) 2013-05-26 20:40:13 +09:00
sunxiaoyu cc7e858fe1 Update CCEditBoxImplIOS.mm
02c6647306
2013-05-24 18:10:04 +08:00
samuele3hu 338c7c8d67 issue #2103 add more test lua 2013-05-24 11:42:27 +08:00
James Chen acef98a350 Merge pull request #2572 from pyrasis/tizen
fixed #2185: Cocos2d-x Tizen support.
2013-05-20 20:08:28 -07:00
Lee, Jae-Hong 8ed243463e Adding CCEditBoxImplTizen.h and cpp. 2013-05-16 20:05:46 +09:00
minggo 5f57ec2d1b Merge pull request #2207 from csy1988525/master
fixed a bug when button's parent is hided, the button still can responce to clicked event
2013-05-15 23:44:25 -07:00
James Chen dea45e8e79 fixed #2150: Adding tests for this issue and fix compilation error of CCScale9Sprite. 2013-05-13 17:57:30 +08:00
James Chen a8c95bc6f3 Merge branch 'fix_ccscale9sprite' of git://github.com/Clarinexus/cocos2d-x into Clarinexus-fix_cccontrolbutton 2013-05-13 16:24:59 +08:00
James Chen 68aa5318de Merge branch 'fix_cccontrolbutton' of git://github.com/Clarinexus/cocos2d-x into Clarinexus-fix_cccontrolbutton 2013-05-13 16:24:41 +08:00
James Chen c0a6f0c74f fixed #2149: "const CCSize& CCScrollView::getContentSize()" --> "const CCSize& CCScrollView::getContentSize() const". 2013-05-13 15:07:47 +08:00
Michael Fox d735835753 Fixing coloring in CCControlButtons by overriding the set/get color functions 2013-05-07 13:48:58 -07:00
Michael Fox f51506eed2 Fixing CCScale9Sprites when loaded from CCB files to be able to change color and opacity 2013-05-07 12:02:32 -07:00
minggo 1166a02e13 resolve conflict for #2505 2013-05-07 14:31:00 +08:00
James Gregory 19f6c7978b More client side buffer fixes. 2013-05-06 20:59:48 -07:00
Pranav Tekchand 0a996804fa Merge branch 'master' of https://github.com/cocos2d/cocos2d-x 2013-04-30 21:06:18 +05:30
Pranav Tekchand 4360c3bff8 Support negative scaling of CCScrollView.
Not checking for it in CCScrollView::getViewRect causes intersectsRect calls (eg: to check if the touch was within the bounds) to return false.
2013-04-30 20:47:38 +05:30
Ed Bartley c7222c2b14 CCScrollView should set the TouchPriority from the CCLayer, thus allowing the developer to set a custom TouchPriority with a call to setTouchPriority(…); 2013-04-25 09:30:24 -04:00
James Chen 5b2196075a fixed #1876: CCScale9Sprite::setColor(...), setOpacity(...) are broken. 2013-04-15 16:37:35 +08:00
James Chen b7e16e9895 Fixed #2054: AnchorPoint property of CCScale9Sprite doesn't work in CCBReader.
Invoking init method in CCScale9Sprite::create().
2013-04-15 11:51:26 +08:00
James Chen 6c15c75c78 fixed #1862: CCScrollView::setContainer may cause dangling pointer when NULL is passed into. 2013-04-15 09:52:46 +08:00
James Chen 17599174ad Fixing an issue of out of bound in CCTableView.cpp. 2013-04-14 11:05:03 +08:00
James Chen fb0794bef6 fixed #2048: Fixing compilation errors on linux. 2013-04-10 17:13:19 +08:00
James Chen 3f695d1934 Merge branch 'master' of https://github.com/SevInf/cocos2d-x into SevInf-master 2013-04-10 16:07:54 +08:00
harikrishnar cd37569729 CCControlButton responds even if its parent is invisible
The Buttons should not respond if its invisble or if its made invisible
by any of its parent in the hierarchi
2013-04-09 00:27:53 +05:30
James Chen d3eed7fd1f Merge pull request #2279 from sjchao/master
fixed #2030: Fixing a display bug when a scrollView nested in another scrollView. The parent's scissor rect need to be considered, when setting the scissor rect in the subScrollView.
2013-04-07 23:55:55 -07:00
Sergej Tatarincev 1510354568 Support variable cell sizes in CCTableView 2013-04-04 17:57:43 +03:00
Sergej Tatarincev 17caacbeb5 Resize CCEditBox subviews when contentSize changes
1. Place placeholder and text labels correctly;
2. Resize native view when parent content size changes.
2013-04-02 16:34:33 +03:00
Sergej Tatarincev 380ec78fcd Allow to set EditBox font name and size separately 2013-04-02 16:31:30 +03:00
sjchao 4690a45f3e change a method name
change method name from isScissorEnable() to isScissorEnabled() in
class CCEGLViewProtocal
2013-03-29 17:19:47 +08:00
tianTian 053efa0537 m_nDefaultTouchPriority is never used anymore; Instead, we setTouchPriority(1) directly for all CCControl by default. 2013-03-29 16:19:34 +08:00
sjchao f1f31deb98 Fix the display bug when a scrollView nested in another scrollView 2013-03-29 16:05:28 +08:00
tianTian 9144946176 Fix bug: CCControl's touch priority is not set correctly; m_nDefaultTouchPriority is never used; 2013-03-23 12:18:00 +08:00
whitegfx 6cb3f6bcc0 IOS, Added CCEditBoxImplIOS kEditBoxInputFlagSensitive settings.
Added case to hide IOS autocorrection in kEditBoxInputFlagSensitive
mode.
2013-03-19 20:00:35 +01:00
csy1988525 6b92c16bb0 Update CCControlButton.cpp
fixed a bug when button's parent is hided, the button still can responce to clicked event
2013-03-19 20:56:38 +08:00
minggo d9f47d2066 Merge pull request #2128 from biteforest/Branch_fix_CCScale9Sprite_bug
fix cc scale9 sprite bug
2013-03-18 18:37:17 -07:00
James Chen 1cbc796805 Fixing wrong display of CCEditbox on retina iOS device. 2013-03-18 23:14:20 +08:00
James Chen 3e33868a63 fixed #1824: Exposed cc.EditBox to js. 2013-03-14 18:14:16 +08:00
James Chen 0a0796b572 fixed #1825: Fixing compilation errors for CCEditBox of win32 port. 2013-03-14 14:39:59 +08:00
James Chen edc02b5777 fixed #1825: The default color of text on CCEditBox is WHITE now. Fixed issues for CCEditBox of MAC port. 2013-03-14 14:29:22 +08:00
Neo Kim b2a78d9264 Comment out 'setVisible()' 2013-03-12 18:53:43 +09:00
Neo Kim ec8241058c Workaround for some problems due to UITextField of CCEditBoxImplIOS is attached as a view above OpenGL view. It has a topmost touch priority higher than any other CCNode objects, and also cannot be veiled by any other CCNode objects.
In this change, UITextField is visible only when the CCEditBox is in edit mode. And in non-edit mode, UITextField is hidden and CCLabelTTF is shown instead with all same attributes at the same place.
2013-03-12 18:23:12 +09:00
James Chen ca15cfb2b3 Merge pull request #2108 from csy1988525/master
fixed #1821: The display result is wrong when invoking CCControlButton:: setHighlighted.
2013-03-10 20:18:08 -07:00
Bite d7c7846274 fix CCScale9Sprite bugs when parsing rotated spriteframe from plist file that texture packer generate. 2013-03-09 16:23:24 +08:00
minggo d730c9749d Merge pull request #2117 from vipsbpig/master
fixed CCControl::registerWithTouchDispatcher()
2013-03-07 18:56:01 -08:00
vipsbpig ce14169f4d Update CCControl.cpp 2013-03-08 10:26:16 +08:00
vipsbpig 76e247fb9a fix CCControl::registerWithTouchDispatcher() 2013-03-08 10:25:09 +08:00
Jeong YunWon bd9656bb08 Add missing <UIKit/UIKit.h> for UITextField 2013-03-06 21:22:43 +09:00
Sam Clegg 38878b084b Fix all compiler warnings produced by gcc.
This allows the linux and NaCl builds (and perhaps others)
to be compiles with -Wall and -Werror, and it makes the build
output much less noisy.
2013-03-05 17:01:00 -08:00
csy1988525 68c2219d33 Update CCControlButton.cpp
fixed a bug that users can't set a button highlighted in the upper logic. also modify some coding format.
2013-03-05 16:26:37 +08:00
young40 43e7917463 add setVisible() to CCEditBox [Win32] 2013-03-03 20:13:22 +08:00
young40 882a6761b6 add setVisible() to CCEditBox [Android] 2013-03-03 20:08:50 +08:00
young40 933d316dc4 add setVisible() to CCEditBox [ios & mac] 2013-03-03 18:58:51 +08:00
James Chen 56340f9555 Merge branch 'iss1686-synchronize' of https://github.com/minggo/cocos2d-x into iss1686-synchronize
Conflicts:
	cocos2dx/proj.ios/cocos2dx.xcodeproj/project.pbxproj
2013-02-28 13:01:45 +08:00
minggo 63e4091bfa fixed #1686:finish updating 2013-02-28 11:55:36 +08:00
James Chen b17b1109a0 Merge pull request #2055 from dumganhar/iss1753-spidermonkey-19
fixed #1753: Upgrading SpiderMonkey to Firefox19.0.
2013-02-27 17:47:50 -08:00
James Chen 89398f9acf fixed #1754: Wrong offset of the container in CCTableView. 2013-02-27 17:52:50 +08:00
James Chen 473e8e6139 issue #1753: Upgrading SpiderMonkey to Firefox19.0, iOS works ok. 2013-02-27 15:16:49 +08:00
James Chen d572a53a1d Merge pull request #2050 from dumganhar/tableview-touch-fix
fixed #1751: Clicking outside of CCTableViewCell will also get response when container size is smaller than view size.
2013-02-26 06:56:08 -08:00
James Chen 87935ac436 tableview touch area fix. 2013-02-26 19:59:14 +08:00
James Chen efdb9180e4 fixed #1750: [iOS] CCEditBox's position is incorrect when it's added to a non-fullscreen CCNode. 2013-02-26 11:16:26 +08:00
James Chen 0ece3056ee fixed #1749: Fixed compilation errors for win32. 2013-02-25 22:50:15 +08:00
James Chen 56797db85c fixed #1749: Mac platform works ok. 2013-02-25 22:33:16 +08:00
James Chen 5fafaa8b67 Merge branch 'master' of https://github.com/neokim/cocos2d-x
Conflicts:
	scripting/javascript/bindings/generated
2013-02-25 22:18:57 +08:00
Neo Kim d42d847fb3 Added 'setPlaceholderFont()' to CCEditBox 2013-02-25 15:05:38 +09:00
James Chen cf33a4538d fixed #1730: Binds CCScrollView and CCTableView to js. 2013-02-21 10:06:22 +08:00
Neo Kim 7da2dc953d Move height adjustment code from 'getRect' to 'keyboardWillShow' 2013-02-20 22:52:49 +09:00
Neo Kim a7c87f3b38 Add 'setFont' and 'setAnchorPoint' to CCEditBox 2013-02-20 22:41:08 +09:00
James Chen 9c906bbe30 fixed #1712: fix an issue of lacking table view cells after touch ended. 2013-02-18 09:45:01 +08:00
James Chen cda7da3d43 fixed #1712: Adding default dpi for marmalade and mac since i don't know how to get DPI for these platforms. 2013-02-17 17:13:06 +08:00
James Chen ac17f67686 issue #1712: Adding getting dpi support for iOS and Android. 2013-02-16 19:36:21 +08:00
James Chen 0a9a952edc fixed #1711: Wrong clipping rectangle of CCScrollView when the scale of its ancestors isn't equal to 1. 2013-02-16 14:18:13 +08:00
James Chen 36e5da29b0 Merge branch 'master' of https://github.com/ztoky/cocos2d-x into ztoky-master 2013-02-16 13:48:35 +08:00
Heewon Song 10375ae660 Fix for CCScrollView clipping bug
fix : wrong cliping rect when ancestors scale is not 1
2013-02-14 18:43:27 +09:00
folecr b204e97ad2 Simpler, correct handling of spritesheet sources
* bounds of insets are calculated relative to sprite
 * transformations are then applied to get the texture coordinates
 * handle sprites stored rotated in a spritesheet correctly
2013-02-11 13:26:40 -08:00
xyhl515 3316f8c961 Update extensions/GUI/CCControlExtension/CCControlSwitch.cpp
implement setOn(isOn,false)
2013-01-31 22:12:37 +08:00
James Chen 157e229f8c fixed #1634: Added the very first implementation of CCEditBox for Win32. 2013-01-31 14:04:49 +08:00
James Chen 3bdfb82e9c Merge branch 'gles20' of https://github.com/jpridavok/cocos2d-x into win32-editbox
Conflicts:
	samples/Cpp/TestCpp/proj.win32/TestCpp.vcxproj.filters
2013-01-30 22:31:19 +08:00
minggo f8c4a5638d Merge pull request #1888 from folecr/s9sprite
Fix some bugs in CCScale9Sprite
2013-01-25 02:14:59 -08:00
folecr dcda7ad240 Use instances only if valid 2013-01-24 15:43:59 -08:00
folecr 3f41b361d3 CCScale9Sprite : handles default modes correctly. Bugs when the source is a sprite that is stored rotated in a spritesheet. 2013-01-23 16:42:14 -08:00
Ed Bartley 39a39fb9f4 CCTableView: Added a delegate method to inform the implementor that a cell as about to be recycled. CCTableView no longer crashes if a CCTableViewDelegate is not provided. 2013-01-23 14:04:49 -05:00
Marcel Bloemendaal 696ea07495 Fixed CCScale9Sprite::create(caInsets, file);
Fixed calling of wrong initializer in CCScale9Sprite, the create(CCRect
capInsets, const char* file). It used to call initWithFile(file,
capInsets), but this is the initializer for a file and a frame rect.
The initializer with capInsets has the capInsets rect as the first
argument. This caused unexpected behaviour.
2013-01-21 14:55:45 +01:00
James Chen 571d86d51d fixed #1553: fixed a memory leak in CCControlButton. 2013-01-21 10:16:07 +08:00
James Chen e761856b4d Added restriction marco `CC_TARGET_PLATFORM == CC_PLATFORM_MAC` for CCEditBox of MAC port.
This can avoid compilation errors if other platforms include these files.
2013-01-15 15:11:20 +08:00
James Chen 6733f786a5 fixed #1649: Reverted some invokings of function that returns const reference. 2013-01-14 16:06:18 +08:00
James Chen 6565fa92cc fixed #1649: Changed return type to const reference for member variable access. 2013-01-14 15:51:53 +08:00
Jozef Prídavok 9889b4f9fd Added the very first implementation of CCEditBox for Win32. 2013-01-10 23:59:21 +01:00
Jozef Prídavok 229ad55dfa Fixed and refactored Mac Implementation. 2013-01-09 15:34:53 +01:00
Jozef Prídavok 4f2f5a3c8f Added EditBox implementation for Mac OSX. 2013-01-09 15:09:57 +01:00
James Chen 9ef74bef80 fixed #1636: Deleted CC_ENABLE_CHIPMUNK_INTEGRATION and CC_ENABLE_BOX2D_INTEGRATION in ccConfig.h since they are moved to extension, it doesn't depend on engine any more.
Added platform macro for CCEditBoxImpl* files.
2013-01-05 11:10:24 +08:00
James Chen 7bcbcfa187 fixed #1636: Refactored CCEditBox for iOS, moved the implementation of EditBoxImplIOS.h/.cpp to CCEditBoxImplIOS.h/.cpp. 2013-01-05 10:56:57 +08:00
minggo a75f8b7e7a fixed #1593:remove all deprecated methods expect CCBAnimationManager 2012-12-06 18:51:33 +08:00
James Chen c1eded787a Merge pull request #1724 from FlowerpotGames/gles20
fixed #1599: CCScrollView and CCTableView updates.
2012-12-05 18:28:30 -08:00
Ed Bartley 73239a07e0 * Fixed improper behavior of horizontally scrolling ScrollView 2012-12-05 09:55:06 -05:00
Ed Bartley 3ed97165a5 * Add documentation to CCTableViewDelegate methods. 2012-12-04 15:46:27 -05:00
Ed Bartley 9f04817235 * CCScrollView did not scroll correctly if the container items do not fill the ScrollView. The issue can be observed by modifying TableViewTestLayer::numberOfCellsInTableView(…) in the ExtensionsTest/TableViewTest project from 20 cells to 2 cells. 2012-12-04 15:32:13 -05:00
James Chen ebd522e3fa issue #1564: Return a new object instead of 'const reference' for some get methods. 2012-11-20 16:34:55 +08:00
minggo b497143f93 issue #1555:menu can receive touch event now 2012-11-16 14:51:48 +08:00
minggo cb2bc37513 issue #1555: make tests work 2012-11-15 18:34:23 +08:00
Ed Bartley 63b20ae7ea Merge branch 'gles20' of github.com:cocos2d/cocos2d-x into gles20 2012-11-14 11:06:18 -05:00
minggo 4efdbca23b fixed #1545:remove the usage of CREATE_FUNC 2012-11-08 10:41:14 +08:00
Ed Bartley 079ab91ca5 Merge branch 'gles20' of github.com:cocos2d/cocos2d-x into gles20 2012-11-02 20:45:46 -04:00
Ed Bartley 4ec9793769 TableView updates to provide more touch input to CCTableViewDelegate 2012-11-02 20:26:43 -04:00
James Chen 1a512488fa fixed #1538: Logic error in CCControlHuePicker::checkSliderPosition.
The distance between current location and center should compare with radius rather than dimension.
2012-10-31 14:32:24 +08:00
Ed Bartley f424da2a7e * CCControl* should not respond to touches if the control is not visible. 2012-10-30 11:10:05 -04:00
James Chen fb657f674d fixed #1510: Application will freeze when 'numberOfCellsInTableView' returns zero. 2012-10-16 11:31:04 +08:00
James Chen a65f13defe issue #1486: Fix bugs for CCEditBox iOS port. 2012-10-15 13:01:36 +08:00
James Chen 0e76827b7e issue #1486: Commenting one line to avoid something like mosaic in 'CCControlExtensionTest', especially the display of 'huePickerBackground.png' when in 800*480 window size with 480*320 design resolution and hd(960*640) resources. 2012-10-14 22:03:23 +08:00
James Chen cb2f3efc2c fixed #1495: CCScrollView display area and touch area are wrong if its parent's postion isn't at CCPointZero in world. 2012-10-08 14:12:34 +08:00
Donald Alan Morrison f6b51c0a5f Merge branch 'gles20' of https://github.com/cocos2d/cocos2d-x into gles20 2012-09-25 10:20:18 -07:00
Donald Alan Morrison a245199075 Jianhua Chen pointed out a semantic error in my "fix". Thanks James!
The Static Analyzer doesn't search for this semantic error, even though it is common.
2012-09-25 10:13:49 -07:00
James Chen d91d7c8317 issue #1483: Added LICENSE_CCControlExtension.txt, and added license information for headers of CCControlExtension. 2012-09-25 17:26:09 +08:00
James Chen 83fe21b4f4 issue #1483: Removed a comment. 2012-09-25 17:03:29 +08:00
James Chen f7229f74d8 issue #1483: Synchronizing CCControlExtension to latest version. 2012-09-25 16:57:51 +08:00
Donald Alan Morrison 8693c54997 Minor memory-logic error. textField is a retain property, so assigning to it retains it, and assigning NULL to it releases it. Also, an init method called release outside the proper scope (the do{}while(0); block).
If you don't like the autorelease pool, it's easy enough to change this fix.

Aside: someone pulled tools/cxx-generator again, not me(!) :-)
2012-09-24 14:55:40 -07:00
James Chen a413496a1a Delete 'cocos2d::' since extension is the sub-namespace of cocos2d. 2012-09-24 11:08:10 +08:00
minggo 0a1f0369e6 fixed #1481: merge Nicolas's pull request and do some bug fixes 2012-09-21 17:01:19 +08:00
James Chen a6acd90c29 fixed #1458: Updated copyright information for some files which are relative to CCTableView. 2012-09-10 14:13:55 +08:00
James Chen 1460f4e42f issue #1458: Updated project configuration for all platforms.
CCTableView::viewWithSource --> CCTableView::create, adding TableViewTest.
2012-09-10 13:39:12 +08:00
James Chen 554b1709c3 issue #1458: Adding CCScrollView::updateInset. 2012-09-09 22:46:31 +08:00
James Chen d9cc8fa346 issue #1458: Adding CCTableView support. Updated win32 project configuration. 2012-09-09 22:34:32 +08:00
ThePickleMan 0a96915da2 Update extensions/GUI/CCControlExtension/CCControlSlider.cpp
Removed meaningless setter...the macro already makes one...
2012-09-04 20:54:34 -05:00
ThePickleMan 423abc6f10 Update extensions/GUI/CCControlExtension/CCControlSlider.h
Removed meaningless setter...the macro already makes one...
2012-09-04 20:54:17 -05:00
ThePickleMan f6f370ffea Update extensions/GUI/CCControlExtension/CCControlSlider.h
changed CC_SYNTHESIZE_READONLY to CC_SYNTHESIZE
2012-09-04 20:48:04 -05:00
ThePickleMan a4d2d317b5 Update extensions/GUI/CCControlExtension/CCControlSlider.cpp 2012-09-03 09:46:55 -05:00
ThePickleMan da819e1109 Update extensions/GUI/CCControlExtension/CCControlSlider.cpp
Added default values for max/min allowed values
2012-09-02 16:31:12 -05:00
ThePickleMan e07320f6a8 Update extensions/GUI/CCControlExtension/CCControlSlider.cpp
Added minimum/maximum allowed values
2012-09-02 16:10:25 -05:00
ThePickleMan 82ea6fbb99 Update extensions/GUI/CCControlExtension/CCControlSlider.h
Added fields and methods for setting the maximum allowed value.
2012-09-02 16:08:13 -05:00
fish 847ccaff7d CCRGBAProtocol must be public in order for actions like CCTintTo to have an affect on the CCScale9Sprite. 2012-08-30 10:39:36 -04:00
minggo 0e81fd0568 fixed #1442: use CREATE_FUNC instead of SCENE_CREATE_FUNC and NODE_CREATE_FUNC 2012-08-27 16:11:07 +08:00
James Chen ee3e68014b Merge branch 'gles20' of https://github.com/cocos2d/cocos2d-x into android_editbox 2012-08-24 00:16:11 +08:00
James Chen 1685e5c497 issue #1429: Used java code to implement keyboard layout. 2012-08-24 00:15:15 +08:00
James Chen a437099779 issue #1429: Use activity to implement CCEditBox for android. Next step: use dialog to implement CCEditBox. 2012-08-23 09:42:28 +08:00
James Chen bcbd161398 issue #1429: First commit CCEditBox for android port. 2012-08-22 09:47:04 +08:00
James Chen 3eecc283d0 Merge branch 'iss1437_return_pointer' of https://github.com/minggo/cocos2d-x into iss1437_return_pointer 2012-08-21 16:57:41 +08:00
James Chen d918c8186f Update extensions/GUI/CCEditBox/CCEditBox.cpp
Revert this file, uncomment some codes in 'initWithXXX'.
2012-08-21 16:03:36 +08:00
minggo cfdc50fb60 issue #1437:make CCEGLView::sharedOpenGLView() return pointer 2012-08-21 14:58:31 +08:00
Dale Ducharme 4004a8ac61 Cocos2dx for gles2. 2012-08-17 17:45:21 -04:00
James Chen f7fd4fc2bf issue #1429: Fixed a bug in EAGLView.mm. 2012-08-17 15:24:33 +08:00
James Chen d3338a70e5 issue #1429: Updated EditBoxTest and fix a bug about callback function. 2012-08-17 14:29:07 +08:00
James Chen 0fce637ec7 issue #1429: First commit CCEditBox support, only valid on IOS. PLZ refer to ExtensionsTest/EditBoxTest. 2012-08-15 14:33:56 +08:00
Walzer cc3d850892 fixed #1416, add object orientated APIs for CCGeometry, replace "CCFloat" with "float" 2012-08-01 15:30:12 +08:00
Walzer 0431cb455b fixed #1413, add CCTouch::getLocation(), getDelta() method
return OpenGL coordinates directly, to make the usage more convenient.
2012-07-31 17:41:53 +08:00
Walzer b8fa32dbc0 use extensions/GUI instead of extensions/UI 2012-07-30 22:57:59 +08:00