mirror of https://github.com/axmolengine/axmol.git
Merge branch 'v3' of https://github.com/cocos2d/cocos2d-x into codeidev3
Conflicts: templates/lua-template-runtime/frameworks/runtime-src/Classes/AppDelegate.cpp
This commit is contained in:
commit
d502e41af4
|
@ -112,3 +112,26 @@ tests/*/publish/
|
|||
|
||||
# Android
|
||||
project.properties
|
||||
|
||||
# Ignore prebuilt libraries folder
|
||||
/external/xxhash/
|
||||
/external/curl/
|
||||
/external/edtaa3func/
|
||||
/external/freetype2/
|
||||
/external/glfw3/
|
||||
/external/jpeg/
|
||||
/external/json/
|
||||
/external/linux-specific/
|
||||
/external/lua/
|
||||
/external/png/
|
||||
/external/sqlite3/
|
||||
/external/tiff/
|
||||
/external/tinyxml2/
|
||||
/external/unzip/
|
||||
/external/webp/
|
||||
/external/websockets/
|
||||
/external/win32-specific/
|
||||
/external/winrt-specific/
|
||||
/external/wp8-specific/
|
||||
/v*-deps-*.zip
|
||||
/external/version.json
|
||||
|
|
|
@ -1,15 +1,12 @@
|
|||
[submodule "tools/cocos2d-console"]
|
||||
path = tools/cocos2d-console
|
||||
url = git://github.com/cocos2d/cocos2d-console.git
|
||||
path = tools/cocos2d-console
|
||||
url = git://github.com/cocos2d/cocos2d-console.git
|
||||
[submodule "plugin"]
|
||||
path = plugin
|
||||
url = https://github.com/cocos2d-x/plugin-x.git
|
||||
path = plugin
|
||||
url = https://github.com/cocos2d-x/plugin-x.git
|
||||
[submodule "tools/bindings-generator"]
|
||||
path = tools/bindings-generator
|
||||
url = git://github.com/cocos2d/bindings-generator.git
|
||||
[submodule "external"]
|
||||
path = external
|
||||
url = git://github.com/cocos2d/cocos2d-x-external.git
|
||||
path = tools/bindings-generator
|
||||
url = git://github.com/cocos2d/bindings-generator.git
|
||||
[submodule "tests/cpp-tests/Resources/ccs-res"]
|
||||
path = tests/cpp-tests/Resources/ccs-res
|
||||
url = git://github.com/dumganhar/ccs-res.git
|
||||
path = tests/cpp-tests/Resources/ccs-res
|
||||
url = git://github.com/dumganhar/ccs-res.git
|
||||
|
|
10
CHANGELOG
10
CHANGELOG
|
@ -1,7 +1,17 @@
|
|||
cocos2d-x-3.1-alpha1 May.8 2014
|
||||
[NEW] UI: add navigation support
|
||||
[NEW] UI: add a widget to play video
|
||||
[NEW] VS: support VS 2013
|
||||
|
||||
[FIX] Audio: pause sound automatically when go to background on Android
|
||||
[FIX] Label: label is unsharp if it's created by system font with small size on iOS & Mac OS X
|
||||
[FIX] Label: Label created with system font is still visible when its opacity is 0
|
||||
[FIX] Label: Label created with system font havs black border on WP8/WINRT
|
||||
[FIX] Lua: A potential crash in the bindings of sp.SkeletonAnimation.setAnimation
|
||||
[FIX] Lua: Lua template should fail to launch on lua error
|
||||
[FIX] ParticleSystem: Particles can be created without a texture
|
||||
|
||||
|
||||
cocos2d-x-3.1-alpha0 May.1 2014
|
||||
[NEW] Android: Adds support for get response when Activity's onActivityResult is triggered
|
||||
[NEW] Core: Adds RefPtr<T> smart pointer support
|
||||
|
|
|
@ -1093,6 +1093,14 @@
|
|||
2905FA8D18CF08D100240AA3 /* UIWidget.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2905FA1318CF08D100240AA3 /* UIWidget.cpp */; };
|
||||
2905FA8E18CF08D100240AA3 /* UIWidget.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905FA1418CF08D100240AA3 /* UIWidget.h */; };
|
||||
2905FA8F18CF08D100240AA3 /* UIWidget.h in Headers */ = {isa = PBXBuildFile; fileRef = 2905FA1418CF08D100240AA3 /* UIWidget.h */; };
|
||||
296CAD221915EC8000C64FBF /* CCEventFocus.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 296CAD201915EC8000C64FBF /* CCEventFocus.cpp */; };
|
||||
296CAD231915EC8000C64FBF /* CCEventFocus.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 296CAD201915EC8000C64FBF /* CCEventFocus.cpp */; };
|
||||
296CAD241915EC8000C64FBF /* CCEventFocus.h in Headers */ = {isa = PBXBuildFile; fileRef = 296CAD211915EC8000C64FBF /* CCEventFocus.h */; };
|
||||
296CAD251915EC8000C64FBF /* CCEventFocus.h in Headers */ = {isa = PBXBuildFile; fileRef = 296CAD211915EC8000C64FBF /* CCEventFocus.h */; };
|
||||
296CAD281915EC9900C64FBF /* CCEventListenerFocus.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 296CAD261915EC9900C64FBF /* CCEventListenerFocus.cpp */; };
|
||||
296CAD291915EC9900C64FBF /* CCEventListenerFocus.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 296CAD261915EC9900C64FBF /* CCEventListenerFocus.cpp */; };
|
||||
296CAD2A1915EC9900C64FBF /* CCEventListenerFocus.h in Headers */ = {isa = PBXBuildFile; fileRef = 296CAD271915EC9900C64FBF /* CCEventListenerFocus.h */; };
|
||||
296CAD2B1915EC9900C64FBF /* CCEventListenerFocus.h in Headers */ = {isa = PBXBuildFile; fileRef = 296CAD271915EC9900C64FBF /* CCEventListenerFocus.h */; };
|
||||
2986667F18B1B246000E39CA /* CCTweenFunction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2986667818B1B079000E39CA /* CCTweenFunction.cpp */; };
|
||||
2AC795DB1862870F005EC8E1 /* SkeletonBounds.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2AC795D918628689005EC8E1 /* SkeletonBounds.cpp */; };
|
||||
2AC795DC1862870F005EC8E1 /* Event.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2AC795D51862867D005EC8E1 /* Event.cpp */; };
|
||||
|
@ -1115,6 +1123,8 @@
|
|||
3E26D40518ACB5D100834404 /* CCImage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3E26D40418ACB5D100834404 /* CCImage.cpp */; };
|
||||
3E26D40618ACB5D100834404 /* CCImage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3E26D40418ACB5D100834404 /* CCImage.cpp */; };
|
||||
3E26D40818ACB63900834404 /* CCDevice.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3E26D40718ACB63900834404 /* CCDevice.mm */; };
|
||||
3EA0FB6B191C841D00B170C8 /* UIVideoPlayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EA0FB69191C841D00B170C8 /* UIVideoPlayer.h */; };
|
||||
3EA0FB6C191C841D00B170C8 /* UIVideoPlayerIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3EA0FB6A191C841D00B170C8 /* UIVideoPlayerIOS.mm */; };
|
||||
460E468118080832000CDD6D /* cocos-ext.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A167D21807AF4D005B8026 /* cocos-ext.h */; };
|
||||
460E468218080836000CDD6D /* cocos-ext.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A167D21807AF4D005B8026 /* cocos-ext.h */; };
|
||||
460E477B180808F5000CDD6D /* ExtensionMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 46A168321807AF4E005B8026 /* ExtensionMacros.h */; };
|
||||
|
@ -2279,6 +2289,10 @@
|
|||
2905FA1218CF08D100240AA3 /* UITextField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UITextField.h; sourceTree = "<group>"; };
|
||||
2905FA1318CF08D100240AA3 /* UIWidget.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UIWidget.cpp; sourceTree = "<group>"; };
|
||||
2905FA1418CF08D100240AA3 /* UIWidget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIWidget.h; sourceTree = "<group>"; };
|
||||
296CAD201915EC8000C64FBF /* CCEventFocus.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCEventFocus.cpp; path = ../base/CCEventFocus.cpp; sourceTree = "<group>"; };
|
||||
296CAD211915EC8000C64FBF /* CCEventFocus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCEventFocus.h; path = ../base/CCEventFocus.h; sourceTree = "<group>"; };
|
||||
296CAD261915EC9900C64FBF /* CCEventListenerFocus.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CCEventListenerFocus.cpp; path = ../base/CCEventListenerFocus.cpp; sourceTree = "<group>"; };
|
||||
296CAD271915EC9900C64FBF /* CCEventListenerFocus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CCEventListenerFocus.h; path = ../base/CCEventListenerFocus.h; sourceTree = "<group>"; };
|
||||
2986667818B1B079000E39CA /* CCTweenFunction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCTweenFunction.cpp; sourceTree = "<group>"; };
|
||||
2986667918B1B079000E39CA /* CCTweenFunction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCTweenFunction.h; sourceTree = "<group>"; };
|
||||
2AC795D318628672005EC8E1 /* BoundingBoxAttachment.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BoundingBoxAttachment.cpp; sourceTree = "<group>"; };
|
||||
|
@ -2302,6 +2316,8 @@
|
|||
37936A3E1869B76800E974DD /* writer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = writer.h; sourceTree = "<group>"; };
|
||||
3E26D40418ACB5D100834404 /* CCImage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CCImage.cpp; sourceTree = "<group>"; };
|
||||
3E26D40718ACB63900834404 /* CCDevice.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CCDevice.mm; sourceTree = "<group>"; };
|
||||
3EA0FB69191C841D00B170C8 /* UIVideoPlayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIVideoPlayer.h; sourceTree = "<group>"; };
|
||||
3EA0FB6A191C841D00B170C8 /* UIVideoPlayerIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = UIVideoPlayerIOS.mm; sourceTree = "<group>"; };
|
||||
46A15FCC1807A544005B8026 /* AUTHORS */ = {isa = PBXFileReference; lastKnownFileType = text; name = AUTHORS; path = ../AUTHORS; sourceTree = "<group>"; };
|
||||
46A15FCE1807A544005B8026 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = text; name = README.md; path = ../README.md; sourceTree = "<group>"; };
|
||||
46A15FE11807A56F005B8026 /* Export.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Export.h; sourceTree = "<group>"; };
|
||||
|
@ -3098,6 +3114,10 @@
|
|||
500DC92719106300007B91BF /* s3tc.h */,
|
||||
500DC92819106300007B91BF /* ZipUtils.cpp */,
|
||||
500DC92919106300007B91BF /* ZipUtils.h */,
|
||||
296CAD201915EC8000C64FBF /* CCEventFocus.cpp */,
|
||||
296CAD211915EC8000C64FBF /* CCEventFocus.h */,
|
||||
296CAD261915EC9900C64FBF /* CCEventListenerFocus.cpp */,
|
||||
296CAD271915EC9900C64FBF /* CCEventListenerFocus.h */,
|
||||
);
|
||||
name = base;
|
||||
path = ../cocos/2d;
|
||||
|
@ -3957,6 +3977,8 @@
|
|||
2905F9E618CF08D000240AA3 /* ui */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3EA0FB69191C841D00B170C8 /* UIVideoPlayer.h */,
|
||||
3EA0FB6A191C841D00B170C8 /* UIVideoPlayerIOS.mm */,
|
||||
2905F9E918CF08D000240AA3 /* CocosGUI.cpp */,
|
||||
2905F9EA18CF08D000240AA3 /* CocosGUI.h */,
|
||||
2905F9EB18CF08D000240AA3 /* GUIDefine.h */,
|
||||
|
@ -4928,6 +4950,7 @@
|
|||
500DC94E19106300007B91BF /* CCEvent.h in Headers */,
|
||||
1A57007F180BC5A10088DEC7 /* CCActionInterval.h in Headers */,
|
||||
1A01C69A18F57BE800EFE3A6 /* CCSet.h in Headers */,
|
||||
296CAD2A1915EC9900C64FBF /* CCEventListenerFocus.h in Headers */,
|
||||
A023FA36185198C800E10CD1 /* ccShader_PositionTextureColor_noMVP_vert.h in Headers */,
|
||||
1A570083180BC5A10088DEC7 /* CCActionManager.h in Headers */,
|
||||
1A570087180BC5A10088DEC7 /* CCActionPageTurn3D.h in Headers */,
|
||||
|
@ -5078,6 +5101,7 @@
|
|||
1A570356180BD0B00088DEC7 /* ioapi.h in Headers */,
|
||||
500DC99619106300007B91BF /* CCScheduler.h in Headers */,
|
||||
1A57035A180BD0B00088DEC7 /* unzip.h in Headers */,
|
||||
296CAD241915EC8000C64FBF /* CCEventFocus.h in Headers */,
|
||||
1A570535180BD9500088DEC7 /* CCGLProgram.h in Headers */,
|
||||
1AA95FE018EBB8EF00AE7485 /* ccShader_Label_frag_df.h in Headers */,
|
||||
500DC98819106300007B91BF /* CCNS.h in Headers */,
|
||||
|
@ -5463,6 +5487,7 @@
|
|||
2905FA7B18CF08D100240AA3 /* UISlider.h in Headers */,
|
||||
1AA95FE318EBB8EF00AE7485 /* ccShader_Label_frag_normal.h in Headers */,
|
||||
1A5701CE180BCB5A0088DEC7 /* CCLabelTTF.h in Headers */,
|
||||
296CAD251915EC8000C64FBF /* CCEventFocus.h in Headers */,
|
||||
50FCEBCA18C72017004AD434 /* WidgetReader.h in Headers */,
|
||||
1A5701E1180BCB8C0088DEC7 /* CCLayer.h in Headers */,
|
||||
1A5701E5180BCB8C0088DEC7 /* CCScene.h in Headers */,
|
||||
|
@ -5592,6 +5617,7 @@
|
|||
B2AF2FAC18EBAEAE00C5807C /* Vector4.h in Headers */,
|
||||
5027253B190BF1B900AAF4ED /* cocos2d.h in Headers */,
|
||||
1AD71DFC180E26E600808F54 /* CCNodeLoaderListener.h in Headers */,
|
||||
3EA0FB6B191C841D00B170C8 /* UIVideoPlayer.h in Headers */,
|
||||
1AD71E00180E26E600808F54 /* CCParticleSystemQuadLoader.h in Headers */,
|
||||
1AD71E04180E26E600808F54 /* CCScale9SpriteLoader.h in Headers */,
|
||||
1AD71E08180E26E600808F54 /* CCScrollViewLoader.h in Headers */,
|
||||
|
@ -5647,6 +5673,7 @@
|
|||
1A9DCA3C180E6955007A3AD4 /* firePngData.h in Headers */,
|
||||
1AA95FDF18EBB8EF00AE7485 /* ccShader_Label_frag_df_glow.h in Headers */,
|
||||
1A01C69F18F57BE800EFE3A6 /* CCString.h in Headers */,
|
||||
296CAD2B1915EC9900C64FBF /* CCEventListenerFocus.h in Headers */,
|
||||
1A01C69118F57BE800EFE3A6 /* CCDictionary.h in Headers */,
|
||||
500DC99B19106300007B91BF /* ccTypes.h in Headers */,
|
||||
1A8C598E180E930E00EF57C3 /* CCActionFrame.h in Headers */,
|
||||
|
@ -6110,6 +6137,7 @@
|
|||
1A570081180BC5A10088DEC7 /* CCActionManager.cpp in Sources */,
|
||||
1A570085180BC5A10088DEC7 /* CCActionPageTurn3D.cpp in Sources */,
|
||||
1A570089180BC5A10088DEC7 /* CCActionProgressTimer.cpp in Sources */,
|
||||
296CAD281915EC9900C64FBF /* CCEventListenerFocus.cpp in Sources */,
|
||||
1A57008D180BC5A10088DEC7 /* CCActionTiledGrid.cpp in Sources */,
|
||||
1A570091180BC5A10088DEC7 /* CCActionTween.cpp in Sources */,
|
||||
B2AF2F9918EBAEAE00C5807C /* Matrix.cpp in Sources */,
|
||||
|
@ -6278,6 +6306,7 @@
|
|||
1AD71ECD180E26E600808F54 /* Skeleton.cpp in Sources */,
|
||||
1AD71ED1180E26E600808F54 /* SkeletonData.cpp in Sources */,
|
||||
1AD71ED5180E26E600808F54 /* SkeletonJson.cpp in Sources */,
|
||||
296CAD221915EC8000C64FBF /* CCEventFocus.cpp in Sources */,
|
||||
1AD71ED9180E26E600808F54 /* Skin.cpp in Sources */,
|
||||
1AD71EDD180E26E600808F54 /* Slot.cpp in Sources */,
|
||||
1AD71EE1180E26E600808F54 /* SlotData.cpp in Sources */,
|
||||
|
@ -6484,6 +6513,7 @@
|
|||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
296CAD291915EC9900C64FBF /* CCEventListenerFocus.cpp in Sources */,
|
||||
1A01C69918F57BE800EFE3A6 /* CCSet.cpp in Sources */,
|
||||
1A01C69D18F57BE800EFE3A6 /* CCString.cpp in Sources */,
|
||||
2986667F18B1B246000E39CA /* CCTweenFunction.cpp in Sources */,
|
||||
|
@ -6523,6 +6553,7 @@
|
|||
500DC92B19106300007B91BF /* atitc.cpp in Sources */,
|
||||
46A170FE1807CECB005B8026 /* CCPhysicsContact.cpp in Sources */,
|
||||
46A170391807CBFE005B8026 /* CCThread.cpp in Sources */,
|
||||
3EA0FB6C191C841D00B170C8 /* UIVideoPlayerIOS.mm in Sources */,
|
||||
46A170421807CC07005B8026 /* CCGLView.mm in Sources */,
|
||||
1A570062180BC5A10088DEC7 /* CCAction.cpp in Sources */,
|
||||
1A570066180BC5A10088DEC7 /* CCActionCamera.cpp in Sources */,
|
||||
|
@ -6631,6 +6662,7 @@
|
|||
1A570306180BCED90088DEC7 /* ccUtils.cpp in Sources */,
|
||||
1A57030D180BCF190088DEC7 /* CCComponent.cpp in Sources */,
|
||||
1A570311180BCF190088DEC7 /* CCComponentContainer.cpp in Sources */,
|
||||
296CAD231915EC8000C64FBF /* CCEventFocus.cpp in Sources */,
|
||||
1A57031A180BCF430088DEC7 /* ccCArray.cpp in Sources */,
|
||||
B375107C1823ACA100B3BA6A /* CCPhysicsBodyInfo_chipmunk.cpp in Sources */,
|
||||
50FCEBB418C72017004AD434 /* SliderReader.cpp in Sources */,
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -934,6 +934,7 @@ void Label::createSpriteWithFontDefinition()
|
|||
Node::addChild(_textSprite,0,Node::INVALID_TAG);
|
||||
|
||||
_textSprite->updateDisplayedColor(_displayedColor);
|
||||
_textSprite->updateDisplayedOpacity(_displayedOpacity);
|
||||
}
|
||||
|
||||
void Label::setFontDefinition(const FontDefinition& textDefinition)
|
||||
|
|
|
@ -203,7 +203,7 @@ protected:
|
|||
/** The Sprite being used.
|
||||
The sprite, by default, will use the following blending function: GL_ONE, GL_ONE_MINUS_SRC_ALPHA.
|
||||
The blending function can be changed in runtime by calling:
|
||||
- [[renderTexture sprite] setBlendFunc:(BlendFunc){GL_ONE, GL_ONE_MINUS_SRC_ALPHA}];
|
||||
- renderTexture->getSprite()->setBlendFunc((BlendFunc){GL_ONE, GL_ONE_MINUS_SRC_ALPHA});
|
||||
*/
|
||||
Sprite* _sprite;
|
||||
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '10.0'">v100</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0'">v110</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0'">v120</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v120_xp</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
|
@ -30,6 +32,8 @@
|
|||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '10.0'">v100</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0'">v110</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0'">v120</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v120_xp</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
|
@ -181,10 +185,12 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(Ou
|
|||
<ClCompile Include="..\base\CCEventAcceleration.cpp" />
|
||||
<ClCompile Include="..\base\CCEventCustom.cpp" />
|
||||
<ClCompile Include="..\base\CCEventDispatcher.cpp" />
|
||||
<ClCompile Include="..\base\CCEventFocus.cpp" />
|
||||
<ClCompile Include="..\base\CCEventKeyboard.cpp" />
|
||||
<ClCompile Include="..\base\CCEventListener.cpp" />
|
||||
<ClCompile Include="..\base\CCEventListenerAcceleration.cpp" />
|
||||
<ClCompile Include="..\base\CCEventListenerCustom.cpp" />
|
||||
<ClCompile Include="..\base\CCEventListenerFocus.cpp" />
|
||||
<ClCompile Include="..\base\CCEventListenerKeyboard.cpp" />
|
||||
<ClCompile Include="..\base\CCEventListenerMouse.cpp" />
|
||||
<ClCompile Include="..\base\CCEventListenerTouch.cpp" />
|
||||
|
@ -341,10 +347,12 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\win32-specific\gles\prebuilt\*.*" "$(Ou
|
|||
<ClInclude Include="..\base\CCEventAcceleration.h" />
|
||||
<ClInclude Include="..\base\CCEventCustom.h" />
|
||||
<ClInclude Include="..\base\CCEventDispatcher.h" />
|
||||
<ClInclude Include="..\base\CCEventFocus.h" />
|
||||
<ClInclude Include="..\base\CCEventKeyboard.h" />
|
||||
<ClInclude Include="..\base\CCEventListener.h" />
|
||||
<ClInclude Include="..\base\CCEventListenerAcceleration.h" />
|
||||
<ClInclude Include="..\base\CCEventListenerCustom.h" />
|
||||
<ClInclude Include="..\base\CCEventListenerFocus.h" />
|
||||
<ClInclude Include="..\base\CCEventListenerKeyboard.h" />
|
||||
<ClInclude Include="..\base\CCEventListenerMouse.h" />
|
||||
<ClInclude Include="..\base\CCEventListenerTouch.h" />
|
||||
|
|
|
@ -570,6 +570,12 @@
|
|||
<ClCompile Include="..\renderer\CCRenderer.cpp">
|
||||
<Filter>renderer</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\base\CCEventFocus.cpp">
|
||||
<Filter>base</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\base\CCEventListenerFocus.cpp">
|
||||
<Filter>base</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\physics\CCPhysicsBody.h">
|
||||
|
@ -1154,6 +1160,12 @@
|
|||
<ClInclude Include="..\renderer\CCRenderer.h">
|
||||
<Filter>renderer</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\base\CCEventFocus.h">
|
||||
<Filter>base</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\base\CCEventListenerFocus.h">
|
||||
<Filter>base</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="..\math\CMakeLists.txt">
|
||||
|
|
|
@ -221,10 +221,12 @@
|
|||
<ClCompile Include="..\base\CCEventAcceleration.cpp" />
|
||||
<ClCompile Include="..\base\CCEventCustom.cpp" />
|
||||
<ClCompile Include="..\base\CCEventDispatcher.cpp" />
|
||||
<ClCompile Include="..\base\CCEventFocus.cpp" />
|
||||
<ClCompile Include="..\base\CCEventKeyboard.cpp" />
|
||||
<ClCompile Include="..\base\CCEventListener.cpp" />
|
||||
<ClCompile Include="..\base\CCEventListenerAcceleration.cpp" />
|
||||
<ClCompile Include="..\base\CCEventListenerCustom.cpp" />
|
||||
<ClCompile Include="..\base\CCEventListenerFocus.cpp" />
|
||||
<ClCompile Include="..\base\CCEventListenerKeyboard.cpp" />
|
||||
<ClCompile Include="..\base\CCEventListenerMouse.cpp" />
|
||||
<ClCompile Include="..\base\CCEventListenerTouch.cpp" />
|
||||
|
@ -430,10 +432,12 @@
|
|||
<ClInclude Include="..\base\CCEventAcceleration.h" />
|
||||
<ClInclude Include="..\base\CCEventCustom.h" />
|
||||
<ClInclude Include="..\base\CCEventDispatcher.h" />
|
||||
<ClInclude Include="..\base\CCEventFocus.h" />
|
||||
<ClInclude Include="..\base\CCEventKeyboard.h" />
|
||||
<ClInclude Include="..\base\CCEventListener.h" />
|
||||
<ClInclude Include="..\base\CCEventListenerAcceleration.h" />
|
||||
<ClInclude Include="..\base\CCEventListenerCustom.h" />
|
||||
<ClInclude Include="..\base\CCEventListenerFocus.h" />
|
||||
<ClInclude Include="..\base\CCEventListenerKeyboard.h" />
|
||||
<ClInclude Include="..\base\CCEventListenerMouse.h" />
|
||||
<ClInclude Include="..\base\CCEventListenerTouch.h" />
|
||||
|
|
|
@ -594,6 +594,12 @@
|
|||
<ClCompile Include="..\math\TransformUtils.cpp">
|
||||
<Filter>math</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\base\CCEventFocus.cpp">
|
||||
<Filter>base</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\base\CCEventListenerFocus.cpp">
|
||||
<Filter>base</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\physics\CCPhysicsBody.h">
|
||||
|
@ -1174,6 +1180,12 @@
|
|||
<ClInclude Include="..\math\TransformUtils.h">
|
||||
<Filter>math</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\base\CCEventFocus.h">
|
||||
<Filter>base</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\base\CCEventListenerFocus.h">
|
||||
<Filter>base</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\math\MathUtil.inl">
|
||||
|
|
|
@ -43,7 +43,7 @@ public abstract class Cocos2dxActivity extends Activity implements Cocos2dxHelpe
|
|||
// Constants
|
||||
// ===========================================================
|
||||
|
||||
private static final String TAG = Cocos2dxActivity.class.getSimpleName();
|
||||
private final static String TAG = Cocos2dxActivity.class.getSimpleName();
|
||||
|
||||
// ===========================================================
|
||||
// Fields
|
||||
|
@ -51,7 +51,8 @@ public abstract class Cocos2dxActivity extends Activity implements Cocos2dxHelpe
|
|||
|
||||
private Cocos2dxGLSurfaceView mGLSurfaceView;
|
||||
private Cocos2dxHandler mHandler;
|
||||
private static Context sContext = null;
|
||||
private static Cocos2dxActivity sContext = null;
|
||||
private Cocos2dxVideoHelper mVideoHelper = null;
|
||||
|
||||
public static Context getContext() {
|
||||
return sContext;
|
||||
|
@ -81,9 +82,12 @@ public abstract class Cocos2dxActivity extends Activity implements Cocos2dxHelpe
|
|||
sContext = this;
|
||||
this.mHandler = new Cocos2dxHandler(this);
|
||||
|
||||
this.init();
|
||||
Cocos2dxHelper.init(this);
|
||||
|
||||
Cocos2dxHelper.init(this);
|
||||
this.init();
|
||||
if (mVideoHelper == null) {
|
||||
mVideoHelper = new Cocos2dxVideoHelper(this, mFrameLayout);
|
||||
}
|
||||
}
|
||||
|
||||
// ===========================================================
|
||||
|
@ -142,6 +146,7 @@ public abstract class Cocos2dxActivity extends Activity implements Cocos2dxHelpe
|
|||
}
|
||||
|
||||
|
||||
protected FrameLayout mFrameLayout = null;
|
||||
// ===========================================================
|
||||
// Methods
|
||||
// ===========================================================
|
||||
|
@ -151,8 +156,8 @@ public abstract class Cocos2dxActivity extends Activity implements Cocos2dxHelpe
|
|||
ViewGroup.LayoutParams framelayout_params =
|
||||
new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
|
||||
ViewGroup.LayoutParams.MATCH_PARENT);
|
||||
FrameLayout framelayout = new FrameLayout(this);
|
||||
framelayout.setLayoutParams(framelayout_params);
|
||||
mFrameLayout = new FrameLayout(this);
|
||||
mFrameLayout.setLayoutParams(framelayout_params);
|
||||
|
||||
// Cocos2dxEditText layout
|
||||
ViewGroup.LayoutParams edittext_layout_params =
|
||||
|
@ -162,13 +167,13 @@ public abstract class Cocos2dxActivity extends Activity implements Cocos2dxHelpe
|
|||
edittext.setLayoutParams(edittext_layout_params);
|
||||
|
||||
// ...add to FrameLayout
|
||||
framelayout.addView(edittext);
|
||||
mFrameLayout.addView(edittext);
|
||||
|
||||
// Cocos2dxGLSurfaceView
|
||||
this.mGLSurfaceView = this.onCreateView();
|
||||
|
||||
// ...add to FrameLayout
|
||||
framelayout.addView(this.mGLSurfaceView);
|
||||
mFrameLayout.addView(this.mGLSurfaceView);
|
||||
|
||||
// Switch to supported OpenGL (ARGB888) mode on emulator
|
||||
if (isAndroidEmulator())
|
||||
|
@ -178,7 +183,7 @@ public abstract class Cocos2dxActivity extends Activity implements Cocos2dxHelpe
|
|||
this.mGLSurfaceView.setCocos2dxEditText(edittext);
|
||||
|
||||
// Set framelayout as the content view
|
||||
setContentView(framelayout);
|
||||
setContentView(mFrameLayout);
|
||||
}
|
||||
|
||||
public Cocos2dxGLSurfaceView onCreateView() {
|
||||
|
|
|
@ -293,6 +293,13 @@ public class Cocos2dxGLSurfaceView extends GLSurfaceView {
|
|||
switch (pKeyCode) {
|
||||
case KeyEvent.KEYCODE_BACK:
|
||||
case KeyEvent.KEYCODE_MENU:
|
||||
case KeyEvent.KEYCODE_DPAD_LEFT:
|
||||
case KeyEvent.KEYCODE_DPAD_RIGHT:
|
||||
case KeyEvent.KEYCODE_DPAD_UP:
|
||||
case KeyEvent.KEYCODE_DPAD_DOWN:
|
||||
case KeyEvent.KEYCODE_ENTER:
|
||||
case KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE:
|
||||
case KeyEvent.KEYCODE_DPAD_CENTER:
|
||||
this.queueEvent(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
|
|
@ -292,6 +292,16 @@ public class Cocos2dxHelper {
|
|||
}
|
||||
}
|
||||
|
||||
public static void onEnterBackground() {
|
||||
sCocos2dSound.onEnterBackground();
|
||||
sCocos2dMusic.onEnterBackground();
|
||||
}
|
||||
|
||||
public static void onEnterForeground() {
|
||||
sCocos2dSound.onEnterForeground();
|
||||
sCocos2dMusic.onEnterForeground();
|
||||
}
|
||||
|
||||
public static void terminateProcess() {
|
||||
android.os.Process.killProcess(android.os.Process.myPid());
|
||||
}
|
||||
|
|
|
@ -47,7 +47,8 @@ public class Cocos2dxMusic {
|
|||
private MediaPlayer mBackgroundMediaPlayer;
|
||||
private float mLeftVolume;
|
||||
private float mRightVolume;
|
||||
private boolean mPaused;
|
||||
private boolean mPaused;// whether music is paused state.
|
||||
private boolean mManualPaused = false;// whether music is paused manually before the program is switched to the background.
|
||||
private String mCurrentPath;
|
||||
|
||||
// ===========================================================
|
||||
|
@ -142,6 +143,7 @@ public class Cocos2dxMusic {
|
|||
if (this.mBackgroundMediaPlayer != null && this.mBackgroundMediaPlayer.isPlaying()) {
|
||||
this.mBackgroundMediaPlayer.pause();
|
||||
this.mPaused = true;
|
||||
this.mManualPaused = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -149,6 +151,7 @@ public class Cocos2dxMusic {
|
|||
if (this.mBackgroundMediaPlayer != null && this.mPaused) {
|
||||
this.mBackgroundMediaPlayer.start();
|
||||
this.mPaused = false;
|
||||
this.mManualPaused = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -211,6 +214,22 @@ public class Cocos2dxMusic {
|
|||
}
|
||||
}
|
||||
|
||||
public void onEnterBackground(){
|
||||
if (this.mBackgroundMediaPlayer != null && this.mBackgroundMediaPlayer.isPlaying()) {
|
||||
this.mBackgroundMediaPlayer.pause();
|
||||
this.mPaused = true;
|
||||
}
|
||||
}
|
||||
|
||||
public void onEnterForeground(){
|
||||
if(!this.mManualPaused){
|
||||
if (this.mBackgroundMediaPlayer != null && this.mPaused) {
|
||||
this.mBackgroundMediaPlayer.start();
|
||||
this.mPaused = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void initData() {
|
||||
this.mLeftVolume = 0.5f;
|
||||
this.mRightVolume = 0.5f;
|
||||
|
|
|
@ -28,6 +28,7 @@ import javax.microedition.khronos.opengles.GL10;
|
|||
|
||||
import android.opengl.GLSurfaceView;
|
||||
|
||||
import org.cocos2dx.lib.Cocos2dxHelper;
|
||||
public class Cocos2dxRenderer implements GLSurfaceView.Renderer {
|
||||
// ===========================================================
|
||||
// Constants
|
||||
|
@ -144,10 +145,12 @@ public class Cocos2dxRenderer implements GLSurfaceView.Renderer {
|
|||
}
|
||||
|
||||
public void handleOnPause() {
|
||||
Cocos2dxHelper.onEnterBackground();
|
||||
Cocos2dxRenderer.nativeOnPause();
|
||||
}
|
||||
|
||||
public void handleOnResume() {
|
||||
Cocos2dxHelper.onEnterForeground();
|
||||
Cocos2dxRenderer.nativeOnResume();
|
||||
}
|
||||
|
||||
|
|
|
@ -129,8 +129,8 @@ public class Cocos2dxSound {
|
|||
// stop effects
|
||||
final ArrayList<Integer> streamIDs = this.mPathStreamIDsMap.get(pPath);
|
||||
if (streamIDs != null) {
|
||||
for (final Integer pStreamID : streamIDs) {
|
||||
this.mSoundPool.stop(pStreamID);
|
||||
for (final Integer steamID : streamIDs) {
|
||||
this.mSoundPool.stop(steamID);
|
||||
}
|
||||
}
|
||||
this.mPathStreamIDsMap.remove(pPath);
|
||||
|
@ -180,28 +180,36 @@ public class Cocos2dxSound {
|
|||
return streamID;
|
||||
}
|
||||
|
||||
public void stopEffect(final int pStreamID) {
|
||||
this.mSoundPool.stop(pStreamID);
|
||||
public void stopEffect(final int steamID) {
|
||||
this.mSoundPool.stop(steamID);
|
||||
|
||||
// remove record
|
||||
for (final String pPath : this.mPathStreamIDsMap.keySet()) {
|
||||
if (this.mPathStreamIDsMap.get(pPath).contains(pStreamID)) {
|
||||
this.mPathStreamIDsMap.get(pPath).remove(this.mPathStreamIDsMap.get(pPath).indexOf(pStreamID));
|
||||
if (this.mPathStreamIDsMap.get(pPath).contains(steamID)) {
|
||||
this.mPathStreamIDsMap.get(pPath).remove(this.mPathStreamIDsMap.get(pPath).indexOf(steamID));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void pauseEffect(final int pStreamID) {
|
||||
this.mSoundPool.pause(pStreamID);
|
||||
public void pauseEffect(final int steamID) {
|
||||
this.mSoundPool.pause(steamID);
|
||||
}
|
||||
|
||||
public void resumeEffect(final int pStreamID) {
|
||||
this.mSoundPool.resume(pStreamID);
|
||||
public void resumeEffect(final int steamID) {
|
||||
this.mSoundPool.resume(steamID);
|
||||
}
|
||||
|
||||
public void pauseAllEffects() {
|
||||
this.mSoundPool.autoPause();
|
||||
if (!this.mPathStreamIDsMap.isEmpty()) {
|
||||
final Iterator<Entry<String, ArrayList<Integer>>> iter = this.mPathStreamIDsMap.entrySet().iterator();
|
||||
while (iter.hasNext()) {
|
||||
final Entry<String, ArrayList<Integer>> entry = iter.next();
|
||||
for (final int steamID : entry.getValue()) {
|
||||
this.mSoundPool.pause(steamID);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void resumeAllEffects() {
|
||||
|
@ -211,8 +219,8 @@ public class Cocos2dxSound {
|
|||
final Iterator<Entry<String, ArrayList<Integer>>> iter = this.mPathStreamIDsMap.entrySet().iterator();
|
||||
while (iter.hasNext()) {
|
||||
final Entry<String, ArrayList<Integer>> entry = iter.next();
|
||||
for (final int pStreamID : entry.getValue()) {
|
||||
this.mSoundPool.resume(pStreamID);
|
||||
for (final int steamID : entry.getValue()) {
|
||||
this.mSoundPool.resume(steamID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -225,8 +233,8 @@ public class Cocos2dxSound {
|
|||
final Iterator<?> iter = this.mPathStreamIDsMap.entrySet().iterator();
|
||||
while (iter.hasNext()) {
|
||||
final Map.Entry<String, ArrayList<Integer>> entry = (Map.Entry<String, ArrayList<Integer>>) iter.next();
|
||||
for (final int pStreamID : entry.getValue()) {
|
||||
this.mSoundPool.stop(pStreamID);
|
||||
for (final int steamID : entry.getValue()) {
|
||||
this.mSoundPool.stop(steamID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -255,8 +263,8 @@ public class Cocos2dxSound {
|
|||
final Iterator<Entry<String, ArrayList<Integer>>> iter = this.mPathStreamIDsMap.entrySet().iterator();
|
||||
while (iter.hasNext()) {
|
||||
final Entry<String, ArrayList<Integer>> entry = iter.next();
|
||||
for (final int pStreamID : entry.getValue()) {
|
||||
this.mSoundPool.setVolume(pStreamID, this.mLeftVolume, this.mRightVolume);
|
||||
for (final int steamID : entry.getValue()) {
|
||||
this.mSoundPool.setVolume(steamID, this.mLeftVolume, this.mRightVolume);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -319,6 +327,14 @@ public class Cocos2dxSound {
|
|||
return streamID;
|
||||
}
|
||||
|
||||
public void onEnterBackground(){
|
||||
this.mSoundPool.autoPause();
|
||||
}
|
||||
|
||||
public void onEnterForeground(){
|
||||
this.mSoundPool.autoResume();
|
||||
}
|
||||
|
||||
// ===========================================================
|
||||
// Inner and Anonymous Classes
|
||||
// ===========================================================
|
||||
|
|
|
@ -0,0 +1,386 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2014 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
package org.cocos2dx.lib;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
import org.cocos2dx.lib.Cocos2dxVideoView.OnVideoEventListener;
|
||||
|
||||
import android.graphics.Rect;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.util.SparseArray;
|
||||
import android.view.View;
|
||||
import android.widget.FrameLayout;
|
||||
|
||||
public class Cocos2dxVideoHelper {
|
||||
|
||||
private FrameLayout mLayout = null;
|
||||
private Cocos2dxActivity mActivity = null;
|
||||
private SparseArray<Cocos2dxVideoView> sVideoViews = null;
|
||||
private static VideoHandler mVideoHandler = null;
|
||||
|
||||
Cocos2dxVideoHelper(Cocos2dxActivity activity,FrameLayout layout)
|
||||
{
|
||||
mActivity = activity;
|
||||
mLayout = layout;
|
||||
|
||||
mVideoHandler = new VideoHandler(this);
|
||||
sVideoViews = new SparseArray<Cocos2dxVideoView>();
|
||||
}
|
||||
|
||||
private static int videoTag = 0;
|
||||
private final static int VideoTaskCreate = 0;
|
||||
private final static int VideoTaskRemove = 1;
|
||||
private final static int VideoTaskSetSource = 2;
|
||||
private final static int VideoTaskSetRect = 3;
|
||||
private final static int VideoTaskStart = 4;
|
||||
private final static int VideoTaskPause = 5;
|
||||
private final static int VideoTaskResume = 6;
|
||||
private final static int VideoTaskStop = 7;
|
||||
private final static int VideoTaskSeek = 8;
|
||||
private final static int VideoTaskSetVisible = 9;
|
||||
private final static int VideoTaskRestart = 10;
|
||||
private final static int VideoTaskKeepRatio = 11;
|
||||
|
||||
static class VideoHandler extends Handler{
|
||||
WeakReference<Cocos2dxVideoHelper> mReference;
|
||||
|
||||
VideoHandler(Cocos2dxVideoHelper helper){
|
||||
mReference = new WeakReference<Cocos2dxVideoHelper>(helper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleMessage(Message msg) {
|
||||
switch (msg.what) {
|
||||
case VideoTaskCreate: {
|
||||
Cocos2dxVideoHelper helper = mReference.get();
|
||||
helper._createVideoView(msg.arg1);
|
||||
break;
|
||||
}
|
||||
case VideoTaskRemove: {
|
||||
Cocos2dxVideoHelper helper = mReference.get();
|
||||
helper._removeVideoView(msg.arg1);
|
||||
break;
|
||||
}
|
||||
case VideoTaskSetSource: {
|
||||
Cocos2dxVideoHelper helper = mReference.get();
|
||||
helper._setVideoURL(msg.arg1, msg.arg2, (String)msg.obj);
|
||||
break;
|
||||
}
|
||||
case VideoTaskStart: {
|
||||
Cocos2dxVideoHelper helper = mReference.get();
|
||||
helper._startVideo(msg.arg1);
|
||||
break;
|
||||
}
|
||||
case VideoTaskSetRect: {
|
||||
Cocos2dxVideoHelper helper = mReference.get();
|
||||
Rect rect = (Rect)msg.obj;
|
||||
helper._setVideoRect(msg.arg1, rect.left, rect.top, rect.right, rect.bottom);
|
||||
break;
|
||||
}
|
||||
case VideoTaskPause: {
|
||||
Cocos2dxVideoHelper helper = mReference.get();
|
||||
helper._pauseVideo(msg.arg1);
|
||||
break;
|
||||
}
|
||||
case VideoTaskResume: {
|
||||
Cocos2dxVideoHelper helper = mReference.get();
|
||||
helper._resumeVideo(msg.arg1);
|
||||
break;
|
||||
}
|
||||
case VideoTaskStop: {
|
||||
Cocos2dxVideoHelper helper = mReference.get();
|
||||
helper._stopVideo(msg.arg1);
|
||||
break;
|
||||
}
|
||||
case VideoTaskSeek: {
|
||||
Cocos2dxVideoHelper helper = mReference.get();
|
||||
helper._seekVideoTo(msg.arg1, msg.arg2);
|
||||
break;
|
||||
}
|
||||
case VideoTaskSetVisible: {
|
||||
Cocos2dxVideoHelper helper = mReference.get();
|
||||
if (msg.arg2 == 1) {
|
||||
helper._setVideoVisible(msg.arg1, true);
|
||||
} else {
|
||||
helper._setVideoVisible(msg.arg1, false);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case VideoTaskRestart: {
|
||||
Cocos2dxVideoHelper helper = mReference.get();
|
||||
helper._restartVideo(msg.arg1);
|
||||
break;
|
||||
}
|
||||
case VideoTaskKeepRatio: {
|
||||
Cocos2dxVideoHelper helper = mReference.get();
|
||||
if (msg.arg2 == 1) {
|
||||
helper._setVideoKeepRatio(msg.arg1, true);
|
||||
} else {
|
||||
helper._setVideoKeepRatio(msg.arg1, false);
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
super.handleMessage(msg);
|
||||
}
|
||||
}
|
||||
|
||||
private class VideoEventRunnable implements Runnable
|
||||
{
|
||||
private int mVideoTag;
|
||||
private int mVideoEvent;
|
||||
|
||||
public VideoEventRunnable(int tag,int event) {
|
||||
mVideoTag = tag;
|
||||
mVideoEvent = event;
|
||||
}
|
||||
@Override
|
||||
public void run() {
|
||||
nativeExecuteVideoCallback(mVideoTag, mVideoEvent);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static native void nativeExecuteVideoCallback(int index,int event);
|
||||
|
||||
OnVideoEventListener videoEventListener = new OnVideoEventListener() {
|
||||
|
||||
@Override
|
||||
public void onVideoEvent(int tag,int event) {
|
||||
mActivity.runOnGLThread(new VideoEventRunnable(tag, event));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
public static int createVideoWidget() {
|
||||
Message msg = new Message();
|
||||
msg.what = VideoTaskCreate;
|
||||
msg.arg1 = videoTag;
|
||||
mVideoHandler.sendMessage(msg);
|
||||
|
||||
return videoTag++;
|
||||
}
|
||||
|
||||
private void _createVideoView(int index) {
|
||||
Cocos2dxVideoView videoView = new Cocos2dxVideoView(mActivity,index);
|
||||
sVideoViews.put(index, videoView);
|
||||
FrameLayout.LayoutParams lParams = new FrameLayout.LayoutParams(
|
||||
FrameLayout.LayoutParams.WRAP_CONTENT,
|
||||
FrameLayout.LayoutParams.WRAP_CONTENT);
|
||||
mLayout.addView(videoView, lParams);
|
||||
videoView.setZOrderOnTop(true);
|
||||
videoView.setOnCompletionListener(videoEventListener);
|
||||
}
|
||||
|
||||
public static void removeVideoWidget(int index){
|
||||
Message msg = new Message();
|
||||
msg.what = VideoTaskRemove;
|
||||
msg.arg1 = index;
|
||||
mVideoHandler.sendMessage(msg);
|
||||
}
|
||||
|
||||
private void _removeVideoView(int index) {
|
||||
Cocos2dxVideoView view = sVideoViews.get(index);
|
||||
if (view != null) {
|
||||
view.stopPlayback();
|
||||
sVideoViews.remove(index);
|
||||
mLayout.removeView(view);
|
||||
}
|
||||
}
|
||||
|
||||
public static void setVideoUrl(int index,int videoSource,String videoUrl) {
|
||||
Message msg = new Message();
|
||||
msg.what = VideoTaskSetSource;
|
||||
msg.arg1 = index;
|
||||
msg.arg2 = videoSource;
|
||||
msg.obj = videoUrl;
|
||||
mVideoHandler.sendMessage(msg);
|
||||
}
|
||||
|
||||
private void _setVideoURL(int index,int videoSource,String videoUrl) {
|
||||
Cocos2dxVideoView videoView = sVideoViews.get(index);
|
||||
if (videoView != null) {
|
||||
switch (videoSource) {
|
||||
case 0:
|
||||
videoView.setVideoFileName(videoUrl);
|
||||
break;
|
||||
case 1:
|
||||
videoView.setVideoURL(videoUrl);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void setVideoRect(int index,int left,int top,int maxWidth,int maxHeight) {
|
||||
Message msg = new Message();
|
||||
msg.what = VideoTaskSetRect;
|
||||
msg.arg1 = index;
|
||||
msg.obj = new Rect(left, top, maxWidth, maxHeight);
|
||||
mVideoHandler.sendMessage(msg);
|
||||
}
|
||||
|
||||
private void _setVideoRect(int index,int left,int top,int maxWidth,int maxHeight) {
|
||||
Cocos2dxVideoView videoView = sVideoViews.get(index);
|
||||
if (videoView != null) {
|
||||
videoView.setVideoRect(left,top,maxWidth,maxHeight);
|
||||
}
|
||||
}
|
||||
|
||||
public static void startVideo(int index) {
|
||||
Message msg = new Message();
|
||||
msg.what = VideoTaskStart;
|
||||
msg.arg1 = index;
|
||||
mVideoHandler.sendMessage(msg);
|
||||
}
|
||||
|
||||
private void _startVideo(int index) {
|
||||
Cocos2dxVideoView videoView = sVideoViews.get(index);
|
||||
if (videoView != null) {
|
||||
videoView.start();
|
||||
}
|
||||
}
|
||||
|
||||
public static void pauseVideo(int index) {
|
||||
Message msg = new Message();
|
||||
msg.what = VideoTaskPause;
|
||||
msg.arg1 = index;
|
||||
mVideoHandler.sendMessage(msg);
|
||||
}
|
||||
|
||||
private void _pauseVideo(int index) {
|
||||
Cocos2dxVideoView videoView = sVideoViews.get(index);
|
||||
if (videoView != null) {
|
||||
videoView.pause();
|
||||
}
|
||||
}
|
||||
|
||||
public static void resumeVideo(int index) {
|
||||
Message msg = new Message();
|
||||
msg.what = VideoTaskResume;
|
||||
msg.arg1 = index;
|
||||
mVideoHandler.sendMessage(msg);
|
||||
}
|
||||
|
||||
private void _resumeVideo(int index) {
|
||||
Cocos2dxVideoView videoView = sVideoViews.get(index);
|
||||
if (videoView != null) {
|
||||
videoView.resume();
|
||||
}
|
||||
}
|
||||
|
||||
public static void stopVideo(int index) {
|
||||
Message msg = new Message();
|
||||
msg.what = VideoTaskStop;
|
||||
msg.arg1 = index;
|
||||
mVideoHandler.sendMessage(msg);
|
||||
}
|
||||
|
||||
private void _stopVideo(int index) {
|
||||
Cocos2dxVideoView videoView = sVideoViews.get(index);
|
||||
if (videoView != null) {
|
||||
videoView.stop();
|
||||
}
|
||||
}
|
||||
|
||||
public static void restartVideo(int index) {
|
||||
Message msg = new Message();
|
||||
msg.what = VideoTaskRestart;
|
||||
msg.arg1 = index;
|
||||
mVideoHandler.sendMessage(msg);
|
||||
}
|
||||
|
||||
private void _restartVideo(int index) {
|
||||
Cocos2dxVideoView videoView = sVideoViews.get(index);
|
||||
if (videoView != null) {
|
||||
videoView.restart();
|
||||
}
|
||||
}
|
||||
|
||||
public static void seekVideoTo(int index,int msec) {
|
||||
Message msg = new Message();
|
||||
msg.what = VideoTaskSeek;
|
||||
msg.arg1 = index;
|
||||
msg.arg2 = msec;
|
||||
mVideoHandler.sendMessage(msg);
|
||||
}
|
||||
|
||||
private void _seekVideoTo(int index,int msec) {
|
||||
Cocos2dxVideoView videoView = sVideoViews.get(index);
|
||||
if (videoView != null) {
|
||||
videoView.seekTo(msec);
|
||||
}
|
||||
}
|
||||
|
||||
public static void setVideoVisible(int index, boolean visible) {
|
||||
Message msg = new Message();
|
||||
msg.what = VideoTaskSetVisible;
|
||||
msg.arg1 = index;
|
||||
if (visible) {
|
||||
msg.arg2 = 1;
|
||||
} else {
|
||||
msg.arg2 = 0;
|
||||
}
|
||||
|
||||
mVideoHandler.sendMessage(msg);
|
||||
}
|
||||
|
||||
private void _setVideoVisible(int index, boolean visible) {
|
||||
Cocos2dxVideoView videoView = sVideoViews.get(index);
|
||||
if (videoView != null) {
|
||||
if (visible) {
|
||||
videoView.fixSize();
|
||||
videoView.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
videoView.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void setVideoKeepRatioEnabled(int index, boolean enable) {
|
||||
Message msg = new Message();
|
||||
msg.what = VideoTaskKeepRatio;
|
||||
msg.arg1 = index;
|
||||
if (enable) {
|
||||
msg.arg2 = 1;
|
||||
} else {
|
||||
msg.arg2 = 0;
|
||||
}
|
||||
mVideoHandler.sendMessage(msg);
|
||||
}
|
||||
|
||||
private void _setVideoKeepRatio(int index, boolean enable) {
|
||||
Cocos2dxVideoView videoView = sVideoViews.get(index);
|
||||
if (videoView != null) {
|
||||
videoView.setKeepRatio(enable);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,686 @@
|
|||
/*
|
||||
* Copyright (C) 2006 The Android Open Source Project
|
||||
* Copyright (c) 2014 Chukong Technologies Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.cocos2dx.lib;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.res.AssetFileDescriptor;
|
||||
import android.content.res.Resources;
|
||||
import android.media.AudioManager;
|
||||
import android.media.MediaPlayer;
|
||||
import android.media.MediaPlayer.OnErrorListener;
|
||||
import android.net.Uri;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.SurfaceHolder;
|
||||
import android.view.SurfaceView;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.MediaController.MediaPlayerControl;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Map;
|
||||
|
||||
public class Cocos2dxVideoView extends SurfaceView implements MediaPlayerControl {
|
||||
private String TAG = "VideoView";
|
||||
|
||||
private Uri mUri;
|
||||
private int mDuration;
|
||||
|
||||
// all possible internal states
|
||||
private static final int STATE_ERROR = -1;
|
||||
private static final int STATE_IDLE = 0;
|
||||
private static final int STATE_PREPARING = 1;
|
||||
private static final int STATE_PREPARED = 2;
|
||||
private static final int STATE_PLAYING = 3;
|
||||
private static final int STATE_PAUSED = 4;
|
||||
private static final int STATE_PLAYBACK_COMPLETED = 5;
|
||||
|
||||
// mCurrentState is a VideoView object's current state.
|
||||
// mTargetState is the state that a method caller intends to reach.
|
||||
// For instance, regardless the VideoView object's current state,
|
||||
// calling pause() intends to bring the object to a target state
|
||||
// of STATE_PAUSED.
|
||||
private int mCurrentState = STATE_IDLE;
|
||||
private int mTargetState = STATE_IDLE;
|
||||
|
||||
// All the stuff we need for playing and showing a video
|
||||
private SurfaceHolder mSurfaceHolder = null;
|
||||
private MediaPlayer mMediaPlayer = null;
|
||||
private int mVideoWidth = 0;
|
||||
private int mVideoHeight = 0;
|
||||
|
||||
private OnVideoEventListener mOnVideoEventListener;
|
||||
private MediaPlayer.OnPreparedListener mOnPreparedListener;
|
||||
private int mCurrentBufferPercentage;
|
||||
private OnErrorListener mOnErrorListener;
|
||||
|
||||
// recording the seek position while preparing
|
||||
private int mSeekWhenPrepared;
|
||||
|
||||
protected Context mContext = null;
|
||||
|
||||
protected int mViewLeft = 0;
|
||||
protected int mViewTop = 0;
|
||||
protected int mViewWidth = 0;
|
||||
protected int mViewHeight = 0;
|
||||
|
||||
protected int mVisibleLeft = 0;
|
||||
protected int mVisibleTop = 0;
|
||||
protected int mVisibleWidth = 0;
|
||||
protected int mVisibleHeight = 0;
|
||||
|
||||
private int mViewTag = 0;
|
||||
|
||||
public Cocos2dxVideoView(Context context,int tag) {
|
||||
super(context);
|
||||
|
||||
mViewTag = tag;
|
||||
mContext = context;
|
||||
initVideoView();
|
||||
}
|
||||
|
||||
public Cocos2dxVideoView(Context context, AttributeSet attrs) {
|
||||
this(context, attrs, 0);
|
||||
|
||||
mContext = context;
|
||||
initVideoView();
|
||||
}
|
||||
|
||||
public Cocos2dxVideoView(Context context, AttributeSet attrs, int defStyle) {
|
||||
super(context, attrs, defStyle);
|
||||
|
||||
mContext = context;
|
||||
initVideoView();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
if (mVideoWidth == 0 || mVideoHeight == 0) {
|
||||
setMeasuredDimension(mViewWidth, mViewHeight);
|
||||
Log.e(TAG, ""+mViewWidth+ ":" +mViewHeight);
|
||||
}
|
||||
else {
|
||||
setMeasuredDimension(mVisibleWidth, mVisibleHeight);
|
||||
Log.e(TAG, ""+mVisibleWidth+ ":" +mVisibleHeight);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void setVideoRect(int left,int top,int maxWidth,int maxHeight) {
|
||||
mViewLeft = left;
|
||||
mViewTop = top;
|
||||
mViewWidth = maxWidth;
|
||||
mViewHeight = maxHeight;
|
||||
|
||||
if (mVideoWidth != 0 && mVideoHeight != 0) {
|
||||
fixSize();
|
||||
}
|
||||
}
|
||||
|
||||
public int resolveAdjustedSize(int desiredSize, int measureSpec) {
|
||||
int result = desiredSize;
|
||||
int specMode = MeasureSpec.getMode(measureSpec);
|
||||
int specSize = MeasureSpec.getSize(measureSpec);
|
||||
|
||||
switch (specMode) {
|
||||
case MeasureSpec.UNSPECIFIED:
|
||||
/* Parent says we can be as big as we want. Just don't be larger
|
||||
* than max size imposed on ourselves.
|
||||
*/
|
||||
result = desiredSize;
|
||||
break;
|
||||
|
||||
case MeasureSpec.AT_MOST:
|
||||
/* Parent says we can be as big as we want, up to specSize.
|
||||
* Don't be larger than specSize, and don't be larger than
|
||||
* the max size imposed on ourselves.
|
||||
*/
|
||||
result = Math.min(desiredSize, specSize);
|
||||
break;
|
||||
|
||||
case MeasureSpec.EXACTLY:
|
||||
// No choice. Do what we are told.
|
||||
result = specSize;
|
||||
break;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private boolean mNeedResume = false;
|
||||
|
||||
@Override
|
||||
public void setVisibility(int visibility) {
|
||||
if (visibility == INVISIBLE) {
|
||||
mNeedResume = isPlaying();
|
||||
if (mNeedResume) {
|
||||
mSeekWhenPrepared = getCurrentPosition();
|
||||
}
|
||||
}
|
||||
else if (mNeedResume){
|
||||
start();
|
||||
mNeedResume = false;
|
||||
}
|
||||
super.setVisibility(visibility);
|
||||
}
|
||||
|
||||
private void initVideoView() {
|
||||
mVideoWidth = 0;
|
||||
mVideoHeight = 0;
|
||||
getHolder().addCallback(mSHCallback);
|
||||
setFocusable(true);
|
||||
setFocusableInTouchMode(true);
|
||||
mCurrentState = STATE_IDLE;
|
||||
mTargetState = STATE_IDLE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTouchEvent(MotionEvent event) {
|
||||
if((event.getAction() & MotionEvent.ACTION_MASK) == MotionEvent.ACTION_UP)
|
||||
{
|
||||
if (isPlaying()) {
|
||||
pause();
|
||||
} else if(mCurrentState == STATE_PAUSED){
|
||||
resume();
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean isAssetRouse = false;
|
||||
private String fileName = null;
|
||||
|
||||
public void setVideoFileName(String path) {
|
||||
if (path.startsWith("/")) {
|
||||
isAssetRouse = false;
|
||||
setVideoURI(Uri.parse(path),null);
|
||||
}
|
||||
else {
|
||||
fileName = path;
|
||||
isAssetRouse = true;
|
||||
setVideoURI(Uri.parse(path),null);
|
||||
}
|
||||
}
|
||||
|
||||
public void setVideoURL(String url) {
|
||||
isAssetRouse = false;
|
||||
setVideoURI(Uri.parse(url), null);
|
||||
}
|
||||
|
||||
/**
|
||||
* @hide
|
||||
*/
|
||||
private void setVideoURI(Uri uri, Map<String, String> headers) {
|
||||
mUri = uri;
|
||||
mSeekWhenPrepared = 0;
|
||||
mVideoWidth = 0;
|
||||
mVideoHeight = 0;
|
||||
openVideo();
|
||||
requestLayout();
|
||||
invalidate();
|
||||
}
|
||||
|
||||
public void stopPlayback() {
|
||||
if (mMediaPlayer != null) {
|
||||
mMediaPlayer.stop();
|
||||
mMediaPlayer.release();
|
||||
mMediaPlayer = null;
|
||||
mCurrentState = STATE_IDLE;
|
||||
mTargetState = STATE_IDLE;
|
||||
}
|
||||
}
|
||||
|
||||
private void openVideo() {
|
||||
if (mSurfaceHolder == null) {
|
||||
// not ready for playback just yet, will try again later
|
||||
return;
|
||||
}
|
||||
if (isAssetRouse) {
|
||||
if(fileName == null)
|
||||
return;
|
||||
} else {
|
||||
if(mUri == null)
|
||||
return;
|
||||
}
|
||||
|
||||
// Tell the music playback service to pause
|
||||
// TODO: these constants need to be published somewhere in the framework.
|
||||
Intent i = new Intent("com.android.music.musicservicecommand");
|
||||
i.putExtra("command", "pause");
|
||||
mContext.sendBroadcast(i);
|
||||
|
||||
// we shouldn't clear the target state, because somebody might have
|
||||
// called start() previously
|
||||
release(false);
|
||||
|
||||
try {
|
||||
//if (mMediaPlayer == null) {
|
||||
mMediaPlayer = new MediaPlayer();
|
||||
mMediaPlayer.setOnPreparedListener(mPreparedListener);
|
||||
mMediaPlayer.setOnVideoSizeChangedListener(mSizeChangedListener);
|
||||
mMediaPlayer.setOnCompletionListener(mCompletionListener);
|
||||
mMediaPlayer.setOnErrorListener(mErrorListener);
|
||||
mMediaPlayer.setOnBufferingUpdateListener(mBufferingUpdateListener);
|
||||
|
||||
mMediaPlayer.setDisplay(mSurfaceHolder);
|
||||
mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
|
||||
mMediaPlayer.setScreenOnWhilePlaying(true);
|
||||
//}
|
||||
|
||||
mDuration = -1;
|
||||
mCurrentBufferPercentage = 0;
|
||||
if (isAssetRouse) {
|
||||
AssetFileDescriptor afd = mContext.getAssets().openFd(fileName);
|
||||
mMediaPlayer.setDataSource(afd.getFileDescriptor(),afd.getStartOffset(),afd.getLength());
|
||||
} else {
|
||||
mMediaPlayer.setDataSource(mContext, mUri);
|
||||
}
|
||||
|
||||
mMediaPlayer.prepareAsync();
|
||||
// we don't set the target state here either, but preserve the
|
||||
// target state that was there before.
|
||||
mCurrentState = STATE_PREPARING;
|
||||
} catch (IOException ex) {
|
||||
Log.w(TAG, "Unable to open content: " + mUri, ex);
|
||||
mCurrentState = STATE_ERROR;
|
||||
mTargetState = STATE_ERROR;
|
||||
mErrorListener.onError(mMediaPlayer, MediaPlayer.MEDIA_ERROR_UNKNOWN, 0);
|
||||
return;
|
||||
} catch (IllegalArgumentException ex) {
|
||||
Log.w(TAG, "Unable to open content: " + mUri, ex);
|
||||
mCurrentState = STATE_ERROR;
|
||||
mTargetState = STATE_ERROR;
|
||||
mErrorListener.onError(mMediaPlayer, MediaPlayer.MEDIA_ERROR_UNKNOWN, 0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
private boolean mKeepRatio = false;
|
||||
|
||||
public void setKeepRatio(boolean enabled) {
|
||||
mKeepRatio = enabled;
|
||||
fixSize();
|
||||
}
|
||||
|
||||
public void fixSize() {
|
||||
if (mViewWidth != 0 && mViewHeight != 0) {
|
||||
if (mKeepRatio) {
|
||||
if ( mVideoWidth * mViewHeight > mViewWidth * mVideoHeight ) {
|
||||
mVisibleWidth = mViewWidth;
|
||||
mVisibleHeight = mViewWidth * mVideoHeight / mVideoWidth;
|
||||
} else if ( mVideoWidth * mViewHeight < mViewWidth * mVideoHeight ) {
|
||||
mVisibleWidth = mViewHeight * mVideoWidth / mVideoHeight;
|
||||
mVisibleHeight = mViewHeight;
|
||||
}
|
||||
mVisibleLeft = mViewLeft + (mViewWidth - mVisibleWidth) / 2;
|
||||
mVisibleTop = mViewTop + (mViewHeight - mVisibleHeight) / 2;
|
||||
} else {
|
||||
mVisibleLeft = mViewLeft;
|
||||
mVisibleTop = mViewTop;
|
||||
mVisibleWidth = mViewWidth;
|
||||
mVisibleHeight = mViewHeight;
|
||||
}
|
||||
}
|
||||
else {
|
||||
mVisibleLeft = mViewLeft;
|
||||
mVisibleTop = mViewTop;
|
||||
mVisibleWidth = mVideoWidth;
|
||||
mVisibleHeight = mVideoHeight;
|
||||
}
|
||||
|
||||
getHolder().setFixedSize(mVisibleWidth, mVisibleHeight);
|
||||
|
||||
FrameLayout.LayoutParams lParams = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.WRAP_CONTENT,
|
||||
FrameLayout.LayoutParams.WRAP_CONTENT);
|
||||
lParams.leftMargin = mVisibleLeft;
|
||||
lParams.topMargin = mVisibleTop;
|
||||
setLayoutParams(lParams);
|
||||
}
|
||||
|
||||
protected
|
||||
MediaPlayer.OnVideoSizeChangedListener mSizeChangedListener =
|
||||
new MediaPlayer.OnVideoSizeChangedListener() {
|
||||
public void onVideoSizeChanged(MediaPlayer mp, int width, int height) {
|
||||
mVideoWidth = mp.getVideoWidth();
|
||||
mVideoHeight = mp.getVideoHeight();
|
||||
if (mVideoWidth != 0 && mVideoHeight != 0) {
|
||||
getHolder().setFixedSize(mVideoWidth, mVideoHeight);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
MediaPlayer.OnPreparedListener mPreparedListener = new MediaPlayer.OnPreparedListener() {
|
||||
public void onPrepared(MediaPlayer mp) {
|
||||
mCurrentState = STATE_PREPARED;
|
||||
|
||||
if (mOnPreparedListener != null) {
|
||||
mOnPreparedListener.onPrepared(mMediaPlayer);
|
||||
}
|
||||
|
||||
mVideoWidth = mp.getVideoWidth();
|
||||
mVideoHeight = mp.getVideoHeight();
|
||||
|
||||
int seekToPosition = mSeekWhenPrepared; // mSeekWhenPrepared may be changed after seekTo() call
|
||||
if (seekToPosition != 0) {
|
||||
seekTo(seekToPosition);
|
||||
}
|
||||
if (mVideoWidth != 0 && mVideoHeight != 0) {
|
||||
fixSize();
|
||||
}
|
||||
|
||||
if (mTargetState == STATE_PLAYING) {
|
||||
start();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
private MediaPlayer.OnCompletionListener mCompletionListener =
|
||||
new MediaPlayer.OnCompletionListener() {
|
||||
public void onCompletion(MediaPlayer mp) {
|
||||
mCurrentState = STATE_PLAYBACK_COMPLETED;
|
||||
mTargetState = STATE_PLAYBACK_COMPLETED;
|
||||
|
||||
mp.release();
|
||||
if (mOnVideoEventListener != null) {
|
||||
mOnVideoEventListener.onVideoEvent(mViewTag,EVENT_COMPLETED);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
private static final int EVENT_PLAYING = 0;
|
||||
private static final int EVENT_PAUSED = 1;
|
||||
private static final int EVENT_STOPPED = 2;
|
||||
private static final int EVENT_COMPLETED = 3;
|
||||
|
||||
public interface OnVideoEventListener
|
||||
{
|
||||
void onVideoEvent(int tag,int event);
|
||||
}
|
||||
|
||||
private MediaPlayer.OnErrorListener mErrorListener =
|
||||
new MediaPlayer.OnErrorListener() {
|
||||
public boolean onError(MediaPlayer mp, int framework_err, int impl_err) {
|
||||
Log.d(TAG, "Error: " + framework_err + "," + impl_err);
|
||||
mCurrentState = STATE_ERROR;
|
||||
mTargetState = STATE_ERROR;
|
||||
|
||||
/* If an error handler has been supplied, use it and finish. */
|
||||
if (mOnErrorListener != null) {
|
||||
if (mOnErrorListener.onError(mMediaPlayer, framework_err, impl_err)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/* Otherwise, pop up an error dialog so the user knows that
|
||||
* something bad has happened. Only try and pop up the dialog
|
||||
* if we're attached to a window. When we're going away and no
|
||||
* longer have a window, don't bother showing the user an error.
|
||||
*/
|
||||
if (getWindowToken() != null) {
|
||||
Resources r = mContext.getResources();
|
||||
int messageId;
|
||||
|
||||
if (framework_err == MediaPlayer.MEDIA_ERROR_NOT_VALID_FOR_PROGRESSIVE_PLAYBACK) {
|
||||
//messageId = com.android.internal.R.string.VideoView_error_text_invalid_progressive_playback;
|
||||
messageId = r.getIdentifier("VideoView_error_text_invalid_progressive_playback", "string", "android");
|
||||
} else {
|
||||
//messageId = com.android.internal.R.string.VideoView_error_text_unknown;
|
||||
messageId = r.getIdentifier("VideoView_error_text_unknown", "string", "android");
|
||||
}
|
||||
|
||||
int titleId = r.getIdentifier("VideoView_error_title", "string", "android");
|
||||
int buttonStringId = r.getIdentifier("VideoView_error_button", "string", "android");
|
||||
|
||||
new AlertDialog.Builder(mContext)
|
||||
.setTitle(r.getString(titleId))
|
||||
.setMessage(messageId)
|
||||
.setPositiveButton(r.getString(buttonStringId),
|
||||
new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int whichButton) {
|
||||
/* If we get here, there is no onError listener, so
|
||||
* at least inform them that the video is over.
|
||||
*/
|
||||
if (mOnVideoEventListener != null) {
|
||||
mOnVideoEventListener.onVideoEvent(mViewTag,EVENT_COMPLETED);
|
||||
}
|
||||
}
|
||||
})
|
||||
.setCancelable(false)
|
||||
.show();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
private MediaPlayer.OnBufferingUpdateListener mBufferingUpdateListener =
|
||||
new MediaPlayer.OnBufferingUpdateListener() {
|
||||
public void onBufferingUpdate(MediaPlayer mp, int percent) {
|
||||
mCurrentBufferPercentage = percent;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Register a callback to be invoked when the media file
|
||||
* is loaded and ready to go.
|
||||
*
|
||||
* @param l The callback that will be run
|
||||
*/
|
||||
public void setOnPreparedListener(MediaPlayer.OnPreparedListener l)
|
||||
{
|
||||
mOnPreparedListener = l;
|
||||
}
|
||||
|
||||
/**
|
||||
* Register a callback to be invoked when the end of a media file
|
||||
* has been reached during playback.
|
||||
*
|
||||
* @param l The callback that will be run
|
||||
*/
|
||||
public void setOnCompletionListener(OnVideoEventListener l)
|
||||
{
|
||||
mOnVideoEventListener = l;
|
||||
}
|
||||
|
||||
/**
|
||||
* Register a callback to be invoked when an error occurs
|
||||
* during playback or setup. If no listener is specified,
|
||||
* or if the listener returned false, VideoView will inform
|
||||
* the user of any errors.
|
||||
*
|
||||
* @param l The callback that will be run
|
||||
*/
|
||||
public void setOnErrorListener(OnErrorListener l)
|
||||
{
|
||||
mOnErrorListener = l;
|
||||
}
|
||||
|
||||
SurfaceHolder.Callback mSHCallback = new SurfaceHolder.Callback()
|
||||
{
|
||||
public void surfaceChanged(SurfaceHolder holder, int format,
|
||||
int w, int h)
|
||||
{
|
||||
boolean isValidState = (mTargetState == STATE_PLAYING);
|
||||
boolean hasValidSize = (mVideoWidth == w && mVideoHeight == h);
|
||||
if (mMediaPlayer != null && isValidState && hasValidSize) {
|
||||
if (mSeekWhenPrepared != 0) {
|
||||
seekTo(mSeekWhenPrepared);
|
||||
}
|
||||
start();
|
||||
}
|
||||
}
|
||||
|
||||
public void surfaceCreated(SurfaceHolder holder)
|
||||
{
|
||||
mSurfaceHolder = holder;
|
||||
openVideo();
|
||||
}
|
||||
|
||||
public void surfaceDestroyed(SurfaceHolder holder)
|
||||
{
|
||||
// after we return from this we can't use the surface any more
|
||||
mSurfaceHolder = null;
|
||||
|
||||
release(true);
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
* release the media player in any state
|
||||
*/
|
||||
private void release(boolean cleartargetstate) {
|
||||
if (mMediaPlayer != null) {
|
||||
mMediaPlayer.reset();
|
||||
mMediaPlayer.release();
|
||||
mMediaPlayer = null;
|
||||
mCurrentState = STATE_IDLE;
|
||||
if (cleartargetstate) {
|
||||
mTargetState = STATE_IDLE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void start() {
|
||||
if (isInPlaybackState()) {
|
||||
mMediaPlayer.start();
|
||||
mCurrentState = STATE_PLAYING;
|
||||
if (mOnVideoEventListener != null) {
|
||||
mOnVideoEventListener.onVideoEvent(mViewTag, EVENT_PLAYING);
|
||||
}
|
||||
}
|
||||
mTargetState = STATE_PLAYING;
|
||||
}
|
||||
|
||||
public void pause() {
|
||||
if (isInPlaybackState()) {
|
||||
if (mMediaPlayer.isPlaying()) {
|
||||
mMediaPlayer.pause();
|
||||
mCurrentState = STATE_PAUSED;
|
||||
if (mOnVideoEventListener != null) {
|
||||
mOnVideoEventListener.onVideoEvent(mViewTag, EVENT_PAUSED);
|
||||
}
|
||||
}
|
||||
}
|
||||
mTargetState = STATE_PAUSED;
|
||||
}
|
||||
|
||||
public void stop() {
|
||||
if (isInPlaybackState()) {
|
||||
if (mMediaPlayer.isPlaying()) {
|
||||
stopPlayback();
|
||||
if (mOnVideoEventListener != null) {
|
||||
mOnVideoEventListener.onVideoEvent(mViewTag, EVENT_STOPPED);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void suspend() {
|
||||
release(false);
|
||||
}
|
||||
|
||||
public void resume() {
|
||||
if (isInPlaybackState()) {
|
||||
if (mCurrentState == STATE_PAUSED) {
|
||||
mMediaPlayer.start();
|
||||
mCurrentState = STATE_PLAYING;
|
||||
if (mOnVideoEventListener != null) {
|
||||
mOnVideoEventListener.onVideoEvent(mViewTag, EVENT_PLAYING);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void restart() {
|
||||
if (isInPlaybackState()) {
|
||||
mMediaPlayer.seekTo(0);
|
||||
mMediaPlayer.start();
|
||||
mCurrentState = STATE_PLAYING;
|
||||
mTargetState = STATE_PLAYING;
|
||||
}
|
||||
}
|
||||
// cache duration as mDuration for faster access
|
||||
public int getDuration() {
|
||||
if (isInPlaybackState()) {
|
||||
if (mDuration > 0) {
|
||||
return mDuration;
|
||||
}
|
||||
mDuration = mMediaPlayer.getDuration();
|
||||
return mDuration;
|
||||
}
|
||||
mDuration = -1;
|
||||
return mDuration;
|
||||
}
|
||||
|
||||
public int getCurrentPosition() {
|
||||
if (isInPlaybackState()) {
|
||||
return mMediaPlayer.getCurrentPosition();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
public void seekTo(int msec) {
|
||||
if (isInPlaybackState()) {
|
||||
mMediaPlayer.seekTo(msec);
|
||||
mSeekWhenPrepared = 0;
|
||||
} else {
|
||||
mSeekWhenPrepared = msec;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isPlaying() {
|
||||
return isInPlaybackState() && mMediaPlayer.isPlaying();
|
||||
}
|
||||
|
||||
public int getBufferPercentage() {
|
||||
if (mMediaPlayer != null) {
|
||||
return mCurrentBufferPercentage;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
public boolean isInPlaybackState() {
|
||||
return (mMediaPlayer != null &&
|
||||
mCurrentState != STATE_ERROR &&
|
||||
mCurrentState != STATE_IDLE &&
|
||||
mCurrentState != STATE_PREPARING);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPause() {
|
||||
// TODO Auto-generated method stub
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canSeekBackward() {
|
||||
// TODO Auto-generated method stub
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canSeekForward() {
|
||||
// TODO Auto-generated method stub
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
|
@ -65,28 +65,41 @@ extern "C" {
|
|||
cocos2d::Director::getInstance()->getOpenGLView()->handleTouchesCancel(size, id, x, y);
|
||||
}
|
||||
|
||||
#define KEYCODE_BACK 0x04
|
||||
#define KEYCODE_MENU 0x52
|
||||
#define KEYCODE_BACK 0x04
|
||||
#define KEYCODE_MENU 0x52
|
||||
#define KEYCODE_DPAD_UP 0x13
|
||||
#define KEYCODE_DPAD_DOWN 0x14
|
||||
#define KEYCODE_DPAD_LEFT 0x15
|
||||
#define KEYCODE_DPAD_RIGHT 0x16
|
||||
#define KEYCODE_ENTER 0x42
|
||||
#define KEYCODE_PLAY 0x7e
|
||||
#define KEYCODE_DPAD_CENTER 0x17
|
||||
|
||||
|
||||
static std::unordered_map<int, cocos2d::EventKeyboard::KeyCode> g_keyCodeMap = {
|
||||
{ KEYCODE_BACK , cocos2d::EventKeyboard::KeyCode::KEY_ESCAPE},
|
||||
{ KEYCODE_MENU , cocos2d::EventKeyboard::KeyCode::KEY_MENU},
|
||||
{ KEYCODE_DPAD_UP , cocos2d::EventKeyboard::KeyCode::KEY_DPAD_UP },
|
||||
{ KEYCODE_DPAD_DOWN , cocos2d::EventKeyboard::KeyCode::KEY_DPAD_DOWN },
|
||||
{ KEYCODE_DPAD_LEFT , cocos2d::EventKeyboard::KeyCode::KEY_DPAD_LEFT },
|
||||
{ KEYCODE_DPAD_RIGHT , cocos2d::EventKeyboard::KeyCode::KEY_DPAD_RIGHT },
|
||||
{ KEYCODE_ENTER , cocos2d::EventKeyboard::KeyCode::KEY_ENTER},
|
||||
{ KEYCODE_PLAY , cocos2d::EventKeyboard::KeyCode::KEY_PLAY},
|
||||
{ KEYCODE_DPAD_CENTER , cocos2d::EventKeyboard::KeyCode::KEY_DPAD_CENTER},
|
||||
|
||||
};
|
||||
|
||||
JNIEXPORT jboolean JNICALL Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeKeyDown(JNIEnv * env, jobject thiz, jint keyCode) {
|
||||
Director* pDirector = Director::getInstance();
|
||||
switch (keyCode) {
|
||||
case KEYCODE_BACK:
|
||||
{
|
||||
cocos2d::EventKeyboard event(cocos2d::EventKeyboard::KeyCode::KEY_BACKSPACE, false);
|
||||
cocos2d::Director::getInstance()->getEventDispatcher()->dispatchEvent(&event);
|
||||
return JNI_TRUE;
|
||||
}
|
||||
case KEYCODE_MENU:
|
||||
{
|
||||
cocos2d::EventKeyboard event(cocos2d::EventKeyboard::KeyCode::KEY_MENU, false);
|
||||
cocos2d::Director::getInstance()->getEventDispatcher()->dispatchEvent(&event);
|
||||
|
||||
return JNI_TRUE;
|
||||
}
|
||||
default:
|
||||
return JNI_FALSE;
|
||||
auto iterKeyCode = g_keyCodeMap.find(keyCode);
|
||||
if (iterKeyCode == g_keyCodeMap.end()) {
|
||||
return JNI_FALSE;
|
||||
}
|
||||
return JNI_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
cocos2d::EventKeyboard::KeyCode cocos2dKey = g_keyCodeMap.at(keyCode);
|
||||
cocos2d::EventKeyboard event(cocos2dKey, false);
|
||||
cocos2d::Director::getInstance()->getEventDispatcher()->dispatchEvent(&event);
|
||||
return JNI_TRUE;
|
||||
|
||||
}}
|
||||
|
|
|
@ -84,6 +84,10 @@ unsigned char* CCFreeTypeFont::initWithString(const char * text, const FontDefin
|
|||
m_inWidth = textDefinition._dimensions.width;
|
||||
m_inHeight = textDefinition._dimensions.height;
|
||||
|
||||
m_fontFillColorR = textDefinition._fontFillColor.r;
|
||||
m_fontFillColorG = textDefinition._fontFillColor.g;
|
||||
m_fontFillColorB = textDefinition._fontFillColor.b;
|
||||
|
||||
#if 0
|
||||
// check the cache for the font file buffer
|
||||
auto ittFontNames = s_fontsNames.find(textDefinition._fontName);
|
||||
|
@ -304,10 +308,10 @@ void CCFreeTypeFont::draw_bitmap(unsigned char* pBuffer, FT_Bitmap* bitmap, FT_
|
|||
if(value > 0)
|
||||
{
|
||||
FT_Int index = (j * m_width * 4) + (i * 4);
|
||||
pBuffer[index++] = m_fontFillColorR;
|
||||
pBuffer[index++] = m_fontFillColorG;
|
||||
pBuffer[index++] = m_fontFillColorB;
|
||||
pBuffer[index++] = value;
|
||||
pBuffer[index++] = value;
|
||||
pBuffer[index++] = value;
|
||||
pBuffer[index++] = 0xff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -129,6 +129,9 @@ private:
|
|||
|
||||
FTLineInfo* m_currentLine; // the current line object to add words to.
|
||||
|
||||
int m_fontFillColorR;
|
||||
int m_fontFillColorG;
|
||||
int m_fontFillColorB;
|
||||
};
|
||||
|
||||
NS_CC_END
|
||||
|
|
|
@ -121,6 +121,8 @@ base/CCEventListenerMouse.cpp \
|
|||
base/CCEventListenerTouch.cpp \
|
||||
base/CCEventMouse.cpp \
|
||||
base/CCEventTouch.cpp \
|
||||
base/CCEventFocus.cpp \
|
||||
base/CCEventListenerFocus.cpp \
|
||||
base/CCNS.cpp \
|
||||
base/CCProfiling.cpp \
|
||||
base/CCRef.cpp \
|
||||
|
@ -164,6 +166,7 @@ physics/chipmunk/CCPhysicsWorldInfo_chipmunk.cpp \
|
|||
|
||||
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) \
|
||||
$(LOCAL_PATH)/. \
|
||||
$(LOCAL_PATH)/2d \
|
||||
$(LOCAL_PATH)/2d/platform/android \
|
||||
$(LOCAL_PATH)/../external/tinyxml2 \
|
||||
$(LOCAL_PATH)/../external/unzip \
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '10.0'">v100</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0'">v110</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0'">v120</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v120_xp</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
|
@ -30,6 +32,8 @@
|
|||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '10.0'">v100</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0'">v110</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0'">v120</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v120_xp</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
|
|
|
@ -48,6 +48,7 @@ public:
|
|||
KEYBOARD,
|
||||
ACCELERATION,
|
||||
MOUSE,
|
||||
FOCUS,
|
||||
CUSTOM
|
||||
};
|
||||
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include "base/CCEventListenerMouse.h"
|
||||
#include "base/CCEventListenerKeyboard.h"
|
||||
#include "base/CCEventListenerCustom.h"
|
||||
#include "base/CCEventListenerFocus.h"
|
||||
|
||||
#include "2d/CCScene.h"
|
||||
#include "base/CCDirector.h"
|
||||
|
@ -85,6 +86,9 @@ static EventListener::ListenerID __getListenerID(Event* event)
|
|||
case Event::Type::MOUSE:
|
||||
ret = EventListenerMouse::LISTENER_ID;
|
||||
break;
|
||||
case Event::Type::FOCUS:
|
||||
ret = EventListenerFocus::LISTENER_ID;
|
||||
break;
|
||||
case Event::Type::TOUCH:
|
||||
// Touch listener is very special, it contains two kinds of listeners, EventListenerTouchOneByOne and EventListenerTouchAllAtOnce.
|
||||
// return UNKNOWN instead.
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2014 cocos2d-x.org
|
||||
Copyright (c) 2014 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#include "CCEventFocus.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
|
||||
EventFocus::EventFocus(ui::Widget *widgetLoseFocus, ui::Widget* widgetGetFocus)
|
||||
:Event(Type::FOCUS),
|
||||
_widgetLoseFocus(widgetLoseFocus),
|
||||
_widgetGetFocus(widgetGetFocus)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
NS_CC_END
|
|
@ -0,0 +1,53 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2014 cocos2d-x.org
|
||||
Copyright (c) 2014 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __cocos2d_libs__CCEventFocus__
|
||||
#define __cocos2d_libs__CCEventFocus__
|
||||
|
||||
#include "CCEvent.h"
|
||||
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
namespace ui {
|
||||
class Widget;
|
||||
}
|
||||
|
||||
class EventFocus : public Event
|
||||
{
|
||||
public:
|
||||
EventFocus(ui::Widget* widgetLoseFocus, ui::Widget* widgetGetFocus);
|
||||
|
||||
private:
|
||||
ui::Widget *_widgetGetFocus;
|
||||
ui::Widget *_widgetLoseFocus;
|
||||
|
||||
friend class EventListenerFocus;
|
||||
};
|
||||
|
||||
|
||||
NS_CC_END
|
||||
|
||||
#endif /* defined(__cocos2d_libs__CCEventFocus__) */
|
|
@ -38,162 +38,169 @@ public:
|
|||
*/
|
||||
enum class KeyCode
|
||||
{
|
||||
KEY_NONE = 0,
|
||||
KEY_PAUSE = 0x0013,
|
||||
KEY_SCROLL_LOCK = 0x1014,
|
||||
KEY_PRINT = 0x1061,
|
||||
KEY_SYSREQ = 0x106A,
|
||||
KEY_BREAK = 0x106B,
|
||||
KEY_ESCAPE = 0x001B,
|
||||
KEY_BACKSPACE = 0x0008,
|
||||
KEY_TAB = 0x0009,
|
||||
KEY_BACK_TAB = 0x0089,
|
||||
KEY_RETURN = 0x000D,
|
||||
KEY_CAPS_LOCK = 0x00E5,
|
||||
KEY_SHIFT = 0x00E1,
|
||||
KEY_CTRL = 0x00E3,
|
||||
KEY_ALT = 0x00E9,
|
||||
KEY_MENU = 0x1067,
|
||||
KEY_HYPER = 0x10ED,
|
||||
KEY_INSERT = 0x1063,
|
||||
KEY_HOME = 0x1050,
|
||||
KEY_PG_UP = 0x1055,
|
||||
KEY_DELETE = 0x10FF,
|
||||
KEY_END = 0x1057,
|
||||
KEY_PG_DOWN = 0x1056,
|
||||
KEY_LEFT_ARROW = 0x1051,
|
||||
KEY_RIGHT_ARROW = 0x1053,
|
||||
KEY_UP_ARROW = 0x1052,
|
||||
KEY_DOWN_ARROW = 0x1054,
|
||||
KEY_NUM_LOCK = 0x107F,
|
||||
KEY_KP_PLUS = 0x10AB,
|
||||
KEY_KP_MINUS = 0x10AD,
|
||||
KEY_KP_MULTIPLY = 0x10AA,
|
||||
KEY_KP_DIVIDE = 0x10AF,
|
||||
KEY_KP_ENTER = 0x108D,
|
||||
KEY_KP_HOME = 0x10B7,
|
||||
KEY_KP_UP = 0x10B8,
|
||||
KEY_KP_PG_UP = 0x10B9,
|
||||
KEY_KP_LEFT = 0x10B4,
|
||||
KEY_KP_FIVE = 0x10B5,
|
||||
KEY_KP_RIGHT = 0x10B6,
|
||||
KEY_KP_END = 0x10B1,
|
||||
KEY_KP_DOWN = 0x10B2,
|
||||
KEY_KP_PG_DOWN = 0x10B3,
|
||||
KEY_KP_INSERT = 0x10B0,
|
||||
KEY_KP_DELETE = 0x10AE,
|
||||
KEY_F1 = 0x00BE,
|
||||
KEY_F2 = 0x00BF,
|
||||
KEY_F3 = 0x00C0,
|
||||
KEY_F4 = 0x00C1,
|
||||
KEY_F5 = 0x00C2,
|
||||
KEY_F6 = 0x00C3,
|
||||
KEY_F7 = 0x00C4,
|
||||
KEY_F8 = 0x00C5,
|
||||
KEY_F9 = 0x00C6,
|
||||
KEY_F10 = 0x00C7,
|
||||
KEY_F11 = 0x00C8,
|
||||
KEY_F12 = 0x00C9,
|
||||
KEY_SPACE = ' ',
|
||||
KEY_EXCLAM = '!',
|
||||
KEY_QUOTE = '"',
|
||||
KEY_NUMBER = '#',
|
||||
KEY_DOLLAR = '$',
|
||||
KEY_PERCENT = '%',
|
||||
KEY_CIRCUMFLEX = '^',
|
||||
KEY_AMPERSAND = '&',
|
||||
KEY_APOSTROPHE = '\'',
|
||||
KEY_LEFT_PARENTHESIS = '(',
|
||||
KEY_RIGHT_PARENTHESIS = ')',
|
||||
KEY_ASTERISK = '*',
|
||||
KEY_PLUS = '+',
|
||||
KEY_COMMA = ',',
|
||||
KEY_MINUS = '-',
|
||||
KEY_PERIOD = '.',
|
||||
KEY_SLASH = '/',
|
||||
KEY_0 = '0',
|
||||
KEY_1 = '1',
|
||||
KEY_2 = '2',
|
||||
KEY_3 = '3',
|
||||
KEY_4 = '4',
|
||||
KEY_5 = '5',
|
||||
KEY_6 = '6',
|
||||
KEY_7 = '7',
|
||||
KEY_8 = '8',
|
||||
KEY_9 = '9',
|
||||
KEY_COLON = ':',
|
||||
KEY_SEMICOLON = ';',
|
||||
KEY_LESS_THAN = '<',
|
||||
KEY_EQUAL = '=',
|
||||
KEY_GREATER_THAN = '>',
|
||||
KEY_QUESTION = '?',
|
||||
KEY_AT = '@',
|
||||
KEY_CAPITAL_A = 'A',
|
||||
KEY_CAPITAL_B = 'B',
|
||||
KEY_CAPITAL_C = 'C',
|
||||
KEY_CAPITAL_D = 'D',
|
||||
KEY_CAPITAL_E = 'E',
|
||||
KEY_CAPITAL_F = 'F',
|
||||
KEY_CAPITAL_G = 'G',
|
||||
KEY_CAPITAL_H = 'H',
|
||||
KEY_CAPITAL_I = 'I',
|
||||
KEY_CAPITAL_J = 'J',
|
||||
KEY_CAPITAL_K = 'K',
|
||||
KEY_CAPITAL_L = 'L',
|
||||
KEY_CAPITAL_M = 'M',
|
||||
KEY_CAPITAL_N = 'N',
|
||||
KEY_CAPITAL_O = 'O',
|
||||
KEY_CAPITAL_P = 'P',
|
||||
KEY_CAPITAL_Q = 'Q',
|
||||
KEY_CAPITAL_R = 'R',
|
||||
KEY_CAPITAL_S = 'S',
|
||||
KEY_CAPITAL_T = 'T',
|
||||
KEY_CAPITAL_U = 'U',
|
||||
KEY_CAPITAL_V = 'V',
|
||||
KEY_CAPITAL_W = 'W',
|
||||
KEY_CAPITAL_X = 'X',
|
||||
KEY_CAPITAL_Y = 'Y',
|
||||
KEY_CAPITAL_Z = 'Z',
|
||||
KEY_LEFT_BRACKET = '[',
|
||||
KEY_BACK_SLASH = '\\',
|
||||
KEY_RIGHT_BRACKET = ']',
|
||||
KEY_UNDERSCORE = '_',
|
||||
KEY_GRAVE = '`',
|
||||
KEY_A = 'a',
|
||||
KEY_B = 'b',
|
||||
KEY_C = 'c',
|
||||
KEY_D = 'd',
|
||||
KEY_E = 'e',
|
||||
KEY_F = 'f',
|
||||
KEY_G = 'g',
|
||||
KEY_H = 'h',
|
||||
KEY_I = 'i',
|
||||
KEY_J = 'j',
|
||||
KEY_K = 'k',
|
||||
KEY_L = 'l',
|
||||
KEY_M = 'm',
|
||||
KEY_N = 'n',
|
||||
KEY_O = 'o',
|
||||
KEY_P = 'p',
|
||||
KEY_Q = 'q',
|
||||
KEY_R = 'r',
|
||||
KEY_S = 's',
|
||||
KEY_T = 't',
|
||||
KEY_U = 'u',
|
||||
KEY_V = 'v',
|
||||
KEY_W = 'w',
|
||||
KEY_X = 'x',
|
||||
KEY_Y = 'y',
|
||||
KEY_Z = 'z',
|
||||
KEY_LEFT_BRACE = '{',
|
||||
KEY_BAR = '|',
|
||||
KEY_RIGHT_BRACE = '}',
|
||||
KEY_TILDE = '~',
|
||||
KEY_EURO = 0x20AC,
|
||||
KEY_POUND = 0x00A3,
|
||||
KEY_YEN = 0x00A5,
|
||||
KEY_MIDDLE_DOT = 0x0095,
|
||||
KEY_SEARCH = 0xFFAA
|
||||
KEY_NONE,
|
||||
KEY_PAUSE,
|
||||
KEY_SCROLL_LOCK,
|
||||
KEY_PRINT,
|
||||
KEY_SYSREQ,
|
||||
KEY_BREAK,
|
||||
KEY_ESCAPE,
|
||||
KEY_BACKSPACE,
|
||||
KEY_TAB,
|
||||
KEY_BACK_TAB,
|
||||
KEY_RETURN,
|
||||
KEY_CAPS_LOCK,
|
||||
KEY_SHIFT,
|
||||
KEY_CTRL,
|
||||
KEY_ALT,
|
||||
KEY_MENU,
|
||||
KEY_HYPER,
|
||||
KEY_INSERT,
|
||||
KEY_HOME,
|
||||
KEY_PG_UP,
|
||||
KEY_DELETE,
|
||||
KEY_END,
|
||||
KEY_PG_DOWN,
|
||||
KEY_LEFT_ARROW,
|
||||
KEY_RIGHT_ARROW,
|
||||
KEY_UP_ARROW,
|
||||
KEY_DOWN_ARROW,
|
||||
KEY_NUM_LOCK,
|
||||
KEY_KP_PLUS,
|
||||
KEY_KP_MINUS,
|
||||
KEY_KP_MULTIPLY,
|
||||
KEY_KP_DIVIDE,
|
||||
KEY_KP_ENTER,
|
||||
KEY_KP_HOME,
|
||||
KEY_KP_UP,
|
||||
KEY_KP_PG_UP,
|
||||
KEY_KP_LEFT,
|
||||
KEY_KP_FIVE,
|
||||
KEY_KP_RIGHT,
|
||||
KEY_KP_END,
|
||||
KEY_KP_DOWN,
|
||||
KEY_KP_PG_DOWN,
|
||||
KEY_KP_INSERT,
|
||||
KEY_KP_DELETE,
|
||||
KEY_F1,
|
||||
KEY_F2,
|
||||
KEY_F3,
|
||||
KEY_F4,
|
||||
KEY_F5,
|
||||
KEY_F6,
|
||||
KEY_F7,
|
||||
KEY_F8,
|
||||
KEY_F9,
|
||||
KEY_F10,
|
||||
KEY_F11,
|
||||
KEY_F12,
|
||||
KEY_SPACE,
|
||||
KEY_EXCLAM,
|
||||
KEY_QUOTE,
|
||||
KEY_NUMBER,
|
||||
KEY_DOLLAR,
|
||||
KEY_PERCENT,
|
||||
KEY_CIRCUMFLEX,
|
||||
KEY_AMPERSAND,
|
||||
KEY_APOSTROPHE,
|
||||
KEY_LEFT_PARENTHESIS,
|
||||
KEY_RIGHT_PARENTHESIS,
|
||||
KEY_ASTERISK,
|
||||
KEY_PLUS,
|
||||
KEY_COMMA,
|
||||
KEY_MINUS,
|
||||
KEY_PERIOD,
|
||||
KEY_SLASH,
|
||||
KEY_0,
|
||||
KEY_1,
|
||||
KEY_2,
|
||||
KEY_3,
|
||||
KEY_4,
|
||||
KEY_5,
|
||||
KEY_6,
|
||||
KEY_7,
|
||||
KEY_8,
|
||||
KEY_9,
|
||||
KEY_COLON,
|
||||
KEY_SEMICOLON,
|
||||
KEY_LESS_THAN,
|
||||
KEY_EQUAL,
|
||||
KEY_GREATER_THAN,
|
||||
KEY_QUESTION,
|
||||
KEY_AT,
|
||||
KEY_CAPITAL_A,
|
||||
KEY_CAPITAL_B,
|
||||
KEY_CAPITAL_C,
|
||||
KEY_CAPITAL_D,
|
||||
KEY_CAPITAL_E,
|
||||
KEY_CAPITAL_F,
|
||||
KEY_CAPITAL_G,
|
||||
KEY_CAPITAL_H,
|
||||
KEY_CAPITAL_I,
|
||||
KEY_CAPITAL_J,
|
||||
KEY_CAPITAL_K,
|
||||
KEY_CAPITAL_L,
|
||||
KEY_CAPITAL_M,
|
||||
KEY_CAPITAL_N,
|
||||
KEY_CAPITAL_O,
|
||||
KEY_CAPITAL_P,
|
||||
KEY_CAPITAL_Q,
|
||||
KEY_CAPITAL_R,
|
||||
KEY_CAPITAL_S,
|
||||
KEY_CAPITAL_T,
|
||||
KEY_CAPITAL_U,
|
||||
KEY_CAPITAL_V,
|
||||
KEY_CAPITAL_W,
|
||||
KEY_CAPITAL_X,
|
||||
KEY_CAPITAL_Y,
|
||||
KEY_CAPITAL_Z,
|
||||
KEY_LEFT_BRACKET,
|
||||
KEY_BACK_SLASH,
|
||||
KEY_RIGHT_BRACKET,
|
||||
KEY_UNDERSCORE,
|
||||
KEY_GRAVE,
|
||||
KEY_A,
|
||||
KEY_B,
|
||||
KEY_C,
|
||||
KEY_D,
|
||||
KEY_E,
|
||||
KEY_F,
|
||||
KEY_G,
|
||||
KEY_H,
|
||||
KEY_I,
|
||||
KEY_J,
|
||||
KEY_K,
|
||||
KEY_L,
|
||||
KEY_M,
|
||||
KEY_N,
|
||||
KEY_O,
|
||||
KEY_P,
|
||||
KEY_Q,
|
||||
KEY_R,
|
||||
KEY_S,
|
||||
KEY_T,
|
||||
KEY_U,
|
||||
KEY_V,
|
||||
KEY_W,
|
||||
KEY_X,
|
||||
KEY_Y,
|
||||
KEY_Z,
|
||||
KEY_LEFT_BRACE,
|
||||
KEY_BAR,
|
||||
KEY_RIGHT_BRACE,
|
||||
KEY_TILDE,
|
||||
KEY_EURO,
|
||||
KEY_POUND,
|
||||
KEY_YEN,
|
||||
KEY_MIDDLE_DOT,
|
||||
KEY_SEARCH,
|
||||
KEY_DPAD_LEFT,
|
||||
KEY_DPAD_RIGHT,
|
||||
KEY_DPAD_UP,
|
||||
KEY_DPAD_DOWN,
|
||||
KEY_DPAD_CENTER,
|
||||
KEY_ENTER,
|
||||
KEY_PLAY,
|
||||
};
|
||||
|
||||
EventKeyboard(KeyCode keyCode, bool isPressed);
|
||||
|
|
|
@ -54,6 +54,7 @@ public:
|
|||
KEYBOARD,
|
||||
MOUSE,
|
||||
ACCELERATION,
|
||||
FOCUS,
|
||||
CUSTOM
|
||||
};
|
||||
|
||||
|
|
|
@ -0,0 +1,98 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2014 cocos2d-x.org
|
||||
Copyright (c) 2014 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#include "CCEventListenerFocus.h"
|
||||
#include "CCEventFocus.h"
|
||||
#include "ccMacros.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
|
||||
const std::string EventListenerFocus::LISTENER_ID = "__cc_focus_event";
|
||||
|
||||
|
||||
EventListenerFocus::EventListenerFocus()
|
||||
:onFocusChanged(nullptr)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
EventListenerFocus::~EventListenerFocus()
|
||||
{
|
||||
CCLOGINFO("In the destructor of EventListenerFocus, %p", this);
|
||||
}
|
||||
|
||||
EventListenerFocus* EventListenerFocus::create()
|
||||
{
|
||||
EventListenerFocus* ret = new EventListenerFocus;
|
||||
if (ret && ret->init()) {
|
||||
ret->autorelease();
|
||||
return ret;
|
||||
}
|
||||
CC_SAFE_DELETE(ret);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
EventListenerFocus* EventListenerFocus::clone()
|
||||
{
|
||||
EventListenerFocus* ret = new EventListenerFocus;
|
||||
if (ret && ret->init()) {
|
||||
ret->autorelease();
|
||||
|
||||
ret->onFocusChanged = onFocusChanged;
|
||||
}
|
||||
else
|
||||
{
|
||||
CC_SAFE_DELETE(ret);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool EventListenerFocus::init()
|
||||
{
|
||||
auto listener = [this](Event* event){
|
||||
auto focusEvent = static_cast<EventFocus*>(event);
|
||||
onFocusChanged(focusEvent->_widgetLoseFocus, focusEvent->_widgetGetFocus);
|
||||
};
|
||||
if (EventListener::init(Type::FOCUS, LISTENER_ID, listener)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool EventListenerFocus::checkAvailable()
|
||||
{
|
||||
if (onFocusChanged == nullptr)
|
||||
{
|
||||
CCASSERT(false, "Invalid EventListenerFocus!");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
NS_CC_END
|
|
@ -0,0 +1,65 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2014 cocos2d-x.org
|
||||
Copyright (c) 2014 Chukong Technologies Inc.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __cocos2d_libs__CCEventListenerFocus__
|
||||
#define __cocos2d_libs__CCEventListenerFocus__
|
||||
|
||||
#include "CCEventListener.h"
|
||||
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
namespace ui {
|
||||
class Widget;
|
||||
}
|
||||
|
||||
class EventListenerFocus : public EventListener
|
||||
{
|
||||
public:
|
||||
static const std::string LISTENER_ID;
|
||||
static EventListenerFocus* create();
|
||||
|
||||
virtual ~EventListenerFocus();
|
||||
|
||||
/// Overrides
|
||||
virtual EventListenerFocus* clone() override;
|
||||
virtual bool checkAvailable() override;
|
||||
//
|
||||
|
||||
public:
|
||||
std::function<void(ui::Widget*, ui::Widget*)> onFocusChanged;
|
||||
|
||||
private:
|
||||
EventListenerFocus();
|
||||
bool init();
|
||||
|
||||
friend class EventDispatcher;
|
||||
};
|
||||
|
||||
|
||||
|
||||
NS_CC_END
|
||||
|
||||
#endif /* defined(__cocos2d_libs__CCEventListenerFocus__) */
|
|
@ -20,6 +20,8 @@ set(COCOS_BASE_SRC
|
|||
base/CCEventListenerTouch.cpp
|
||||
base/CCEventMouse.cpp
|
||||
base/CCEventTouch.cpp
|
||||
base/CCEventFocus.cpp
|
||||
base/CCEventListenerFocus.cpp
|
||||
base/CCNS.cpp
|
||||
base/CCProfiling.cpp
|
||||
base/CCRef.cpp
|
||||
|
|
|
@ -69,6 +69,8 @@ THE SOFTWARE.
|
|||
#include "base/CCEventListenerAcceleration.h"
|
||||
#include "base/CCEventCustom.h"
|
||||
#include "base/CCEventListenerCustom.h"
|
||||
#include "base/CCEventFocus.h"
|
||||
#include "base/CCEventListenerFocus.h"
|
||||
|
||||
// math
|
||||
#include "math/CCAffineTransform.h"
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '10.0'">v100</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0'">v110</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0'">v120</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v120_xp</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
|
@ -29,6 +31,8 @@
|
|||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '10.0'">v100</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0'">v110</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0'">v120</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v120_xp</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
|
|
|
@ -1113,9 +1113,9 @@ Widget* WidgetPropertiesReader0300::widgetFromJsonDictionary(const rapidjson::Va
|
|||
{
|
||||
if (child->getPositionType() == cocos2d::ui::POSITION_PERCENT)
|
||||
{
|
||||
child->setPositionPercent(Vector2(child->getPositionPercent().x + 0.5f, child->getPositionPercent().y + 0.5f));
|
||||
child->setPositionPercent(Vector2(child->getPositionPercent().x + widget->getAnchorPoint().x, child->getPositionPercent().y + widget->getAnchorPoint().y));
|
||||
}
|
||||
child->setPosition(Vector2(child->getPositionX() + widget->getSize().width / 2.0f, child->getPositionY() + widget->getSize().height / 2.0f));
|
||||
child->setPosition(Vector2(child->getPositionX() + widget->getAnchorPointInPoints().x, child->getPositionY() + widget->getAnchorPointInPoints().y));
|
||||
}
|
||||
widget->addChild(child);
|
||||
}
|
||||
|
|
|
@ -135,6 +135,8 @@
|
|||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '10.0'">v100</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0'">v110</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0'">v120</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v120_xp</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
|
@ -143,6 +145,8 @@
|
|||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '10.0'">v100</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0'">v110</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0'">v120</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v120_xp</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
|
|
|
@ -76,6 +76,8 @@
|
|||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '10.0'">v100</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0'">v110</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0'">v120</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v120_xp</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
|
@ -84,6 +86,8 @@
|
|||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '10.0'">v100</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0'">v110</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0'">v120</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v120_xp</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
|
|
|
@ -35,6 +35,8 @@
|
|||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '10.0'">v100</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0'">v110</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0'">v120</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v120_xp</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
|
@ -42,6 +44,8 @@
|
|||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '10.0'">v100</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0'">v110</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0'">v120</PlatformToolset>
|
||||
<PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v120_xp</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
--------------------------------
|
||||
-- overload function: setEye(float, float, float)
|
||||
--
|
||||
-- overload function: setEye(array_table)
|
||||
-- overload function: setEye(vector3_table)
|
||||
--
|
||||
-- @function [parent=#ActionCamera] setEye
|
||||
-- @param self
|
||||
|
@ -17,27 +17,27 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#ActionCamera] getEye
|
||||
-- @param self
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
-- @return vector3_table#vector3_table ret (return value: vector3_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ActionCamera] setUp
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @param #vector3_table array
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ActionCamera] getCenter
|
||||
-- @param self
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
-- @return vector3_table#vector3_table ret (return value: vector3_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ActionCamera] setCenter
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @param #vector3_table array
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ActionCamera] getUp
|
||||
-- @param self
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
-- @return vector3_table#vector3_table ret (return value: vector3_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ActionCamera] startWithTarget
|
||||
|
|
|
@ -141,19 +141,19 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#Armature] setAnchorPoint
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Armature] draw
|
||||
-- @param self
|
||||
-- @param #cc.Renderer renderer
|
||||
-- @param #cc.Matrix matrix
|
||||
-- @param #matrix_table matrix
|
||||
-- @param #bool bool
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Armature] getAnchorPointInPoints
|
||||
-- @param self
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
-- @return vector2_table#vector2_table ret (return value: vector2_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Armature] update
|
||||
|
@ -163,7 +163,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#Armature] getNodeToParentTransform
|
||||
-- @param self
|
||||
-- @return Matrix#Matrix ret (return value: cc.Matrix)
|
||||
-- @return matrix_table#matrix_table ret (return value: matrix_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Armature] getBoundingBox
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
-- @function [parent=#AtlasNode] draw
|
||||
-- @param self
|
||||
-- @param #cc.Renderer renderer
|
||||
-- @param #cc.Matrix matrix
|
||||
-- @param #matrix_table matrix
|
||||
-- @param #bool bool
|
||||
|
||||
--------------------------------
|
||||
|
@ -61,12 +61,12 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#AtlasNode] setColor
|
||||
-- @param self
|
||||
-- @param #color3B_table color3b
|
||||
-- @param #color3b_table color3b
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#AtlasNode] getColor
|
||||
-- @param self
|
||||
-- @return color3B_table#color3B_table ret (return value: color3B_table)
|
||||
-- @return color3b_table#color3b_table ret (return value: color3b_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#AtlasNode] setOpacityModifyRGB
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#BaseData] getColor
|
||||
-- @param self
|
||||
-- @return color4B_table#color4B_table ret (return value: color4B_table)
|
||||
-- @return color4b_table#color4b_table ret (return value: color4b_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#BaseData] setColor
|
||||
-- @param self
|
||||
-- @param #color4B_table color4b
|
||||
-- @param #color4b_table color4b
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#BaseData] create
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
-- @function [parent=#BatchNode] draw
|
||||
-- @param self
|
||||
-- @param #cc.Renderer renderer
|
||||
-- @param #cc.Matrix matrix
|
||||
-- @param #matrix_table matrix
|
||||
-- @param #bool bool
|
||||
|
||||
--------------------------------
|
||||
|
|
|
@ -162,7 +162,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#Bone] getNodeToArmatureTransform
|
||||
-- @param self
|
||||
-- @return Matrix#Matrix ret (return value: cc.Matrix)
|
||||
-- @return matrix_table#matrix_table ret (return value: matrix_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Bone] getDisplayManager
|
||||
|
@ -192,7 +192,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#Bone] updateDisplayedColor
|
||||
-- @param self
|
||||
-- @param #color3B_table color3b
|
||||
-- @param #color3b_table color3b
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Bone] setLocalZOrder
|
||||
|
@ -202,7 +202,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#Bone] getNodeToWorldTransform
|
||||
-- @param self
|
||||
-- @return Matrix#Matrix ret (return value: cc.Matrix)
|
||||
-- @return matrix_table#matrix_table ret (return value: matrix_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Bone] update
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#Button] setTitleColor
|
||||
-- @param self
|
||||
-- @param #color3B_table color3b
|
||||
-- @param #color3b_table color3b
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Button] setCapInsetsDisabledRenderer
|
||||
|
@ -112,7 +112,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#Button] getTitleColor
|
||||
-- @param self
|
||||
-- @return color3B_table#color3B_table ret (return value: color3B_table)
|
||||
-- @return color3b_table#color3b_table ret (return value: color3b_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Button] setPressedActionEnabled
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#CardinalSplineBy] updatePosition
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#CardinalSplineBy] reverse
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#CardinalSplineTo] updatePosition
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#CardinalSplineTo] initWithDuration
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#ContourData] addVertex
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ContourData] create
|
||||
|
|
|
@ -82,7 +82,7 @@
|
|||
-- @function [parent=#Control] getTouchLocation
|
||||
-- @param self
|
||||
-- @param #cc.Touch touch
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
-- @return vector2_table#vector2_table ret (return value: vector2_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Control] isHighlighted
|
||||
|
|
|
@ -43,12 +43,12 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#ControlButton] setLabelAnchorPoint
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ControlButton] getLabelAnchorPoint
|
||||
-- @param self
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
-- @return vector2_table#vector2_table ret (return value: vector2_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ControlButton] getTitleTTFSizeForState
|
||||
|
@ -81,7 +81,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#ControlButton] getCurrentTitleColor
|
||||
-- @param self
|
||||
-- @return color3B_table#color3B_table ret (return value: color3B_table)
|
||||
-- @return color3b_table#color3b_table ret (return value: color3b_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ControlButton] setEnabled
|
||||
|
@ -132,12 +132,12 @@
|
|||
-- @function [parent=#ControlButton] getTitleColorForState
|
||||
-- @param self
|
||||
-- @param #cc.Control::State state
|
||||
-- @return color3B_table#color3B_table ret (return value: color3B_table)
|
||||
-- @return color3b_table#color3b_table ret (return value: color3b_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ControlButton] setTitleColorForState
|
||||
-- @param self
|
||||
-- @param #color3B_table color3b
|
||||
-- @param #color3b_table color3b
|
||||
-- @param #cc.Control::State state
|
||||
|
||||
--------------------------------
|
||||
|
@ -248,12 +248,12 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#ControlButton] setColor
|
||||
-- @param self
|
||||
-- @param #color3B_table color3b
|
||||
-- @param #color3b_table color3b
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ControlButton] getColor
|
||||
-- @param self
|
||||
-- @return color3B_table#color3B_table ret (return value: color3B_table)
|
||||
-- @return color3b_table#color3b_table ret (return value: color3b_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ControlButton] onTouchCancelled
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#ControlColourPicker] setColor
|
||||
-- @param self
|
||||
-- @param #color3B_table color3b
|
||||
-- @param #color3b_table color3b
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ControlColourPicker] hueSliderValueChanged
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
-- @function [parent=#ControlHuePicker] initWithTargetAndPos
|
||||
-- @param self
|
||||
-- @param #cc.Node node
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
|
@ -23,7 +23,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#ControlHuePicker] getStartPos
|
||||
-- @param self
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
-- @return vector2_table#vector2_table ret (return value: vector2_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ControlHuePicker] getHue
|
||||
|
@ -64,7 +64,7 @@
|
|||
-- @function [parent=#ControlHuePicker] create
|
||||
-- @param self
|
||||
-- @param #cc.Node node
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
-- @return ControlHuePicker#ControlHuePicker ret (return value: cc.ControlHuePicker)
|
||||
|
||||
--------------------------------
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#ControlPotentiometer] setPreviousLocation
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ControlPotentiometer] setValue
|
||||
|
@ -26,16 +26,16 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#ControlPotentiometer] angleInDegreesBetweenLineFromPoint_toPoint_toLineFromPoint_toPoint
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @param #array_table array
|
||||
-- @param #array_table array
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
-- @param #vector2_table array
|
||||
-- @param #vector2_table array
|
||||
-- @param #vector2_table array
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ControlPotentiometer] potentiometerBegan
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ControlPotentiometer] setMaximumValue
|
||||
|
@ -60,19 +60,19 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#ControlPotentiometer] getPreviousLocation
|
||||
-- @param self
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
-- @return vector2_table#vector2_table ret (return value: vector2_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ControlPotentiometer] distanceBetweenPointAndPoint
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
-- @param #vector2_table array
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ControlPotentiometer] potentiometerEnded
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ControlPotentiometer] setProgressTimer
|
||||
|
@ -100,7 +100,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#ControlPotentiometer] potentiometerMoved
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ControlPotentiometer] create
|
||||
|
|
|
@ -12,13 +12,13 @@
|
|||
-- @function [parent=#ControlSaturationBrightnessPicker] initWithTargetAndPos
|
||||
-- @param self
|
||||
-- @param #cc.Node node
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ControlSaturationBrightnessPicker] getStartPos
|
||||
-- @param self
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
-- @return vector2_table#vector2_table ret (return value: vector2_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ControlSaturationBrightnessPicker] getOverlay
|
||||
|
@ -54,7 +54,7 @@
|
|||
-- @function [parent=#ControlSaturationBrightnessPicker] create
|
||||
-- @param self
|
||||
-- @param #cc.Node node
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
-- @return ControlSaturationBrightnessPicker#ControlSaturationBrightnessPicker ret (return value: cc.ControlSaturationBrightnessPicker)
|
||||
|
||||
--------------------------------
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
-- @function [parent=#ControlSlider] locationFromTouch
|
||||
-- @param self
|
||||
-- @param #cc.Touch touch
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
-- @return vector2_table#vector2_table ret (return value: vector2_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ControlSlider] setSelectedThumbSprite
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#ControlStepper] updateLayoutUsingTouchLocation
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ControlStepper] setValueWithSendingEvent
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
-- @function [parent=#ControlSwitch] locationFromTouch
|
||||
-- @param self
|
||||
-- @param #cc.Touch touch
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
-- @return vector2_table#vector2_table ret (return value: vector2_table)
|
||||
|
||||
--------------------------------
|
||||
-- overload function: create(cc.Sprite, cc.Sprite, cc.Sprite, cc.Sprite)
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
-- @function [parent=#Director] loadMatrix
|
||||
-- @param self
|
||||
-- @param #cc.MATRIX_STACK_TYPE matrix_stack_type
|
||||
-- @param #cc.Matrix matrix
|
||||
-- @param #matrix_table matrix
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Director] getNotificationNode
|
||||
|
@ -83,7 +83,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#Director] getVisibleOrigin
|
||||
-- @param self
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
-- @return vector2_table#vector2_table ret (return value: vector2_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Director] mainLoop
|
||||
|
@ -107,8 +107,8 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#Director] convertToUI
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
-- @param #vector2_table array
|
||||
-- @return vector2_table#vector2_table ret (return value: vector2_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Director] setDefaultValues
|
||||
|
@ -177,8 +177,8 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#Director] convertToGL
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
-- @param #vector2_table array
|
||||
-- @return vector2_table#vector2_table ret (return value: vector2_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Director] purgeCachedData
|
||||
|
@ -212,7 +212,7 @@
|
|||
-- @function [parent=#Director] getMatrix
|
||||
-- @param self
|
||||
-- @param #cc.MATRIX_STACK_TYPE matrix_stack_type
|
||||
-- @return Matrix#Matrix ret (return value: cc.Matrix)
|
||||
-- @return matrix_table#matrix_table ret (return value: matrix_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Director] popScene
|
||||
|
@ -286,7 +286,7 @@
|
|||
-- @function [parent=#Director] multiplyMatrix
|
||||
-- @param self
|
||||
-- @param #cc.MATRIX_STACK_TYPE matrix_stack_type
|
||||
-- @param #cc.Matrix matrix
|
||||
-- @param #matrix_table matrix
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Director] getActionManager
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#DisplayManager] getAnchorPointInPoints
|
||||
-- @param self
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
-- @return vector2_table#vector2_table ret (return value: vector2_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#DisplayManager] getDisplayRenderNodeType
|
||||
|
@ -57,7 +57,7 @@
|
|||
--------------------------------
|
||||
-- overload function: containPoint(float, float)
|
||||
--
|
||||
-- overload function: containPoint(array_table)
|
||||
-- overload function: containPoint(vector2_table)
|
||||
--
|
||||
-- @function [parent=#DisplayManager] containPoint
|
||||
-- @param self
|
||||
|
@ -90,7 +90,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#DisplayManager] getAnchorPoint
|
||||
-- @param self
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
-- @return vector2_table#vector2_table ret (return value: vector2_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#DisplayManager] getDecorativeDisplayList
|
||||
|
|
|
@ -6,16 +6,16 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#DrawNode] drawQuadraticBezier
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @param #array_table array
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
-- @param #vector2_table array
|
||||
-- @param #vector2_table array
|
||||
-- @param #unsigned int int
|
||||
-- @param #color4F_table color4f
|
||||
-- @param #color4f_table color4f
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#DrawNode] onDraw
|
||||
-- @param self
|
||||
-- @param #cc.Matrix matrix
|
||||
-- @param #matrix_table matrix
|
||||
-- @param #bool bool
|
||||
|
||||
--------------------------------
|
||||
|
@ -25,35 +25,35 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#DrawNode] drawTriangle
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @param #array_table array
|
||||
-- @param #array_table array
|
||||
-- @param #color4F_table color4f
|
||||
-- @param #vector2_table array
|
||||
-- @param #vector2_table array
|
||||
-- @param #vector2_table array
|
||||
-- @param #color4f_table color4f
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#DrawNode] drawDot
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
-- @param #float float
|
||||
-- @param #color4F_table color4f
|
||||
-- @param #color4f_table color4f
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#DrawNode] drawCubicBezier
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @param #array_table array
|
||||
-- @param #array_table array
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
-- @param #vector2_table array
|
||||
-- @param #vector2_table array
|
||||
-- @param #vector2_table array
|
||||
-- @param #unsigned int int
|
||||
-- @param #color4F_table color4f
|
||||
-- @param #color4f_table color4f
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#DrawNode] drawSegment
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
-- @param #vector2_table array
|
||||
-- @param #float float
|
||||
-- @param #color4F_table color4f
|
||||
-- @param #color4f_table color4f
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#DrawNode] create
|
||||
|
@ -64,7 +64,7 @@
|
|||
-- @function [parent=#DrawNode] draw
|
||||
-- @param self
|
||||
-- @param #cc.Renderer renderer
|
||||
-- @param #cc.Matrix matrix
|
||||
-- @param #matrix_table matrix
|
||||
-- @param #bool bool
|
||||
|
||||
return nil
|
||||
|
|
|
@ -36,12 +36,12 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#EditBox] setPlaceholderFontColor
|
||||
-- @param self
|
||||
-- @param #color3B_table color3b
|
||||
-- @param #color3b_table color3b
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#EditBox] setFontColor
|
||||
-- @param self
|
||||
-- @param #color3B_table color3b
|
||||
-- @param #color3b_table color3b
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#EditBox] setPlaceholderFont
|
||||
|
@ -109,12 +109,12 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#EditBox] setAnchorPoint
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#EditBox] setPosition
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#EditBox] setVisible
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
|
||||
--------------------------------
|
||||
-- @module EventFocus
|
||||
-- @extend Event
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#EventFocus] EventFocus
|
||||
-- @param self
|
||||
-- @param #ccui.Widget widget
|
||||
-- @param #ccui.Widget widget
|
||||
|
||||
return nil
|
|
@ -0,0 +1,16 @@
|
|||
|
||||
--------------------------------
|
||||
-- @module EventListenerFocus
|
||||
-- @extend EventListener
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#EventListenerFocus] clone
|
||||
-- @param self
|
||||
-- @return EventListenerFocus#EventListenerFocus ret (return value: cc.EventListenerFocus)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#EventListenerFocus] checkAvailable
|
||||
-- @param self
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
return nil
|
|
@ -6,17 +6,17 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#FadeOutTRTiles] turnOnTile
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#FadeOutTRTiles] turnOffTile
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#FadeOutTRTiles] transformTile
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
-- @param #float float
|
||||
|
||||
--------------------------------
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#FadeOutUpTiles] transformTile
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
-- @param #float float
|
||||
|
||||
--------------------------------
|
||||
|
|
|
@ -45,13 +45,13 @@
|
|||
-- @return string#string ret (return value: string)
|
||||
|
||||
--------------------------------
|
||||
-- overload function: setUniformsForBuiltins(cc.Matrix)
|
||||
-- overload function: setUniformsForBuiltins(matrix_table)
|
||||
--
|
||||
-- overload function: setUniformsForBuiltins()
|
||||
--
|
||||
-- @function [parent=#GLProgram] setUniformsForBuiltins
|
||||
-- @param self
|
||||
-- @param #cc.Matrix matrix
|
||||
-- @param #matrix_table matrix
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#GLProgram] setUniformLocationWith3i
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#GLViewProtocol] getVisibleOrigin
|
||||
-- @param self
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
-- @return vector2_table#vector2_table ret (return value: vector2_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#GLViewProtocol] getFrameSize
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#GridBase] getStep
|
||||
-- @param self
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
-- @return vector2_table#vector2_table ret (return value: vector2_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#GridBase] set2DProjection
|
||||
|
@ -43,7 +43,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#GridBase] setStep
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#GridBase] setTextureFlipped
|
||||
|
|
|
@ -8,11 +8,6 @@
|
|||
-- @param self
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Image] getDataLen
|
||||
-- @param self
|
||||
-- @return long#long ret (return value: long)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Image] saveToFile
|
||||
-- @param self
|
||||
|
@ -71,16 +66,6 @@
|
|||
-- @param self
|
||||
-- @return Texture2D::PixelFormat#Texture2D::PixelFormat ret (return value: cc.Texture2D::PixelFormat)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Image] getData
|
||||
-- @param self
|
||||
-- @return unsigned char#unsigned char ret (return value: unsigned char)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Image] getMipmaps
|
||||
-- @param self
|
||||
-- @return _MipmapInfo#_MipmapInfo ret (return value: cc._MipmapInfo)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Image] Image
|
||||
-- @param self
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
-- @function [parent=#JumpBy] create
|
||||
-- @param self
|
||||
-- @param #float float
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
-- @param #float float
|
||||
-- @param #int int
|
||||
-- @return JumpBy#JumpBy ret (return value: cc.JumpBy)
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
-- @function [parent=#JumpTo] create
|
||||
-- @param self
|
||||
-- @param #float float
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
-- @param #float float
|
||||
-- @param #int int
|
||||
-- @return JumpTo#JumpTo ret (return value: cc.JumpTo)
|
||||
|
|
|
@ -32,10 +32,16 @@
|
|||
-- @function [parent=#Label] disableEffect
|
||||
-- @param self
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Label] setTTFConfig
|
||||
-- @param self
|
||||
-- @param #cc._ttfConfig _ttfconfig
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Label] getTextColor
|
||||
-- @param self
|
||||
-- @return color4B_table#color4B_table ret (return value: color4B_table)
|
||||
-- @return color4b_table#color4b_table ret (return value: color4b_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Label] getCommonLineHeight
|
||||
|
@ -76,7 +82,7 @@
|
|||
-- @function [parent=#Label] setBMFontFilePath
|
||||
-- @param self
|
||||
-- @param #string str
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
|
@ -111,7 +117,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#Label] enableOutline
|
||||
-- @param self
|
||||
-- @param #color4B_table color4b
|
||||
-- @param #color4b_table color4b
|
||||
-- @param #int int
|
||||
|
||||
--------------------------------
|
||||
|
@ -162,7 +168,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#Label] setTextColor
|
||||
-- @param self
|
||||
-- @param #color4B_table color4b
|
||||
-- @param #color4b_table color4b
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Label] setHeight
|
||||
|
@ -177,7 +183,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#Label] enableGlow
|
||||
-- @param self
|
||||
-- @param #color4B_table color4b
|
||||
-- @param #color4b_table color4b
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Label] getLetter
|
||||
|
@ -222,7 +228,7 @@
|
|||
-- @param #string str
|
||||
-- @param #cc.TextHAlignment texthalignment
|
||||
-- @param #int int
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
-- @return Label#Label ret (return value: cc.Label)
|
||||
|
||||
--------------------------------
|
||||
|
@ -260,7 +266,7 @@
|
|||
-- @function [parent=#Label] draw
|
||||
-- @param self
|
||||
-- @param #cc.Renderer renderer
|
||||
-- @param #cc.Matrix matrix
|
||||
-- @param #matrix_table matrix
|
||||
-- @param #bool bool
|
||||
|
||||
--------------------------------
|
||||
|
@ -337,6 +343,6 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#Label] updateDisplayedColor
|
||||
-- @param self
|
||||
-- @param #color3B_table color3b
|
||||
-- @param #color3b_table color3b
|
||||
|
||||
return nil
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
-- @param #string str
|
||||
-- @param #float float
|
||||
-- @param #cc.TextHAlignment texthalignment
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
|
@ -63,7 +63,7 @@
|
|||
-- @function [parent=#LabelBMFont] setFntFile
|
||||
-- @param self
|
||||
-- @param #string str
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#LabelBMFont] setAlignment
|
||||
|
@ -78,7 +78,7 @@
|
|||
--------------------------------
|
||||
-- overload function: create()
|
||||
--
|
||||
-- overload function: create(string, string, float, cc.TextHAlignment, array_table)
|
||||
-- overload function: create(string, string, float, cc.TextHAlignment, vector2_table)
|
||||
--
|
||||
-- @function [parent=#LabelBMFont] create
|
||||
-- @param self
|
||||
|
@ -86,7 +86,7 @@
|
|||
-- @param #string str
|
||||
-- @param #float float
|
||||
-- @param #cc.TextHAlignment texthalignment
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
-- @return LabelBMFont#LabelBMFont ret (retunr value: cc.LabelBMFont)
|
||||
|
||||
--------------------------------
|
||||
|
@ -102,7 +102,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#LabelBMFont] setColor
|
||||
-- @param self
|
||||
-- @param #color3B_table color3b
|
||||
-- @param #color3b_table color3b
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#LabelBMFont] getChildByTag
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#LabelTTF] setFontFillColor
|
||||
-- @param self
|
||||
-- @param #color3B_table color3b
|
||||
-- @param #color3b_table color3b
|
||||
-- @param #bool bool
|
||||
|
||||
--------------------------------
|
||||
|
@ -88,7 +88,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#LabelTTF] enableStroke
|
||||
-- @param self
|
||||
-- @param #color3B_table color3b
|
||||
-- @param #color3b_table color3b
|
||||
-- @param #float float
|
||||
-- @param #bool bool
|
||||
|
||||
|
|
|
@ -20,15 +20,15 @@
|
|||
-- @param #float float
|
||||
|
||||
--------------------------------
|
||||
-- overload function: create(color4B_table, float, float)
|
||||
-- overload function: create(color4b_table, float, float)
|
||||
--
|
||||
-- overload function: create()
|
||||
--
|
||||
-- overload function: create(color4B_table)
|
||||
-- overload function: create(color4b_table)
|
||||
--
|
||||
-- @function [parent=#LayerColor] create
|
||||
-- @param self
|
||||
-- @param #color4B_table color4b
|
||||
-- @param #color4b_table color4b
|
||||
-- @param #float float
|
||||
-- @param #float float
|
||||
-- @return LayerColor#LayerColor ret (retunr value: cc.LayerColor)
|
||||
|
@ -37,7 +37,7 @@
|
|||
-- @function [parent=#LayerColor] draw
|
||||
-- @param self
|
||||
-- @param #cc.Renderer renderer
|
||||
-- @param #cc.Matrix matrix
|
||||
-- @param #matrix_table matrix
|
||||
-- @param #bool bool
|
||||
|
||||
--------------------------------
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#LayerGradient] getStartColor
|
||||
-- @param self
|
||||
-- @return color3B_table#color3B_table ret (return value: color3B_table)
|
||||
-- @return color3b_table#color3b_table ret (return value: color3b_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#LayerGradient] isCompressedInterpolation
|
||||
|
@ -21,7 +21,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#LayerGradient] setVector
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#LayerGradient] setStartOpacity
|
||||
|
@ -41,17 +41,17 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#LayerGradient] getVector
|
||||
-- @param self
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
-- @return vector2_table#vector2_table ret (return value: vector2_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#LayerGradient] setEndColor
|
||||
-- @param self
|
||||
-- @param #color3B_table color3b
|
||||
-- @param #color3b_table color3b
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#LayerGradient] getEndColor
|
||||
-- @param self
|
||||
-- @return color3B_table#color3B_table ret (return value: color3B_table)
|
||||
-- @return color3b_table#color3b_table ret (return value: color3b_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#LayerGradient] getEndOpacity
|
||||
|
@ -61,20 +61,20 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#LayerGradient] setStartColor
|
||||
-- @param self
|
||||
-- @param #color3B_table color3b
|
||||
-- @param #color3b_table color3b
|
||||
|
||||
--------------------------------
|
||||
-- overload function: create(color4B_table, color4B_table)
|
||||
-- overload function: create(color4b_table, color4b_table)
|
||||
--
|
||||
-- overload function: create()
|
||||
--
|
||||
-- overload function: create(color4B_table, color4B_table, array_table)
|
||||
-- overload function: create(color4b_table, color4b_table, vector2_table)
|
||||
--
|
||||
-- @function [parent=#LayerGradient] create
|
||||
-- @param self
|
||||
-- @param #color4B_table color4b
|
||||
-- @param #color4B_table color4b
|
||||
-- @param #array_table array
|
||||
-- @param #color4b_table color4b
|
||||
-- @param #color4b_table color4b
|
||||
-- @param #vector2_table array
|
||||
-- @return LayerGradient#LayerGradient ret (retunr value: cc.LayerGradient)
|
||||
|
||||
--------------------------------
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#Layout] setBackGroundColorVector
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Layout] setClippingType
|
||||
|
@ -18,21 +18,31 @@
|
|||
-- @param self
|
||||
-- @param #ccui.LayoutBackGroundColorType layoutbackgroundcolortype
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Layout] setLoopFocus
|
||||
-- @param self
|
||||
-- @param #bool bool
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Layout] setBackGroundImageColor
|
||||
-- @param self
|
||||
-- @param #color3B_table color3b
|
||||
-- @param #color3b_table color3b
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Layout] getBackGroundColorVector
|
||||
-- @param self
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
-- @return vector2_table#vector2_table ret (return value: vector2_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Layout] getClippingType
|
||||
-- @param self
|
||||
-- @return LayoutClippingType#LayoutClippingType ret (return value: ccui.LayoutClippingType)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Layout] isLoopFocus
|
||||
-- @param self
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Layout] removeBackGroundImage
|
||||
-- @param self
|
||||
|
@ -59,14 +69,14 @@
|
|||
-- @param #ccui.TextureResType texturerestype
|
||||
|
||||
--------------------------------
|
||||
-- overload function: setBackGroundColor(color3B_table, color3B_table)
|
||||
-- overload function: setBackGroundColor(color3b_table, color3b_table)
|
||||
--
|
||||
-- overload function: setBackGroundColor(color3B_table)
|
||||
-- overload function: setBackGroundColor(color3b_table)
|
||||
--
|
||||
-- @function [parent=#Layout] setBackGroundColor
|
||||
-- @param self
|
||||
-- @param #color3B_table color3b
|
||||
-- @param #color3B_table color3b
|
||||
-- @param #color3b_table color3b
|
||||
-- @param #color3b_table color3b
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Layout] requestDoLayout
|
||||
|
@ -80,7 +90,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#Layout] getBackGroundColor
|
||||
-- @param self
|
||||
-- @return color3B_table#color3B_table ret (return value: color3B_table)
|
||||
-- @return color3b_table#color3b_table ret (return value: color3b_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Layout] setClippingEnabled
|
||||
|
@ -90,7 +100,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#Layout] getBackGroundImageColor
|
||||
-- @param self
|
||||
-- @return color3B_table#color3B_table ret (return value: color3B_table)
|
||||
-- @return color3b_table#color3b_table ret (return value: color3b_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Layout] isBackGroundImageScale9Enabled
|
||||
|
@ -105,7 +115,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#Layout] getBackGroundEndColor
|
||||
-- @param self
|
||||
-- @return color3B_table#color3B_table ret (return value: color3B_table)
|
||||
-- @return color3b_table#color3b_table ret (return value: color3b_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Layout] setBackGroundColorOpacity
|
||||
|
@ -117,6 +127,11 @@
|
|||
-- @param self
|
||||
-- @return unsigned char#unsigned char ret (return value: unsigned char)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Layout] isPassFocusToChild
|
||||
-- @param self
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Layout] setBackGroundImageCapInsets
|
||||
-- @param self
|
||||
|
@ -132,10 +147,15 @@
|
|||
-- @param self
|
||||
-- @return LayoutType#LayoutType ret (return value: ccui.LayoutType)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Layout] setPassFocusToChild
|
||||
-- @param self
|
||||
-- @param #bool bool
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Layout] getBackGroundStartColor
|
||||
-- @param self
|
||||
-- @return color3B_table#color3B_table ret (return value: color3B_table)
|
||||
-- @return color3b_table#color3b_table ret (return value: color3b_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Layout] setBackGroundImageScale9Enabled
|
||||
|
@ -188,6 +208,13 @@
|
|||
-- @function [parent=#Layout] sortAllChildren
|
||||
-- @param self
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Layout] findNextFocusedWidget
|
||||
-- @param self
|
||||
-- @param #ccui.FocusDirection focusdirection
|
||||
-- @param #ccui.Widget widget
|
||||
-- @return Widget#Widget ret (return value: ccui.Widget)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Layout] removeChild
|
||||
-- @param self
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#Lens3D] setPosition
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Lens3D] setConcave
|
||||
|
@ -21,7 +21,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#Lens3D] getPosition
|
||||
-- @param self
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
-- @return vector2_table#vector2_table ret (return value: vector2_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Lens3D] getLensEffect
|
||||
|
@ -33,7 +33,7 @@
|
|||
-- @param self
|
||||
-- @param #float float
|
||||
-- @param #size_table size
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
-- @param #float float
|
||||
-- @return Lens3D#Lens3D ret (return value: cc.Lens3D)
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#MenuItemLabel] getDisabledColor
|
||||
-- @param self
|
||||
-- @return color3B_table#color3B_table ret (return value: color3B_table)
|
||||
-- @return color3b_table#color3b_table ret (return value: color3b_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#MenuItemLabel] setString
|
||||
|
@ -21,7 +21,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#MenuItemLabel] setDisabledColor
|
||||
-- @param self
|
||||
-- @param #color3B_table color3b
|
||||
-- @param #color3b_table color3b
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#MenuItemLabel] getLabel
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#MotionStreak] tintWithColor
|
||||
-- @param self
|
||||
-- @param #color3B_table color3b
|
||||
-- @param #color3b_table color3b
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#MotionStreak] setStartingPositionInitialized
|
||||
|
@ -43,16 +43,16 @@
|
|||
-- @param #bool bool
|
||||
|
||||
--------------------------------
|
||||
-- overload function: create(float, float, float, color3B_table, cc.Texture2D)
|
||||
-- overload function: create(float, float, float, color3b_table, cc.Texture2D)
|
||||
--
|
||||
-- overload function: create(float, float, float, color3B_table, string)
|
||||
-- overload function: create(float, float, float, color3b_table, string)
|
||||
--
|
||||
-- @function [parent=#MotionStreak] create
|
||||
-- @param self
|
||||
-- @param #float float
|
||||
-- @param #float float
|
||||
-- @param #float float
|
||||
-- @param #color3B_table color3b
|
||||
-- @param #color3b_table color3b
|
||||
-- @param #string str
|
||||
-- @return MotionStreak#MotionStreak ret (retunr value: cc.MotionStreak)
|
||||
|
||||
|
@ -99,7 +99,7 @@
|
|||
--------------------------------
|
||||
-- overload function: setPosition(float, float)
|
||||
--
|
||||
-- overload function: setPosition(array_table)
|
||||
-- overload function: setPosition(vector2_table)
|
||||
--
|
||||
-- @function [parent=#MotionStreak] setPosition
|
||||
-- @param self
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
-- @function [parent=#MoveBy] create
|
||||
-- @param self
|
||||
-- @param #float float
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
-- @return MoveBy#MoveBy ret (return value: cc.MoveBy)
|
||||
|
||||
--------------------------------
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
-- @function [parent=#MoveTo] create
|
||||
-- @param self
|
||||
-- @param #float float
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
-- @return MoveTo#MoveTo ret (return value: cc.MoveTo)
|
||||
|
||||
--------------------------------
|
||||
|
|
|
@ -72,8 +72,8 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#Node] convertToWorldSpaceAR
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
-- @param #vector2_table array
|
||||
-- @return vector2_table#vector2_table ret (return value: vector2_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Node] isIgnoreAnchorPointForPosition
|
||||
|
@ -132,12 +132,12 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#Node] getNodeToWorldTransform
|
||||
-- @param self
|
||||
-- @return Matrix#Matrix ret (return value: cc.Matrix)
|
||||
-- @return matrix_table#matrix_table ret (return value: matrix_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Node] getPosition3D
|
||||
-- @param self
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
-- @return vector3_table#vector3_table ret (return value: vector3_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Node] removeChild
|
||||
|
@ -148,8 +148,8 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#Node] convertToWorldSpace
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
-- @param #vector2_table array
|
||||
-- @return vector2_table#vector2_table ret (return value: vector2_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Node] getScene
|
||||
|
@ -180,7 +180,7 @@
|
|||
-- @function [parent=#Node] convertTouchToNodeSpace
|
||||
-- @param self
|
||||
-- @param #cc.Touch touch
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
-- @return vector2_table#vector2_table ret (return value: vector2_table)
|
||||
|
||||
--------------------------------
|
||||
-- overload function: removeAllChildrenWithCleanup(bool)
|
||||
|
@ -209,24 +209,24 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#Node] getRotation3D
|
||||
-- @param self
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
-- @return vector3_table#vector3_table ret (return value: vector3_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Node] getNodeToParentTransform
|
||||
-- @param self
|
||||
-- @return Matrix#Matrix ret (return value: cc.Matrix)
|
||||
-- @return matrix_table#matrix_table ret (return value: matrix_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Node] convertTouchToNodeSpaceAR
|
||||
-- @param self
|
||||
-- @param #cc.Touch touch
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
-- @return vector2_table#vector2_table ret (return value: vector2_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Node] convertToNodeSpace
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
-- @param #vector2_table array
|
||||
-- @return vector2_table#vector2_table ret (return value: vector2_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Node] resume
|
||||
|
@ -240,7 +240,7 @@
|
|||
--------------------------------
|
||||
-- overload function: setPosition(float, float)
|
||||
--
|
||||
-- overload function: setPosition(array_table)
|
||||
-- overload function: setPosition(vector2_table)
|
||||
--
|
||||
-- @function [parent=#Node] setPosition
|
||||
-- @param self
|
||||
|
@ -271,7 +271,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#Node] setRotation3D
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @param #vector3_table array
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Node] setPositionX
|
||||
|
@ -281,12 +281,12 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#Node] setNodeToParentTransform
|
||||
-- @param self
|
||||
-- @param #cc.Matrix matrix
|
||||
-- @param #matrix_table matrix
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Node] getAnchorPoint
|
||||
-- @param self
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
-- @return vector2_table#vector2_table ret (return value: vector2_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Node] getNumberOfRunningActions
|
||||
|
@ -310,8 +310,8 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#Node] convertToNodeSpaceAR
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
-- @param #vector2_table array
|
||||
-- @return vector2_table#vector2_table ret (return value: vector2_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Node] addComponent
|
||||
|
@ -332,7 +332,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#Node] getAnchorPointInPoints
|
||||
-- @param self
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
-- @return vector2_table#vector2_table ret (return value: vector2_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Node] runAction
|
||||
|
@ -362,7 +362,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#Node] getDisplayedColor
|
||||
-- @param self
|
||||
-- @return color3B_table#color3B_table ret (return value: color3B_table)
|
||||
-- @return color3b_table#color3b_table ret (return value: color3b_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Node] getActionByTag
|
||||
|
@ -373,11 +373,11 @@
|
|||
--------------------------------
|
||||
-- overload function: setAdditionalTransform(cc.AffineTransform)
|
||||
--
|
||||
-- overload function: setAdditionalTransform(cc.Matrix)
|
||||
-- overload function: setAdditionalTransform(matrix_table)
|
||||
--
|
||||
-- @function [parent=#Node] setAdditionalTransform
|
||||
-- @param self
|
||||
-- @param #cc.Matrix matrix
|
||||
-- @param #matrix_table matrix
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Node] getDisplayedOpacity
|
||||
|
@ -416,7 +416,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#Node] setColor
|
||||
-- @param self
|
||||
-- @param #color3B_table color3b
|
||||
-- @param #color3b_table color3b
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Node] isRunning
|
||||
|
@ -461,7 +461,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#Node] updateDisplayedColor
|
||||
-- @param self
|
||||
-- @param #color3B_table color3b
|
||||
-- @param #color3b_table color3b
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Node] setVisible
|
||||
|
@ -471,7 +471,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#Node] getParentToNodeTransform
|
||||
-- @param self
|
||||
-- @return Matrix#Matrix ret (return value: cc.Matrix)
|
||||
-- @return matrix_table#matrix_table ret (return value: matrix_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Node] setGlobalZOrder
|
||||
|
@ -552,7 +552,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#Node] getColor
|
||||
-- @param self
|
||||
-- @return color3B_table#color3B_table ret (return value: color3B_table)
|
||||
-- @return color3b_table#color3b_table ret (return value: color3b_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Node] getBoundingBox
|
||||
|
@ -572,12 +572,12 @@
|
|||
--------------------------------
|
||||
-- overload function: draw()
|
||||
--
|
||||
-- overload function: draw(cc.Renderer, cc.Matrix, bool)
|
||||
-- overload function: draw(cc.Renderer, matrix_table, bool)
|
||||
--
|
||||
-- @function [parent=#Node] draw
|
||||
-- @param self
|
||||
-- @param #cc.Renderer renderer
|
||||
-- @param #cc.Matrix matrix
|
||||
-- @param #matrix_table matrix
|
||||
-- @param #bool bool
|
||||
|
||||
--------------------------------
|
||||
|
@ -597,7 +597,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#Node] setPosition3D
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @param #vector3_table array
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Node] update
|
||||
|
@ -611,7 +611,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#Node] getWorldToNodeTransform
|
||||
-- @param self
|
||||
-- @return Matrix#Matrix ret (return value: cc.Matrix)
|
||||
-- @return matrix_table#matrix_table ret (return value: matrix_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#Node] getScale
|
||||
|
|
|
@ -3,22 +3,13 @@
|
|||
-- @module ParallaxNode
|
||||
-- @extend Node
|
||||
|
||||
--------------------------------
|
||||
-- overload function: getParallaxArray()
|
||||
--
|
||||
-- overload function: getParallaxArray()
|
||||
--
|
||||
-- @function [parent=#ParallaxNode] getParallaxArray
|
||||
-- @param self
|
||||
-- @return _ccArray#_ccArray ret (retunr value: cc._ccArray)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ParallaxNode] addChild
|
||||
-- @param self
|
||||
-- @param #cc.Node node
|
||||
-- @param #int int
|
||||
-- @param #array_table array
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
-- @param #vector2_table array
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ParallaxNode] removeAllChildrenWithCleanup
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
-- @function [parent=#ParticleBatchNode] draw
|
||||
-- @param self
|
||||
-- @param #cc.Renderer renderer
|
||||
-- @param #cc.Matrix matrix
|
||||
-- @param #matrix_table matrix
|
||||
-- @param #bool bool
|
||||
|
||||
--------------------------------
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#ParticleSystem] getStartColor
|
||||
-- @param self
|
||||
-- @return color4F_table#color4F_table ret (return value: color4F_table)
|
||||
-- @return color4f_table#color4f_table ret (return value: color4f_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ParticleSystem] getPositionType
|
||||
|
@ -36,7 +36,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#ParticleSystem] setPosVar
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ParticleSystem] getEndSpin
|
||||
|
@ -106,7 +106,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#ParticleSystem] getGravity
|
||||
-- @param self
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
-- @return vector2_table#vector2_table ret (return value: vector2_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ParticleSystem] getTangentialAccel
|
||||
|
@ -131,7 +131,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#ParticleSystem] setEndColor
|
||||
-- @param self
|
||||
-- @param #color4F_table color4f
|
||||
-- @param #color4f_table color4f
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ParticleSystem] setStartSpin
|
||||
|
@ -151,7 +151,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#ParticleSystem] getPosVar
|
||||
-- @param self
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
-- @return vector2_table#vector2_table ret (return value: vector2_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ParticleSystem] updateWithNoTime
|
||||
|
@ -179,7 +179,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#ParticleSystem] getSourcePosition
|
||||
-- @param self
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
-- @return vector2_table#vector2_table ret (return value: vector2_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ParticleSystem] setLifeVar
|
||||
|
@ -194,13 +194,13 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#ParticleSystem] setEndColorVar
|
||||
-- @param self
|
||||
-- @param #color4F_table color4f
|
||||
-- @param #color4f_table color4f
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ParticleSystem] updateQuadWithParticle
|
||||
-- @param self
|
||||
-- @param #cc.sParticle sparticle
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ParticleSystem] getAtlasIndex
|
||||
|
@ -294,7 +294,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#ParticleSystem] setSourcePosition
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ParticleSystem] getEndSpinVar
|
||||
|
@ -359,7 +359,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#ParticleSystem] setStartColor
|
||||
-- @param self
|
||||
-- @param #color4F_table color4f
|
||||
-- @param #color4f_table color4f
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ParticleSystem] getRotatePerSecondVar
|
||||
|
@ -389,7 +389,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#ParticleSystem] setGravity
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ParticleSystem] postStep
|
||||
|
@ -403,7 +403,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#ParticleSystem] getEndColorVar
|
||||
-- @param self
|
||||
-- @return color4F_table#color4F_table ret (return value: color4F_table)
|
||||
-- @return color4f_table#color4f_table ret (return value: color4f_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ParticleSystem] getRotationIsDir
|
||||
|
@ -423,7 +423,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#ParticleSystem] getEndColor
|
||||
-- @param self
|
||||
-- @return color4F_table#color4F_table ret (return value: color4F_table)
|
||||
-- @return color4f_table#color4f_table ret (return value: color4f_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ParticleSystem] getLifeVar
|
||||
|
@ -463,7 +463,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#ParticleSystem] setStartColorVar
|
||||
-- @param self
|
||||
-- @param #color4F_table color4f
|
||||
-- @param #color4f_table color4f
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ParticleSystem] setEndSpin
|
||||
|
@ -498,7 +498,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#ParticleSystem] getStartColorVar
|
||||
-- @param self
|
||||
-- @return color4F_table#color4F_table ret (return value: color4F_table)
|
||||
-- @return color4f_table#color4f_table ret (return value: color4f_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#ParticleSystem] create
|
||||
|
|
|
@ -48,14 +48,14 @@
|
|||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
-- overload function: applyImpulse(array_table, array_table)
|
||||
-- overload function: applyImpulse(vector2_table, vector2_table)
|
||||
--
|
||||
-- overload function: applyImpulse(array_table)
|
||||
-- overload function: applyImpulse(vector2_table)
|
||||
--
|
||||
-- @function [parent=#PhysicsBody] applyImpulse
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
-- @param #vector2_table array
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#PhysicsBody] setRotationOffset
|
||||
|
@ -63,14 +63,14 @@
|
|||
-- @param #float float
|
||||
|
||||
--------------------------------
|
||||
-- overload function: applyForce(array_table, array_table)
|
||||
-- overload function: applyForce(vector2_table, vector2_table)
|
||||
--
|
||||
-- overload function: applyForce(array_table)
|
||||
-- overload function: applyForce(vector2_table)
|
||||
--
|
||||
-- @function [parent=#PhysicsBody] applyForce
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
-- @param #vector2_table array
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#PhysicsBody] addShape
|
||||
|
@ -97,7 +97,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#PhysicsBody] getVelocity
|
||||
-- @param self
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
-- @return vector2_table#vector2_table ret (return value: vector2_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#PhysicsBody] getLinearDamping
|
||||
|
@ -126,7 +126,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#PhysicsBody] getPositionOffset
|
||||
-- @param self
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
-- @return vector2_table#vector2_table ret (return value: vector2_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#PhysicsBody] setCategoryBitmask
|
||||
|
@ -146,7 +146,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#PhysicsBody] getPosition
|
||||
-- @param self
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
-- @return vector2_table#vector2_table ret (return value: vector2_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#PhysicsBody] setEnable
|
||||
|
@ -176,8 +176,8 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#PhysicsBody] local2World
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
-- @param #vector2_table array
|
||||
-- @return vector2_table#vector2_table ret (return value: vector2_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#PhysicsBody] getCategoryBitmask
|
||||
|
@ -212,8 +212,8 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#PhysicsBody] world2Local
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
-- @param #vector2_table array
|
||||
-- @return vector2_table#vector2_table ret (return value: vector2_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#PhysicsBody] isEnabled
|
||||
|
@ -243,7 +243,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#PhysicsBody] setVelocity
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#PhysicsBody] setLinearDamping
|
||||
|
@ -258,7 +258,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#PhysicsBody] setPositionOffset
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#PhysicsBody] setRotationEnable
|
||||
|
@ -278,8 +278,8 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#PhysicsBody] getVelocityAtLocalPoint
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
-- @param #vector2_table array
|
||||
-- @return vector2_table#vector2_table ret (return value: vector2_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#PhysicsBody] isResting
|
||||
|
@ -305,8 +305,8 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#PhysicsBody] getVelocityAtWorldPoint
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
-- @param #vector2_table array
|
||||
-- @return vector2_table#vector2_table ret (return value: vector2_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#PhysicsBody] setContactTestBitmask
|
||||
|
@ -332,14 +332,14 @@
|
|||
-- @param self
|
||||
-- @param #size_table size
|
||||
-- @param #cc.PhysicsMaterial physicsmaterial
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
-- @return PhysicsBody#PhysicsBody ret (return value: cc.PhysicsBody)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#PhysicsBody] createEdgeSegment
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
-- @param #vector2_table array
|
||||
-- @param #cc.PhysicsMaterial physicsmaterial
|
||||
-- @param #float float
|
||||
-- @return PhysicsBody#PhysicsBody ret (return value: cc.PhysicsBody)
|
||||
|
@ -363,7 +363,7 @@
|
|||
-- @param #size_table size
|
||||
-- @param #cc.PhysicsMaterial physicsmaterial
|
||||
-- @param #float float
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
-- @return PhysicsBody#PhysicsBody ret (return value: cc.PhysicsBody)
|
||||
|
||||
--------------------------------
|
||||
|
@ -371,7 +371,7 @@
|
|||
-- @param self
|
||||
-- @param #float float
|
||||
-- @param #cc.PhysicsMaterial physicsmaterial
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
-- @return PhysicsBody#PhysicsBody ret (return value: cc.PhysicsBody)
|
||||
|
||||
return nil
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#PhysicsContactPostSolve] getSurfaceVelocity
|
||||
-- @param self
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
-- @return vector2_table#vector2_table ret (return value: vector2_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#PhysicsContactPostSolve] getRestitution
|
||||
|
|
|
@ -24,12 +24,12 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#PhysicsContactPreSolve] getSurfaceVelocity
|
||||
-- @param self
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
-- @return vector2_table#vector2_table ret (return value: vector2_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#PhysicsContactPreSolve] setSurfaceVelocity
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#PhysicsContactPreSolve] setRestitution
|
||||
|
|
|
@ -18,8 +18,8 @@
|
|||
-- @param self
|
||||
-- @param #cc.PhysicsBody physicsbody
|
||||
-- @param #cc.PhysicsBody physicsbody
|
||||
-- @param #array_table array
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
-- @param #vector2_table array
|
||||
-- @return PhysicsJointDistance#PhysicsJointDistance ret (return value: cc.PhysicsJointDistance)
|
||||
|
||||
return nil
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
-- @param self
|
||||
-- @param #cc.PhysicsBody physicsbody
|
||||
-- @param #cc.PhysicsBody physicsbody
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
-- @return PhysicsJointFixed#PhysicsJointFixed ret (return value: cc.PhysicsJointFixed)
|
||||
|
||||
return nil
|
||||
|
|
|
@ -6,41 +6,41 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#PhysicsJointGroove] setAnchr2
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#PhysicsJointGroove] setGrooveA
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#PhysicsJointGroove] setGrooveB
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#PhysicsJointGroove] getGrooveA
|
||||
-- @param self
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
-- @return vector2_table#vector2_table ret (return value: vector2_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#PhysicsJointGroove] getGrooveB
|
||||
-- @param self
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
-- @return vector2_table#vector2_table ret (return value: vector2_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#PhysicsJointGroove] getAnchr2
|
||||
-- @param self
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
-- @return vector2_table#vector2_table ret (return value: vector2_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#PhysicsJointGroove] construct
|
||||
-- @param self
|
||||
-- @param #cc.PhysicsBody physicsbody
|
||||
-- @param #cc.PhysicsBody physicsbody
|
||||
-- @param #array_table array
|
||||
-- @param #array_table array
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
-- @param #vector2_table array
|
||||
-- @param #vector2_table array
|
||||
-- @return PhysicsJointGroove#PhysicsJointGroove ret (return value: cc.PhysicsJointGroove)
|
||||
|
||||
return nil
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#PhysicsJointLimit] setAnchr2
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#PhysicsJointLimit] setAnchr1
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#PhysicsJointLimit] setMax
|
||||
|
@ -21,12 +21,12 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#PhysicsJointLimit] getAnchr2
|
||||
-- @param self
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
-- @return vector2_table#vector2_table ret (return value: vector2_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#PhysicsJointLimit] getAnchr1
|
||||
-- @param self
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
-- @return vector2_table#vector2_table ret (return value: vector2_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#PhysicsJointLimit] getMin
|
||||
|
@ -44,16 +44,16 @@
|
|||
-- @param #float float
|
||||
|
||||
--------------------------------
|
||||
-- overload function: construct(cc.PhysicsBody, cc.PhysicsBody, array_table, array_table, float, float)
|
||||
-- overload function: construct(cc.PhysicsBody, cc.PhysicsBody, vector2_table, vector2_table, float, float)
|
||||
--
|
||||
-- overload function: construct(cc.PhysicsBody, cc.PhysicsBody, array_table, array_table)
|
||||
-- overload function: construct(cc.PhysicsBody, cc.PhysicsBody, vector2_table, vector2_table)
|
||||
--
|
||||
-- @function [parent=#PhysicsJointLimit] construct
|
||||
-- @param self
|
||||
-- @param #cc.PhysicsBody physicsbody
|
||||
-- @param #cc.PhysicsBody physicsbody
|
||||
-- @param #array_table array
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
-- @param #vector2_table array
|
||||
-- @param #float float
|
||||
-- @param #float float
|
||||
-- @return PhysicsJointLimit#PhysicsJointLimit ret (retunr value: cc.PhysicsJointLimit)
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
-- @param self
|
||||
-- @param #cc.PhysicsBody physicsbody
|
||||
-- @param #cc.PhysicsBody physicsbody
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
-- @return PhysicsJointPin#PhysicsJointPin ret (return value: cc.PhysicsJointPin)
|
||||
|
||||
return nil
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#PhysicsJointSpring] setAnchr2
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#PhysicsJointSpring] setAnchr1
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#PhysicsJointSpring] getDamping
|
||||
|
@ -31,12 +31,12 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#PhysicsJointSpring] getAnchr2
|
||||
-- @param self
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
-- @return vector2_table#vector2_table ret (return value: vector2_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#PhysicsJointSpring] getAnchr1
|
||||
-- @param self
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
-- @return vector2_table#vector2_table ret (return value: vector2_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#PhysicsJointSpring] getStiffness
|
||||
|
@ -58,8 +58,8 @@
|
|||
-- @param self
|
||||
-- @param #cc.PhysicsBody physicsbody
|
||||
-- @param #cc.PhysicsBody physicsbody
|
||||
-- @param #array_table array
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
-- @param #vector2_table array
|
||||
-- @param #float float
|
||||
-- @param #float float
|
||||
-- @return PhysicsJointSpring#PhysicsJointSpring ret (return value: cc.PhysicsJointSpring)
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#PhysicsShape] containsPoint
|
||||
-- @param self
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
-- @return bool#bool ret (return value: bool)
|
||||
|
||||
--------------------------------
|
||||
|
@ -77,7 +77,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#PhysicsShape] getCenter
|
||||
-- @param self
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
-- @return vector2_table#vector2_table ret (return value: vector2_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#PhysicsShape] getDensity
|
||||
|
@ -112,7 +112,7 @@
|
|||
--------------------------------
|
||||
-- @function [parent=#PhysicsShape] getOffset
|
||||
-- @param self
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
-- @return vector2_table#vector2_table ret (return value: vector2_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#PhysicsShape] getRestitution
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
-- @param self
|
||||
-- @param #size_table size
|
||||
-- @param #cc.PhysicsMaterial physicsmaterial
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
-- @return PhysicsShapeBox#PhysicsShapeBox ret (return value: cc.PhysicsShapeBox)
|
||||
|
||||
--------------------------------
|
||||
|
@ -32,13 +32,13 @@
|
|||
-- @param self
|
||||
-- @param #float float
|
||||
-- @param #size_table size
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#PhysicsShapeBox] getOffset
|
||||
-- @param self
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
-- @return vector2_table#vector2_table ret (return value: vector2_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#PhysicsShapeBox] calculateDefaultMoment
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
-- @param self
|
||||
-- @param #float float
|
||||
-- @param #cc.PhysicsMaterial physicsmaterial
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
-- @return PhysicsShapeCircle#PhysicsShapeCircle ret (return value: cc.PhysicsShapeCircle)
|
||||
|
||||
--------------------------------
|
||||
|
@ -27,13 +27,13 @@
|
|||
-- @param self
|
||||
-- @param #float float
|
||||
-- @param #float float
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
-- @return float#float ret (return value: float)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#PhysicsShapeCircle] getOffset
|
||||
-- @param self
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
-- @return vector2_table#vector2_table ret (return value: vector2_table)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#PhysicsShapeCircle] calculateDefaultMoment
|
||||
|
|
|
@ -14,12 +14,12 @@
|
|||
-- @param #size_table size
|
||||
-- @param #cc.PhysicsMaterial physicsmaterial
|
||||
-- @param #float float
|
||||
-- @param #array_table array
|
||||
-- @param #vector2_table array
|
||||
-- @return PhysicsShapeEdgeBox#PhysicsShapeEdgeBox ret (return value: cc.PhysicsShapeEdgeBox)
|
||||
|
||||
--------------------------------
|
||||
-- @function [parent=#PhysicsShapeEdgeBox] getOffset
|
||||
-- @param self
|
||||
-- @return array_table#array_table ret (return value: array_table)
|
||||
-- @return vector2_table#vector2_table ret (return value: vector2_table)
|
||||
|
||||
return nil
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue