зеркало из https://github.com/microsoft/cocos2d-x.git
fixed #1258, all js test cases passed.
This commit is contained in:
Родитель
2187c88ab9
Коммит
fecab7f3b1
4
AUTHORS
4
AUTHORS
|
@ -8,6 +8,10 @@ Core Developers:
|
|||
JianHua Chen (Dumganhar)
|
||||
|
||||
Developers:
|
||||
Ricardo Quesada
|
||||
Rolando Abarca
|
||||
Javascript Binding and testjs
|
||||
|
||||
XiaoLong Zhang (Chukong Inc)
|
||||
Mike McGary (Zynga)
|
||||
Di Wu
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
SpiderMonkey is Mozilla's JavaScript engine written in C/C++. It is used in various Mozilla products, including Firefox, and is available under MPL/GPL/LGPL tri-license.
|
||||
(from https://developer.mozilla.org/en/SpiderMonkey)
|
||||
|
||||
--------
|
||||
|
||||
Please see the file toolkit/content/license.html for the copyright licensing
|
||||
conditions attached to this codebase, including copies of the licenses
|
||||
concerned.
|
||||
|
||||
You are not granted rights or licenses to the trademarks of the
|
||||
Mozilla Foundation or any party, including without limitation the
|
||||
Firefox name or logo.
|
||||
|
||||
For more information, see: http://www.mozilla.org/foundation/licensing.html
|
|
@ -9,7 +9,7 @@
|
|||
#include "AppDelegate.h"
|
||||
|
||||
#include "cocos2d.h"
|
||||
// #include "simple_native_generated.hpp"
|
||||
#include "simple_native_generated.hpp"
|
||||
|
||||
USING_NS_CC;
|
||||
|
||||
|
@ -100,6 +100,7 @@ bool AppDelegate::applicationDidFinishLaunching()
|
|||
S_SimpleNativeClass::jsCreateClass(cx, obj, "SimpleNativeClass");
|
||||
S_AnotherClass::jsCreateClass(cx, obj, "AnotherClass");
|
||||
register_enums_simple_native_generated(obj);
|
||||
ScriptingCore::getInstance().runScript("Javascript/1to1/test_bindings.js");
|
||||
*/
|
||||
|
||||
// run the main script
|
||||
|
@ -108,7 +109,6 @@ bool AppDelegate::applicationDidFinishLaunching()
|
|||
// ScriptingCore::getInstance().runScript("Javascript/1to1/test_particles.js");
|
||||
// ScriptingCore::getInstance().runScript("Javascript/1to1/test_layer.js");
|
||||
// ScriptingCore::getInstance().runScript("Javascript/1to1/test_sound.js");
|
||||
// ScriptingCore::getInstance().runScript("Javascript/1to1/test_bindings.js");
|
||||
// ScriptingCore::getInstance().runScript("Javascript/1to1/test_transitions.js");
|
||||
// ScriptingCore::getInstance().runScript("Javascript/1to1/test_require.js");
|
||||
|
||||
|
|
|
@ -558,8 +558,10 @@ var createMenu = function (labelText) {
|
|||
var label = new cocos.LabelTTF();
|
||||
// initWithString: text, size, alignment, font, fontSize
|
||||
label.initWithString(labelText, sizeZero, 0, "Arial", 18.0);
|
||||
label.position = cocos.Point.create(winSize.width / 2, winSize.height - 30);
|
||||
hudMenu.addChild(label);
|
||||
var menuLabel = new cocos.MenuItemLabel();
|
||||
menuLabel.initWithLabel(label);
|
||||
menuLabel.position = cocos.Point.create(winSize.width / 2, winSize.height - 30);
|
||||
hudMenu.addChild(menuLabel);
|
||||
}
|
||||
|
||||
// just to avoid GC
|
||||
|
|
|
@ -192,8 +192,10 @@ var createMenu = function (labelText) {
|
|||
var label = new cocos.LabelTTF();
|
||||
// initWithString: text, size, alignment, font, fontSize
|
||||
label.initWithString(labelText, sizeZero, 0, "Arial", 18.0);
|
||||
label.position = cocos.Point.create(winSize.width / 2, winSize.height - 30);
|
||||
hudMenu.addChild(label);
|
||||
var menuLabel = new cocos.MenuItemLabel();
|
||||
menuLabel.initWithLabel(label);
|
||||
menuLabel.position = cocos.Point.create(winSize.width / 2, winSize.height - 30);
|
||||
hudMenu.addChild(menuLabel);
|
||||
}
|
||||
|
||||
// just to avoid GC
|
||||
|
|
|
@ -470,8 +470,10 @@ var createMenu = function (labelText) {
|
|||
var label = new cocos.LabelTTF();
|
||||
// initWithString: text, size, alignment, font, fontSize
|
||||
label.initWithString(labelText, sizeZero, 0, "Arial", 18.0);
|
||||
label.position = cocos.Point.create(winSize.width / 2, winSize.height - 30);
|
||||
hudMenu.addChild(label);
|
||||
var menuLabel = new cocos.MenuItemLabel();
|
||||
menuLabel.initWithLabel(label);
|
||||
menuLabel.position = cocos.Point.create(winSize.width / 2, winSize.height - 30);
|
||||
hudMenu.addChild(menuLabel);
|
||||
}
|
||||
|
||||
// just to avoid GC
|
||||
|
|
|
@ -152,8 +152,10 @@ var createMenu = function (labelText) {
|
|||
var label = new cocos.LabelTTF();
|
||||
// initWithString: text, size, alignment, font, fontSize
|
||||
label.initWithString(labelText, sizeZero, 0, "Arial", 18.0);
|
||||
label.position = cocos.Point.create(winSize.width / 2, winSize.height - 30);
|
||||
hudMenu.addChild(label);
|
||||
var menuLabel = new cocos.MenuItemLabel();
|
||||
menuLabel.initWithLabel(label);
|
||||
menuLabel.position = cocos.Point.create(winSize.width / 2, winSize.height - 30);
|
||||
hudMenu.addChild(menuLabel);
|
||||
}
|
||||
|
||||
// just to avoid GC
|
||||
|
|
|
@ -157,8 +157,10 @@ var createMenu = function (labelText) {
|
|||
var label = new cocos.LabelTTF();
|
||||
// initWithString: text, size, alignment, font, fontSize
|
||||
label.initWithString(labelText, sizeZero, 0, "Arial", 18.0);
|
||||
label.position = cocos.Point.create(winSize.width / 2, winSize.height - 30);
|
||||
hudMenu.addChild(label);
|
||||
var menuLabel = new cocos.MenuItemLabel();
|
||||
menuLabel.initWithLabel(label);
|
||||
menuLabel.position = cocos.Point.create(winSize.width / 2, winSize.height - 30);
|
||||
hudMenu.addChild(menuLabel);
|
||||
}
|
||||
|
||||
// just to avoid GC
|
||||
|
|
|
@ -1 +1 @@
|
|||
36900a5567156c02577a2e8f7b8f504f13140f13
|
||||
bce8c7d0fa7037c8aab18c3d1dc91546be6ae355
|
Загрузка…
Ссылка в новой задаче