Commit Graph

702 Commits

Author SHA1 Message Date
子龙山人 f3f67a10f9 Merge pull request #13232 from perminovVS/v3-dev-get-file-extension
Add getFileExtension to FileUtils
2015-08-11 15:54:55 +08:00
andyque b2bf8469f0 Fix EditBox turning black when soft keyboard hide.
I disable a optimization when users start to type, the resize layout's
doLayout event should be stoped.

But it has bugs. If we could find reliable soft keyboard show/hide
event detection method, we could enable this optimization again.
2015-08-11 11:42:37 +08:00
子龙山人 f6569f24f4 Merge pull request #13273 from zilongshanren/android-editbox-reimplement-fix
Re-implement Editbox on Android platform.
2015-08-09 10:25:19 +08:00
andyque a35e89225e Re-implement Editbox on Android platform.
This PR also fixed issue:

https://github.com/cocos2d/cocos2d-x/issues/9572

For the new EditBox:

1. Added a ResizeLayout for updating layout when soft keyboard is shown.
This is because some Android devices won't refresh the view and when
the view is panned, the native EditText will turn black. This is really
a hack, but it works for many Android devices from 2.3 to 5.0.

When keyboard is beginning to show, the ResizeLayout's doLayout
method will be called 24 frames per second. Once the keyboard is closed,
or the user begins to input, the doLayout method will be disabled.

2. EditText is working in a different UI thread, so all the data
are passed to GL thread via callbacks in UI thead.

3. It also overrides onKeyDown method in Cocos2dxEditBox.
When the EditText got the focus, users could press back key to exit
the game. This behavior is not allowed. We give developer the choice to
handle back key event manually.
2015-08-07 17:27:15 +08:00
Huabing.Xu ba02d9df1d fix engine crash because of wrong initialisation on some android device 2015-08-07 16:37:41 +08:00
pandamicro 0d778386f4 Merge pull request #13208 from dabingnn/v3_fixViewportCompile
Make viewport constructor more compile friendly
2015-08-06 17:45:23 +08:00
Vladimir Perminov 7cacdaeaf1 Add getFileExtension to FileUtils
Gets filename extension is a suffix (separated from the base filename by
a dot) in lower case.

More code need get filename extension, everyone does it differently.
use check UPPER and lower case, use . and no(example ".csb", ".CSB",
"csb" )

And bag in AudioEngineImpl: find point from left( ext =
strchr(filePath.c_str(), '.'); )
If file path contains point. always unsupported media type
2015-08-05 22:21:16 +03:00
pandamicro 881adf6f36 Merge pull request #13217 from jianglong0156/fixTextFieldBug
fix textfield and editbox can not input emoticon
2015-08-05 17:41:19 +08:00
子龙山人 47fe470647 Merge pull request #13213 from jianglong0156/improUtfFunction
add api getStringUTFCharsJNI newStringUTFJNI
2015-08-05 17:26:52 +08:00
jianglong0156 42ed314463 fix textfield and editbox can not input emoticon
fix textfield and editbox can not input emoticon and improve the api comments
2015-08-05 17:03:06 +08:00
jianglong0156 fac7a78fc8 improve getUTFCharsFromJavaEnv api to getStringUTFCharsJNI and add newStringUTFJNI
getUTFCharsFromJavaEnv:
getUTFCharsFromJavaEnv:change jstring to utf8 std string
newStringUTFJNI:change utf8 std string to jstring
2015-08-05 16:10:14 +08:00
Huabing.Xu 5f9a3b97fb fix viewport constructor error in old compiler to make it more compatible. 2015-08-05 10:57:27 +08:00
pandamicro 8cdcade07a Merge pull request #13186 from jianglong0156/addEmotionTest
fix getStringUTFChars bug
2015-08-05 10:19:19 +08:00
jianglong0156 00b7e98c89 improve the getUTFCharsFromJavaEnv logic and fix the httpclient response message memery leak. 2015-08-04 16:24:08 +08:00
jianglong0156 979700e343 there is a bug for getStringUTFChars function. it can't translate the emotion utf8 code. so change the getStringUTFChars to getStringChars. and translate unicode to utf8 in c++ program 2015-08-04 11:30:30 +08:00
pandamicro d20052cc22 Fix line wrapper in CCDevice 2015-08-04 11:07:04 +08:00
Sridher Jakku f48a9fb9f0 getDPI for Mac Implemented 2015-08-03 17:12:52 +05:30
pandamicro 3c2e66e425 Merge branch 'v3.7.1' of https://github.com/cocos2d/cocos2d-x into v3
# Conflicts:
#	.travis.yml
#	build/cocos2d_js_tests.xcodeproj/project.pbxproj
#	build/cocos2d_tests.xcodeproj/project.pbxproj
#	cocos/2d/CCFont.h
#	cocos/2d/CCFontAtlas.cpp
#	cocos/2d/CCFontAtlas.h
#	cocos/2d/CCFontFreeType.cpp
#	cocos/2d/CCFontFreeType.h
#	cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.Windows/libcocos2d_8_1.Windows.vcxproj
#	cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.WindowsPhone/libcocos2d_8_1.WindowsPhone.vcxproj
#	cocos/2d/libcocos2d_win10/libcocos2d.vcxproj
#	cocos/cocos2d.cpp
#	cocos/platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxHelper.cpp
#	cocos/scripting/js-bindings/auto/jsb_cocos2dx_studio_auto.cpp
#	templates/cpp-template-default/proj.ios_mac/HelloCpp.xcodeproj/project.pbxproj
#	templates/js-template-default/frameworks/runtime-src/proj.ios_mac/HelloJavascript.xcodeproj/project.pbxproj
#	templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/HelloJavascript.xcodeproj/project.pbxproj
#	templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/HelloLua.xcodeproj/project.pbxproj
#	tests/cpp-tests/Classes/LabelTest/LabelTestNew.cpp
#	tests/cpp-tests/Classes/LabelTest/LabelTestNew.h
#	tools/bindings-generator
#	tools/simulator/frameworks/runtime-src/proj.ios_mac/simulator.xcodeproj/project.pbxproj
#	tools/travis-scripts/generate-bindings.sh
#	tools/travis-scripts/generate-cocosfiles.sh
#	tools/travis-scripts/travis_mac.yml
2015-08-02 22:28:27 +08:00
pandamicro f74438372c Merge pull request #11293 from perminovVS/v3-dev-screen-size-bug
GLViewImpl initWithRect bug size
2015-07-31 18:43:23 +08:00
pandamicro aed6b0719e Merge pull request #13089 from yangws/issue_12692
Fixed #12692 : UILayout viewing area cutting position calculation error
2015-07-31 12:02:00 +08:00
Vincent Yang e1d4d22353 Fixed #12692 : UILayout viewing area cutting position calculation error 2015-07-29 18:43:11 +08:00
WenhaiLin 20d445ad1a Label:The texture of system font should be cropped if the height of label is not enough to show the entire string on Mac. 2015-07-29 16:11:27 +08:00
andyque 6de387b3ac fix Mac system font crash issue 2015-07-29 15:20:31 +08:00
子龙山人 96d44e1078 Merge pull request #13076 from WenhaiLin/v3.8-label-gb2312
Label:support font that contains GB2312 char map.
2015-07-29 14:51:17 +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
WenhaiLin 9edd66d4a7 Label:support font that contains GB2312 char map. 2015-07-28 16:28:32 +08:00
Ricardo Quesada 2deb492d36 compiles and runs on Xcode 7 2015-07-23 14:28:23 -07:00
pandamicro 31bd25a5e9 Merge pull request #12762 from yangws/issue_10759
Fix bug: Clipping node doesn't work on Android 5.0.
2015-07-21 10:47:55 +08:00
pandamicro 371053305e Merge pull request #12915 from yangws/issue_12887
Fixed #12887 : [Android] Cocos2dxHelper will not be initialized after…
2015-07-20 14:01:21 +08:00
Vincent Yang 14a419d725 Fixed #12887 : [Android] Cocos2dxHelper will not be initialized after activity recreate. 2015-07-20 11:14:06 +08:00
Wenhai Lin 66dadea0cd Rollback log level 2015-07-17 15:56:51 +08:00
WenhaiLin f0b29814c3 Label:support font that contains GB2312 char map.[android] 2015-07-16 21:35:10 +08:00
andyque 7c665e6447 remove EMSCRIPTEN related code 2015-07-16 14:15:41 +08:00
子龙山人 d291afe295 Merge pull request #12856 from fusijie/fix_rendertexture_backtofront
fixed renderTexture switch foreground to background issue.
2015-07-15 14:32:40 +08:00
Jacky a204b02668 fixed renderTexture switch foreground to background issue. 2015-07-15 13:47:10 +08:00
andyque e4cad50c2f fix tons of warnings 2015-07-15 12:04:48 +08:00
子龙山人 af4442d0d6 Merge pull request #12833 from fusijie/v3
Fixed setAnimationInterval JNI bug.
2015-07-14 16:33:39 +08:00
Jacky ea773cac20 Fixed setAnimationInterval JNI bug. 2015-07-14 15:11:35 +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
Vincent Yang 0589c14302 Restructure CCFileUtils class, move platform related functions to CCFileUtilsXXX.
Add TestIsDirectoryExist and TestUnicodePath in cpp-tests FileUtil test.
2015-07-14 09:44:36 +08:00
Vincent Yang 06bf6ffa90 Merge pr11866: FileUtilsWin32 correct use all unicode version winapi. 2015-07-14 09:35:01 +08:00
andyque fc673ee502 Merge branch 'v3.7-release' into v3 2015-07-13 22:44:54 +08:00
Vincent Yang 74227eaf16 Add TestIsDirectoryExist and TestUnicodePath in cpp-tests FileUtil test. 2015-07-13 22:44:40 +08:00
子龙山人 3d06ca297f Merge pull request #10255 from WenhaiLin/v3-activitylife-fix
Fixed game awaked by the clock on Android
2015-07-13 22:34:22 +08:00
子龙山人 22b4f5a11e Merge pull request #12238 from lite3/patch-3
remove old path When added existing new searchPath
2015-07-13 22:16:50 +08:00
Vincent Yang e65b01bdc0 Merge pr11866: FileUtilsWin32 correct use all unicode version winapi. 2015-07-13 17:06:01 +08:00
pandamicro 8ab1dce2a0 Merge pull request #12778 from yangws/issue_9586
Fix bug: FileUtils::isDirectoryExist not correct on Android when using relative path in 'assets'
2015-07-13 11:03:24 +08:00
Vincent Yang 8bc68395de Merge branch 'v3' of https://github.com/cocos2d/cocos2d-x into issue_9586 2015-07-13 11:00:18 +08:00
WenhaiLin 142d354485 [ci skip]Replace tab with spaces. 2015-07-10 21:03:43 +08:00
WenhaiLin b459940bb8 [ci skip]Replace tab with spaces. 2015-07-10 20:47:21 +08:00