Commit Graph

142 Commits

Author SHA1 Message Date
Ricardo Quesada 3ecaa71944 fix: validates director before layout in iOS (#16394)
Adds Director::isValid()
removes DisplayLinkDirector()
removes virtual functions from Director()
Director is no longer an abstract class

github issue #14276
2016-08-18 18:13:15 -07:00
James Chen b135d512d2 Update copyright to 2016. (#16311) 2016-08-05 09:42:15 +08:00
mogemimi c03dd85c3f Remove redundant includes (#16285) 2016-08-01 10:22:35 +08:00
mogemimi 15030ad4c3 Fix typos in log messages 2016-07-25 02:53:22 +09:00
Ricardo Quesada 995868c62e fix: Text::create() does not crash on mac/ios
...on invalid unicode.

fixes issue #16073
2016-07-08 16:59:44 -07:00
mogemimi cbc0612306 Use nullptr instead of 0 or NULL 2016-06-23 12:39:23 +09:00
mogemimi a3bc979452 Fix typos in documentation and comments 2016-06-22 11:22:05 +09:00
子龙山人 51f4deee01 Add system label overflow (#15827)
* Add system font overflow

1. currently only iOS, Mac and Android platform are supported

add mac label overflow shrink

modify system font overflow test

fix warning and possible memory leaks

add ios system label overflow support

add iOS system font overflow support

fix iOS system font overflow

fix Mac System font overflow

add android system font clamp

add Android system font shrink

cleanup iOS shrink related code

fix Android system font clamp

add core text to project template

fix iOS tests project

fix mac and iOS shrink

improve iOS and Mac clamp feature

fix header file include path

* modify the comments, make it more clearer
2016-06-15 10:43:15 +08:00
mogemimi 948f64631f Use const references whenever possible 2016-05-17 13:17:56 +09:00
Steve Tranby 7c1e60f0b7 Prevent memory leak: force drain on autoreleased `data`. 2016-05-05 08:00:28 -06:00
mogemimi 44080a04d8 Fix typos in comments and strings 2016-03-29 10:52:17 +09:00
Xpol Wan 32e408487f Fixes import path for m and mm files. 2016-03-21 20:12:58 +08:00
Xpol Wan 931d56bc10 Fixes includes in .m and .mm files. 2016-03-21 11:02:00 +08:00
Mikhail Shulepov 014f8e107f fix: ensure calling opengl only when app is active 2016-02-13 11:17:55 +03:00
Mikhail Shulepov ab17455b18 fix: ensure drawing in main thread (layoutSubviews may be called in web thread due to banners) 2016-02-13 11:16:35 +03:00
mogemimi b14a3730ca Fix warning: extra tokens at end of #ifdef directive 2016-01-17 03:17:00 +09:00
mogemimi 41dd44c75d Fix some typos in docs 2016-01-11 19:23:05 +09:00
Ricardo Quesada 692c0f8a0e adds tvOS support
Ported tests:
 - js-tests
 - cpp-tsts
 - lua-tests
 - game-controller tests

all of them working, but most of the tests can't be navigated
since they expect a controller.
2015-12-28 15:59:36 -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
Wenhai Lin 4fa58602a8 Adds `std::nothrow` to the `new` statements 2015-12-16 14:02:55 +08:00
肖峰 23bf815cfa Fix 3d touch compile error in lower version Xcode 2015-12-14 14:26:52 +08:00
Ricardo Quesada 0e34a864b2 Merge pull request #14528 from xiaofeng11/v3_3dtouch
Add 3d touch support to iOS 9.0 or higher version on iPhone6s or later device
2015-12-03 22:21:48 -08:00
肖峰 5dfc8f6a26 Remove default arguments 2015-12-02 11:02:27 +08:00
肖峰 bb832f8d60 Add 3d touch support to iOS 9.0 or higher version on iPhone6s or later device 2015-12-01 13:02:53 +08:00
zilongshanren 60624b8fd5 fix Keyboard fails to hide on iOS.
ticket: https://github.com/cocos2d/cocos2d-x/issues/14477
2015-11-28 15:37:58 +08:00
肖峰 f0cc8e7f25 Fix keyboard won't dismiss on iOS issue 2015-11-27 15:44:35 +08:00
pandamicro 8695fbe711 Merge pull request #14172 from njh0602/somefix2
Add virtual keyword.
2015-11-11 14:17:27 +08:00
pandamicro ac06c9f8bb Merge pull request #14260 from pyrosphere/add-app-version
Added Application::getVersion() to get the app version.
2015-11-11 14:13:42 +08:00
mogemimi a31cce9a80 Fix minor grammar and typo in documentation 2015-11-04 17:14:00 +09:00
Filipe Lemos 61ce3e8a03 Fixed warnings about missing override in CCApplication for iOS/Mac 2015-10-30 10:02:07 +00:00
Filipe Lemos 9aa1f7138d Added override keyword to getVersion 2015-10-29 08:36:03 +00:00
Filipe Lemos 04fa7a8902 Added Application::getVersion() to get the app version. 2015-10-28 17:57:57 +00:00
mogemimi 9df30d2454 Fix typos in documentation 2015-10-23 16:59:51 +09:00
mogemimi 4012dd8455 Fix naming typos 2015-10-21 15:56:47 +09:00
mogemimi 34831d48ce Fix memory leak in GLViewImpl 2015-10-19 19:46:45 +09:00
남준현 f49d467465 Add virtual keyword. 2015-10-17 04:46:37 +09:00
igorzel 40a6789765 Fixed integer overflow in Device::getTextureDataForText (in CCDevice-ios.mm)
There was the problem when “height” and “width” were typecast to short
integer. So for values more than sizeof(short) we had integer overflow.

Steps to reproduce:
Create simple application with EditBox. Start it. Add 1000 (just
example) characters at a time to the EditBox. Method
Device::getTextureDataForText will be called and there will be integer
overflow for “height” and “width”. As a result application will crash
later.
2015-09-22 13:25:43 +03:00
andyque 556175df1e add iOS EditBox multiline support
When the inputMode is ANY, then we use TextView to input.
otherwise we use normal UITextField.

Fixed issue https://github.com/cocos2d/cocos2d-x/issues/13436
2015-09-15 13:52:39 +08:00
WenhaiLin a0c270234b Replace tab with spaces 2015-08-14 21:17:51 +08:00
pandamicro c81ba3c148 Merge pull request #12648 from stari4ek/v3-12645-depthstencil-attributes-ios
Fixed: #12645 iOS: depth/stencil buffers attributes are ignored
2015-07-29 11:09:56 +08:00
Ricardo Quesada ad1fc88fa8 compiles on Xcode 7 2015-07-06 16:30:29 -07:00
Jacky 4499b60446 Refine setAnimationInterval from double to float. 2015-07-06 14:57:42 +08:00
Michael Sotnikov 363da2beab Fixed: #12645 iOS: depth/stencil buffers attributes are ignored 2015-07-02 12:07:24 +03:00
kompjoefriek 6eca03fdd2 Merged changes from "Vibrate support in v4" into v3 branch. 2015-06-26 01:02:44 +02:00
Daiki Asahi fc92acf587 remove interlevel argument. 2015-04-03 16:43:39 +09:00
lyubomirv 2aec39ad56 Added Bulgarian language. 2015-03-17 15:14:02 +02:00
Jongryul Kook 0d65dd13be Fix CCDevice-ios.mm to have the right alpha color for a stroke effect. 2015-03-09 21:20:17 +09:00
loadrunner 9e310ba272 added Romanian language 2015-02-25 17:25:19 +02:00
minggo 3a4e9ced46 Merge pull request #10442 from Dhilan007/v3-accelerometer-fix
Fixed Accelerometer has lagged on iOS
2015-02-12 17:20:07 +08:00
sawada_yasuharu cf8a7cd6da Changed the option to be passed to calculate bounding rect size for
strings.

As an option, NSStringDrawingUsesLineFragmentOrigin and
NSStringDrawingUsesFontLeading are passed, the result size is differ
from the size which actually strings are rendered.
2015-02-12 15:30:46 +08:00
WenhaiLin 20ad425407 Fixed Accelerometer has lagged on iOS 2015-02-11 16:28:43 +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
Mykyta Usikov d9b5ab4a4c added Turkish and Ukrainian language;
replaced 'tabs' with 'spaces' in Application::getCurrentLanguage();
2014-12-25 12:08:23 +02:00
andyque 119a68afd9 fix EditBox move animation position is wrong on iPhone6 Plus 2014-12-08 15:34:58 +08:00
Unai Orbe cc2653d657 eaglview shouldn't be released here 2014-10-30 14:51:07 +00:00
Unai Orbe a2eb8977e0 Uncomment eaglview release CCEAGLViewImpl-ios
This is leaking the eaglview when the Director is purged.

In our case, we are leaving the cocos environment on some views which
are implemented with cocoa, and because this eaglview is not being
released, it is getting notifications for keyboard events, and trying to
access stuff on the NULL eaglview, crashing our app.

Uncommnenting this line seems to fix the problem for us, and we haven't
been able to find any nasty side effects.
2014-10-30 11:18:10 +00:00
huangshiwu 4dd9120e67 fix bug that Application::getCurrentLanguageCode on ios and mac always return empty string 2014-10-11 15:19:20 +08:00
minggo d491d9e6db Merge pull request #8149 from andyque/fixIOS8EditBox
fix ios8 EditBox orientation problem
2014-09-25 13:47:23 +08:00
minggo 2620592d62 Merge pull request #7975 from newnon/v3_openUrl
openUrl function for all platform but on windows RT empty function
2014-09-25 13:41:08 +08:00
andyque 34fbca9c50 fix ios8 EditBox orientation problem 2014-09-25 11:46:42 +08:00
minggo 79446999bb Merge pull request #8116 from Dhilan007/v3-labelfix
Cocos2d-x used a deprecated method to calculates the bounding rect of a string on iOS 7.
2014-09-24 15:03:40 +08:00
Sergey Perepelitsa d8216149de precompiled headers improvements for iOS & Mac 2014-09-23 23:19:25 +04:00
Sergey 2255cf91ba openUrl function for all platform but on windows RT empty function 2014-09-22 17:47:38 +04:00
Dhilan007 ac916c3027 Cocos2d-x used a deprecated method to get the content size of a CCLabelTTF on iOS 7. 2014-09-22 18:01:13 +08:00
Steve Kanter 05f0f71cc5 Update CCDevice-ios.mm
On iOS, Device::setKeepScreenOn(bool value) was ignoring the value and simply always disabling the timer.
2014-09-17 14:52:30 -04:00
minggo 68ab3082b4 fix warnings 2014-09-15 16:23:57 +08:00
Ricardo Quesada 6f3ca63f00 Moved base/CCPlatform* -> platform/CCPlatform* 2014-09-09 17:17:07 -07:00
Ricardo Quesada 9082ca18c3 Platform fixed 2014-09-09 16:50:02 -07:00
andyque aef0f5e729 Merge branch 'v3' into mergeExtensionEditBox
Conflicts:
	build/cocos2d_libs.xcodeproj/project.pbxproj
	cocos/ui/Android.mk
	cocos/ui/CMakeLists.txt
	cocos/ui/proj.win32/libui.vcxproj
	cocos/ui/proj.win32/libui.vcxproj.filters
	tests/cpp-tests/Classes/UITest/CocoStudioGUITest/CocosGUIScene.cpp
	tests/cpp-tests/proj.wp8-xaml/cpp-testsComponent/cpp-testsComponent.vcxproj.filters
2014-09-01 15:26:25 +08:00
minggo b8447baf73 Merge pull request #7893 from slackmoehrle/glview_fix
Glview fix
2014-08-28 10:10:17 +08:00
Ricardo Quesada 3dda35b4ef Adds `std::nothrow` to `new`
Since cocos2d-x doesn't support exceptions, it is important to add
`std::nothrow` to all the `new` statements
2014-08-27 16:31:57 -07:00
Slack-Moehrle 1b5413d8b4 comment out [glview release]; and [eaglview release]; 2014-08-27 10:42:27 -07:00
Slack-Moehrle d4d2b8c83e comment out [glview release]; and [eaglview release]; 2014-08-27 10:26:09 -07:00
huangshiwu 07af58c0c2 OpenGL context attributions setting revise -2 2014-08-22 16:22:16 +08:00
huangshiwu 7dec715288 OpenGL context attributions setting revise 2014-08-22 10:55:39 +08:00
huangshiwu 2369a5900d merge v3 to v3_glviewattrs 2014-08-21 10:18:55 +08:00
huangshiwu 2a03bea1a4 OpenGL context attributions setting 2014-08-21 09:35:32 +08:00
Sergey bfe6513706 setKeepScreenOn method 2014-08-19 15:00:58 +04:00
andyque 8d1c422ac5 merge extension EditBox to ui module 2014-08-19 10:28:24 +08:00
Dhilan007 9da4ba14f5 fixed can's set outline color for system font correctly on IOS. 2014-08-07 10:04:29 +08:00
huangshiwu ef69faf3ba GLView Hook 2014-07-31 00:53:04 +08:00
minggo b0d260d293 Merge pull request #7027 from zhouxiaoxiaoxujian/improvement/COC-9
Fix UITextField IME can't auto detach
2014-07-08 10:56:16 +08:00
Dhilan007 6e2caf1c78 fixed can's set color for LabelTTF correctly on IOS. 2014-07-08 10:31:14 +08:00
gin0606 79f82b00bc Add new line at the end of a file to *.mm 2014-06-19 20:48:50 +09:00
vision 0b8e6a6a83 The filename should be converted to lower case before comparing. 2014-06-13 15:32:49 +08:00
LinWenhai b268536385 fixed typo. 2014-06-12 09:46:18 +08:00
Dhilan007 63a68632a5 fixed calculating height of multi-line string was incorrect on IOS. 2014-06-11 21:49:08 +08:00
Frank.Xu 11919413c8 Fix UITextField IME can't auto detach 2014-06-10 14:53:27 +08:00
minggo 66c7b85134 fix issue on Xcode 6 2014-06-09 17:06:40 +08:00
minggo 2e70380dd9 invalidate NSTimer instance in destroy to prevent memory leak 2014-05-28 15:19:07 +08:00
minggo 013b3a328f remove keyboard notifications from NSNotificationCenter 2014-05-28 15:17:26 +08:00
Ricardo Quesada 0f67247325 Squashed commit of the following:
commit a794d107ad85667e3d754f0b6251fc864dfbf288
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Fri May 16 14:33:49 2014 -0700

    Yeah... everything compiles on win32 and wp8

commit 4740be6e4a0d16f742c27996e7ab2c100adc76af
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Fri May 16 13:58:38 2014 -0700

    CCIME moved to base

    and compiles on Android

commit ff3e1bf1eb27a01019f4e1b56d1aebbe2d385f72
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Fri May 16 13:02:57 2014 -0700

    compiles Ok for Windows Phone 8

commit 8160a4eb2ecdc61b5bd1cf56b90d2da6f11e3ebd
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Fri May 16 12:25:31 2014 -0700

    fixes for Windows Phone 8

commit 418197649efc93032aee0adc205e502101cdb53d
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Fri May 16 11:15:13 2014 -0700

    Compiles on Win32

commit 08813ed7cf8ac1079ffadeb1ce78ea9e833e1a33
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Fri May 16 10:08:31 2014 -0700

    Compiles on linux!

commit 118896521e5b335a5257090b6863f1fb2a2002fe
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Fri May 16 09:30:42 2014 -0700

    moves cocos/2d/platform -> cocos/platform

commit 4fe9319d7717b0c1bccb2db0156eeb86255a89e0
Merge: bd68ec2 511295e
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Fri May 16 08:24:41 2014 -0700

    Merge remote-tracking branch 'cocos2d/v3' into files

commit bd68ec2f0e3a826d8b2f4b60564ba65ce766bc56
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Thu May 15 19:36:23 2014 -0700

    files in the correct directory
2014-05-16 14:36:00 -07:00