Merge pull request #12381 from VisualSJ/v3-aa

[ci skip]Fix some simple bug
This commit is contained in:
子龙山人 2015-06-17 15:11:08 +08:00
commit fd508a0198
6 changed files with 36 additions and 30 deletions

View File

@ -33,7 +33,7 @@ var CustomImageLayer = cc.Layer.extend({
customImageViewReader,
customImageViewReader.setProperties);
var layout = guiReader.widgetFromJsonFile("css-res/cocosui/CustomImageViewTest/NewProject_2_1.ExportJson");
var layout = guiReader.widgetFromJsonFile("ccs-res/cocosui/CustomImageViewTest/NewProject_2_1.ExportJson");
this.addChild(layout);
}
});

View File

@ -43,8 +43,8 @@ FacebookTestScene = TestScene.extend({
if(!cc.sys.isNative) { //browser
cc.loader.loadJs('', [
"../../../web/external/pluginx/platform/facebook_sdk.js",
"../../../web/external/pluginx/platform/facebook.js"
"../../web/external/pluginx/platform/facebook_sdk.js",
"../../web/external/pluginx/platform/facebook.js"
], function() {
var layer = nextFacebookTest();
self.addChild(layer);

View File

@ -55,17 +55,19 @@ UIScene = cc.Scene.extend({
this._sceneTitle = widget.getChildByName("UItest");
var label = new cc.LabelTTF("Main Menu", "Arial", 20);
var menuItem = new cc.MenuItemLabel(label, this.toExtensionsMainLayer, this);
var menu = new cc.Menu(menuItem);
menu.x = 0;
menu.y = 0;
menuItem.x = winSize.width - 50;
menuItem.y = 25;
this.addChild(menu, 1);
var back_label = widget.getChildByName("back");
if(back_label){
back_label.addTouchEventListener(this.toExtensionsMainLayer, this);
}else{
var label = new cc.LabelTTF("Back", "Arial", 20);
var menuItem = new cc.MenuItemLabel(label, this.toExtensionsMainLayer, this);
var menu = new cc.Menu(menuItem);
menu.x = 0;
menu.y = 0;
menuItem.x = winSize.width - 50;
menuItem.y = 25;
this.addChild(menu, 1);
}
var left_button = widget.getChildByName("left_Button");
left_button.addTouchEventListener(this.previousCallback ,this);

View File

@ -3,7 +3,7 @@ var UIVideoPlayerTest = UIScene.extend({
onEnter: function(){
UIScene.prototype.onEnter.call(this);
var video = new ccui.VideoPlayer("http://benchmark.cocos2d-x.org/cocosvideo.mp4");
var video = new ccui.VideoPlayer("cocosvideo.mp4");
video.setContentSize(320, 240);
video.setPosition(800/2, 450/2);
video.setScale(0.5);
@ -37,38 +37,38 @@ var UIVideoPlayerTest = UIScene.extend({
}},
{ name: "PLAYNATIVE", func: function(){
cc.log("play!");
video.setURL("res/cocosvideo.mp4");
video.setURL("cocosvideo.mp4");
video.play();
}},
{ name: "STOP", func: function(){
cc.log("stop!");
video.stop();
cc.log("stop!");
video.stop();
}},
{ name: "PAUSE", func: function(){
cc.log("pause!");
video.pause();
cc.log("pause!");
video.pause();
}},
{ name: "RESUME", func: function(){
cc.log("resume!");
video.resume();
cc.log("resume!");
video.resume();
}},
{ name: "SEEKTO", func: function(){
var sec = ((Math.random() * 3) * 100 | 0) / 100;
cc.log("seekTo %f sec!", sec);
video.seekTo(sec);
cc.log("seekTo %f sec!", sec);
video.seekTo(sec);
}},
{ name: "ISPLAYING", func: function(){
cc.log("isPlaying!");
cc.log(video.isPlaying());
cc.log("isPlaying!");
cc.log(video.isPlaying());
}},
{ name: "Full Screen", func: function(){
cc.log("setFullScreenEnabled!");
video.setFullScreenEnabled(true);
cc.log("setFullScreenEnabled!");
video.setFullScreenEnabled(true);
}},
{ name: "Scale", func: function(){
var scale = ((Math.random() * 0.5 + 0.2) * 100 | 0) / 100;
cc.log("setScale(%f)!", scale);
video.setScale(scale);
cc.log("setScale(%f)!", scale);
video.setScale(scale);
}},
{ name: "AnchorPoint 0 / 1", func: function(){
var anp = video.getAnchorPoint();

View File

@ -644,6 +644,7 @@ var SchedulerTimeScale = SchedulerTestLayer.extend({
},
onExit: function() {
cc.director.getScheduler().setTimeScale(1);
// restore scale
cc.director.getScheduler().unscheduleUpdateForTarget(this._newScheduler);
this._super();

View File

@ -1096,3 +1096,6 @@ var g_ccs2 = [
"ccs-res/cocosui/UIEditorTest/UILabelBMFont_Editor/GUI/missing-font.fnt",
"ccs-res/cocosui/UIEditorTest/UILabelBMFont_Editor/GUI/missing-font.png"
];
res.CCControlColourPickerSpriteSheet_plist = "extensions/CCControlColourPickerSpriteSheet.plist";
res.CCControlColourPickerSpriteSheet_png = "extensions/CCControlColourPickerSpriteSheet.png";