Skip to content

Commit

Permalink
merge Merge branch 'master' of https://github.com/cocos2d/cocos2d-js
Browse files Browse the repository at this point in the history
  • Loading branch information
chuanweizhang2013 committed Mar 11, 2014
2 parents 598380f + 9e05b35 commit 8d624f8
Show file tree
Hide file tree
Showing 12 changed files with 466 additions and 25 deletions.
2 changes: 1 addition & 1 deletion frameworks/cocos2d-html5
Submodule cocos2d-html5 updated 61 files
+71 −122 CCBoot.js
+0 −12 cocos2d/actions/CCAction.js
+1 −1 cocos2d/actions3d/CCActionGrid.js
+2 −2 cocos2d/actions3d/CCActionGrid3D.js
+1 −3 cocos2d/clipping-nodes/CCClippingNode.js
+2 −2 cocos2d/core/CCConfiguration.js
+18 −43 cocos2d/core/CCDirector.js
+8 −9 cocos2d/core/base-nodes/CCAtlasNode.js
+8 −11 cocos2d/core/base-nodes/CCNode.js
+15 −13 cocos2d/core/event-manager/CCEventListener.js
+2 −2 cocos2d/core/event-manager/CCEventManager.js
+6 −4 cocos2d/core/labelttf/CCLabelTTF.js
+4 −2 cocos2d/core/layers/CCLayer.js
+35 −25 cocos2d/core/platform/CCEGLView.js
+15 −5 cocos2d/core/platform/CCInputManager.js
+2 −2 cocos2d/core/platform/CCScreen.js
+0 −12 cocos2d/core/platform/CCTypes.js
+1 −1 cocos2d/core/platform/miniFramework.js
+2 −2 cocos2d/core/sprites/CCAnimationCache.js
+21 −14 cocos2d/core/sprites/CCSprite.js
+15 −4 cocos2d/core/sprites/CCSpriteBatchNode.js
+2 −2 cocos2d/core/sprites/CCSpriteFrameCache.js
+7 −156 cocos2d/core/textures/CCTexture2D.js
+0 −3 cocos2d/core/textures/CCTextureAtlas.js
+3 −3 cocos2d/core/textures/CCTextureCache.js
+3 −1 cocos2d/labels/CCLabelAtlas.js
+0 −1 cocos2d/menus/CCMenu.js
+4 −5 cocos2d/menus/CCMenuItem.js
+0 −8 cocos2d/motion-streak/CCMotionStreak.js
+0 −1 cocos2d/parallax/CCParallaxNode.js
+0 −4 cocos2d/particle/CCParticleBatchNode.js
+18 −7 cocos2d/particle/CCTIFFReader.js
+1 −2 cocos2d/physics/CCPhysicsDebugNode.js
+7 −1 cocos2d/progress-timer/CCProgressTimer.js
+11 −8 cocos2d/render-texture/CCRenderTexture.js
+2 −2 cocos2d/shaders/CCShaderCache.js
+4 −33 cocos2d/shape-nodes/CCDrawNode.js
+1 −6 cocos2d/text-input/CCTextFieldTTF.js
+0 −9 cocos2d/tilemap/CCTMXLayer.js
+4 −10 cocos2d/tilemap/CCTMXObjectGroup.js
+7 −17 cocos2d/tilemap/CCTMXTiledMap.js
+0 −16 cocos2d/tilemap/CCTMXXMLParser.js
+0 −1 cocos2d/tilemap/CCTileMapAtlas.js
+1 −1 cocos2d/transitions/CCTransitionPageTurn.js
+15 −14 extensions/ccui/base-classes/UIWidget.js
+4 −4 extensions/ccui/layouts/UILayout.js
+3 −2 extensions/ccui/system/UIHelper.js
+4 −26 extensions/ccui/uiwidgets/UIButton.js
+0 −16 extensions/ccui/uiwidgets/UICheckBox.js
+1 −1 extensions/ccui/uiwidgets/UILoadingBar.js
+1 −1 extensions/ccui/uiwidgets/UIText.js
+1 −1 extensions/ccui/uiwidgets/UITextAtlas.js
+1 −1 extensions/ccui/uiwidgets/UITextBMFont.js
+3 −3 extensions/ccui/uiwidgets/scroll-widget/UIListView.js
+2 −2 extensions/ccui/uiwidgets/scroll-widget/UIPageView.js
+1 −1 extensions/cocostudio/action/CCActionManager.js
+1 −1 extensions/cocostudio/armature/utils/CCArmatureDataManager.js
+10 −8 extensions/cocostudio/reader/GUIReader.js
+3 −3 extensions/cocostudio/reader/SceneReader.js
+2 −2 moduleConfig.json
+224 −221 tools/jsdoc_toolkit/build.xml
2 changes: 2 additions & 0 deletions frameworks/js-bindings/bindings/manual/ScriptingCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,8 @@ bool ScriptingCore::evalString(const char *string, jsval *outVal, const char *fi
void ScriptingCore::start() {
// for now just this
this->createGlobalContext();

ScriptingCore::getInstance()->runScript("jsb_boot.js");
}

void ScriptingCore::addRegisterCallback(sc_register_sth callback) {
Expand Down
10 changes: 10 additions & 0 deletions frameworks/js-bindings/bindings/script/jsb_boot.js
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,16 @@ cc.defineGetterSetter(cc.loader, "audioPath", function(){
cc.director = cc.Director.getInstance();
cc.winSize = cc.director.getWinSize();
cc.view = cc.director.getOpenGLView();
cc.view.getDevicePixelRatio = function () {
var sys = cc.sys;
return (sys.os == sys.OS_IOS || sys.os == sys.OS_OSX) ? 2 : 1;
};
cc.view.enableRetina = function(enabled) {};
cc.view.isRetinaEnabled = function() {
var sys = cc.sys;
return (sys.os == sys.OS_IOS || sys.os == sys.OS_OSX) ? true : false;
};

cc.eventManager = cc.director.getEventDispatcher();
cc.audioEngine = cc.AudioEngine.getInstance();
cc.audioEngine.end = function(){
Expand Down
2 changes: 0 additions & 2 deletions samples/js-moonwarriors/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@
<file name="core/CCScheduler.js"/>
<file name="core/CCLoader.js"/>
<!--<file name="core/CCDrawingPrimitives.js"/> -->
<file name="core/platform/CCApplication.js"/>
<file name="core/platform/CCSAXParser.js"/>
<file name="core/platform/AppControl.js"/>
<file name="core/labelTTF/CCLabelTTF.js"/>
<file name="core/CCActionManager.js"/>
<!--<file name="kazmath/utility.js"/>
Expand Down
1 change: 0 additions & 1 deletion samples/js-tests/project/Classes/AppDelegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ bool AppDelegate::applicationDidFinishLaunching()
auto pEngine = ScriptingCore::getInstance();
ScriptEngineManager::getInstance()->setScriptEngine(pEngine);

ScriptingCore::getInstance()->runScript("jsb_boot.js");
ScriptingCore::getInstance()->runScript("main.js");

return true;
Expand Down
1 change: 0 additions & 1 deletion samples/js-tests/src/CocoStudioTest/GUITest/UISceneTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ var GuiTestMainLayer = cc.Layer.extend({
touchEvent:function(sender,type){
if(type==ccui.Widget.TOUCH_ENDED){
var tag = sender.tag;
console.log(tag);
var scene = cc.Scene.create();
var guiTest = s_GuiTestEditorArray[tag];
scene.addChild(guiTest.layer());
Expand Down
Loading

0 comments on commit 8d624f8

Please sign in to comment.