mirror of https://github.com/axmolengine/axmol.git
Merge pull request #12381 from VisualSJ/v3-aa
[ci skip]Fix some simple bug
This commit is contained in:
commit
fd508a0198
|
@ -33,7 +33,7 @@ var CustomImageLayer = cc.Layer.extend({
|
||||||
customImageViewReader,
|
customImageViewReader,
|
||||||
customImageViewReader.setProperties);
|
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);
|
this.addChild(layout);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -43,8 +43,8 @@ FacebookTestScene = TestScene.extend({
|
||||||
|
|
||||||
if(!cc.sys.isNative) { //browser
|
if(!cc.sys.isNative) { //browser
|
||||||
cc.loader.loadJs('', [
|
cc.loader.loadJs('', [
|
||||||
"../../../web/external/pluginx/platform/facebook_sdk.js",
|
"../../web/external/pluginx/platform/facebook_sdk.js",
|
||||||
"../../../web/external/pluginx/platform/facebook.js"
|
"../../web/external/pluginx/platform/facebook.js"
|
||||||
], function() {
|
], function() {
|
||||||
var layer = nextFacebookTest();
|
var layer = nextFacebookTest();
|
||||||
self.addChild(layer);
|
self.addChild(layer);
|
||||||
|
|
|
@ -55,17 +55,19 @@ UIScene = cc.Scene.extend({
|
||||||
|
|
||||||
this._sceneTitle = widget.getChildByName("UItest");
|
this._sceneTitle = widget.getChildByName("UItest");
|
||||||
|
|
||||||
|
var back_label = widget.getChildByName("back");
|
||||||
var label = new cc.LabelTTF("Main Menu", "Arial", 20);
|
if(back_label){
|
||||||
var menuItem = new cc.MenuItemLabel(label, this.toExtensionsMainLayer, this);
|
back_label.addTouchEventListener(this.toExtensionsMainLayer, this);
|
||||||
|
}else{
|
||||||
var menu = new cc.Menu(menuItem);
|
var label = new cc.LabelTTF("Back", "Arial", 20);
|
||||||
menu.x = 0;
|
var menuItem = new cc.MenuItemLabel(label, this.toExtensionsMainLayer, this);
|
||||||
menu.y = 0;
|
var menu = new cc.Menu(menuItem);
|
||||||
menuItem.x = winSize.width - 50;
|
menu.x = 0;
|
||||||
menuItem.y = 25;
|
menu.y = 0;
|
||||||
|
menuItem.x = winSize.width - 50;
|
||||||
this.addChild(menu, 1);
|
menuItem.y = 25;
|
||||||
|
this.addChild(menu, 1);
|
||||||
|
}
|
||||||
|
|
||||||
var left_button = widget.getChildByName("left_Button");
|
var left_button = widget.getChildByName("left_Button");
|
||||||
left_button.addTouchEventListener(this.previousCallback ,this);
|
left_button.addTouchEventListener(this.previousCallback ,this);
|
||||||
|
|
|
@ -3,7 +3,7 @@ var UIVideoPlayerTest = UIScene.extend({
|
||||||
onEnter: function(){
|
onEnter: function(){
|
||||||
UIScene.prototype.onEnter.call(this);
|
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.setContentSize(320, 240);
|
||||||
video.setPosition(800/2, 450/2);
|
video.setPosition(800/2, 450/2);
|
||||||
video.setScale(0.5);
|
video.setScale(0.5);
|
||||||
|
@ -37,38 +37,38 @@ var UIVideoPlayerTest = UIScene.extend({
|
||||||
}},
|
}},
|
||||||
{ name: "PLAYNATIVE", func: function(){
|
{ name: "PLAYNATIVE", func: function(){
|
||||||
cc.log("play!");
|
cc.log("play!");
|
||||||
video.setURL("res/cocosvideo.mp4");
|
video.setURL("cocosvideo.mp4");
|
||||||
video.play();
|
video.play();
|
||||||
}},
|
}},
|
||||||
{ name: "STOP", func: function(){
|
{ name: "STOP", func: function(){
|
||||||
cc.log("stop!");
|
cc.log("stop!");
|
||||||
video.stop();
|
video.stop();
|
||||||
}},
|
}},
|
||||||
{ name: "PAUSE", func: function(){
|
{ name: "PAUSE", func: function(){
|
||||||
cc.log("pause!");
|
cc.log("pause!");
|
||||||
video.pause();
|
video.pause();
|
||||||
}},
|
}},
|
||||||
{ name: "RESUME", func: function(){
|
{ name: "RESUME", func: function(){
|
||||||
cc.log("resume!");
|
cc.log("resume!");
|
||||||
video.resume();
|
video.resume();
|
||||||
}},
|
}},
|
||||||
{ name: "SEEKTO", func: function(){
|
{ name: "SEEKTO", func: function(){
|
||||||
var sec = ((Math.random() * 3) * 100 | 0) / 100;
|
var sec = ((Math.random() * 3) * 100 | 0) / 100;
|
||||||
cc.log("seekTo %f sec!", sec);
|
cc.log("seekTo %f sec!", sec);
|
||||||
video.seekTo(sec);
|
video.seekTo(sec);
|
||||||
}},
|
}},
|
||||||
{ name: "ISPLAYING", func: function(){
|
{ name: "ISPLAYING", func: function(){
|
||||||
cc.log("isPlaying!");
|
cc.log("isPlaying!");
|
||||||
cc.log(video.isPlaying());
|
cc.log(video.isPlaying());
|
||||||
}},
|
}},
|
||||||
{ name: "Full Screen", func: function(){
|
{ name: "Full Screen", func: function(){
|
||||||
cc.log("setFullScreenEnabled!");
|
cc.log("setFullScreenEnabled!");
|
||||||
video.setFullScreenEnabled(true);
|
video.setFullScreenEnabled(true);
|
||||||
}},
|
}},
|
||||||
{ name: "Scale", func: function(){
|
{ name: "Scale", func: function(){
|
||||||
var scale = ((Math.random() * 0.5 + 0.2) * 100 | 0) / 100;
|
var scale = ((Math.random() * 0.5 + 0.2) * 100 | 0) / 100;
|
||||||
cc.log("setScale(%f)!", scale);
|
cc.log("setScale(%f)!", scale);
|
||||||
video.setScale(scale);
|
video.setScale(scale);
|
||||||
}},
|
}},
|
||||||
{ name: "AnchorPoint 0 / 1", func: function(){
|
{ name: "AnchorPoint 0 / 1", func: function(){
|
||||||
var anp = video.getAnchorPoint();
|
var anp = video.getAnchorPoint();
|
||||||
|
|
|
@ -644,6 +644,7 @@ var SchedulerTimeScale = SchedulerTestLayer.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
onExit: function() {
|
onExit: function() {
|
||||||
|
cc.director.getScheduler().setTimeScale(1);
|
||||||
// restore scale
|
// restore scale
|
||||||
cc.director.getScheduler().unscheduleUpdateForTarget(this._newScheduler);
|
cc.director.getScheduler().unscheduleUpdateForTarget(this._newScheduler);
|
||||||
this._super();
|
this._super();
|
||||||
|
|
|
@ -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.fnt",
|
||||||
"ccs-res/cocosui/UIEditorTest/UILabelBMFont_Editor/GUI/missing-font.png"
|
"ccs-res/cocosui/UIEditorTest/UILabelBMFont_Editor/GUI/missing-font.png"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
res.CCControlColourPickerSpriteSheet_plist = "extensions/CCControlColourPickerSpriteSheet.plist";
|
||||||
|
res.CCControlColourPickerSpriteSheet_png = "extensions/CCControlColourPickerSpriteSheet.png";
|
Loading…
Reference in New Issue