fixed #1258, all js test cases passed.

This commit is contained in:
Walzer 2012-05-24 18:34:00 +08:00
Родитель 2187c88ab9
Коммит fecab7f3b1
9 изменённых файлов: 41 добавлений и 13 удалений

Просмотреть файл

@ -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