mirror of https://github.com/axmolengine/axmol.git
164 lines
3.4 KiB
JavaScript
164 lines
3.4 KiB
JavaScript
//
|
|
// cocos2d constants
|
|
//
|
|
// This helper file should be required after jsb_cocos2d.js
|
|
//
|
|
|
|
var cc = cc || {};
|
|
|
|
cc.SCROLLVIEW_DIRECTION_NONE = -1;
|
|
cc.SCROLLVIEW_DIRECTION_HORIZONTAL = 0;
|
|
cc.SCROLLVIEW_DIRECTION_VERTICAL = 1;
|
|
cc.SCROLLVIEW_DIRECTION_BOTH = 2;
|
|
cc.TABLEVIEW_FILL_TOPDOWN = 0;
|
|
cc.TABLEVIEW_FILL_BOTTOMUP = 1;
|
|
|
|
|
|
/**
|
|
* @constant
|
|
* @type Number
|
|
*/
|
|
cc.KEYBOARD_RETURNTYPE_DEFAULT = 0;
|
|
|
|
/**
|
|
* @constant
|
|
* @type Number
|
|
*/
|
|
cc.KEYBOARD_RETURNTYPE_DONE = 1;
|
|
|
|
/**
|
|
* @constant
|
|
* @type Number
|
|
*/
|
|
cc.KEYBOARD_RETURNTYPE_SEND = 2;
|
|
|
|
/**
|
|
* @constant
|
|
* @type Number
|
|
*/
|
|
cc.KEYBOARD_RETURNTYPE_SEARCH = 3;
|
|
|
|
/**
|
|
* @constant
|
|
* @type Number
|
|
*/
|
|
cc.KEYBOARD_RETURNTYPE_GO = 4;
|
|
|
|
/**
|
|
* The EditBoxInputMode defines the type of text that the user is allowed * to enter.
|
|
* @constant
|
|
* @type Number
|
|
*/
|
|
cc.EDITBOX_INPUT_MODE_ANY = 0;
|
|
|
|
/**
|
|
* The user is allowed to enter an e-mail address.
|
|
* @constant
|
|
* @type Number
|
|
*/
|
|
cc.EDITBOX_INPUT_MODE_EMAILADDR = 1;
|
|
|
|
/**
|
|
* The user is allowed to enter an integer value.
|
|
* @constant
|
|
* @type Number
|
|
*/
|
|
cc.EDITBOX_INPUT_MODE_NUMERIC = 2;
|
|
|
|
/**
|
|
* The user is allowed to enter a phone number.
|
|
* @constant
|
|
* @type Number
|
|
*/
|
|
cc.EDITBOX_INPUT_MODE_PHONENUMBER = 3;
|
|
|
|
/**
|
|
* The user is allowed to enter a URL.
|
|
* @constant
|
|
* @type Number
|
|
*/
|
|
cc.EDITBOX_INPUT_MODE_URL = 4;
|
|
|
|
/**
|
|
* The user is allowed to enter a real number value.
|
|
* This extends kEditBoxInputModeNumeric by allowing a decimal point.
|
|
* @constant
|
|
* @type Number
|
|
*/
|
|
cc.EDITBOX_INPUT_MODE_DECIMAL = 5;
|
|
|
|
/**
|
|
* The user is allowed to enter any text, except for line breaks.
|
|
* @constant
|
|
* @type Number
|
|
*/
|
|
cc.EDITBOX_INPUT_MODE_SINGLELINE = 6;
|
|
|
|
/**
|
|
* Indicates that the text entered is confidential data that should be
|
|
* obscured whenever possible. This implies EDIT_BOX_INPUT_FLAG_SENSITIVE.
|
|
* @constant
|
|
* @type Number
|
|
*/
|
|
cc.EDITBOX_INPUT_FLAG_PASSWORD = 0;
|
|
|
|
/**
|
|
* Indicates that the text entered is sensitive data that the
|
|
* implementation must never store into a dictionary or table for use
|
|
* in predictive, auto-completing, or other accelerated input schemes.
|
|
* A credit card number is an example of sensitive data.
|
|
* @constant
|
|
* @type Number
|
|
*/
|
|
cc.EDITBOX_INPUT_FLAG_SENSITIVE = 1;
|
|
|
|
/**
|
|
* This flag is a hint to the implementation that during text editing,
|
|
* the initial letter of each word should be capitalized.
|
|
* @constant
|
|
* @type Number
|
|
*/
|
|
cc.EDITBOX_INPUT_FLAG_INITIAL_CAPS_WORD = 2;
|
|
|
|
/**
|
|
* This flag is a hint to the implementation that during text editing,
|
|
* the initial letter of each sentence should be capitalized.
|
|
* @constant
|
|
* @type Number
|
|
*/
|
|
cc.EDITBOX_INPUT_FLAG_INITIAL_CAPS_SENTENCE = 3;
|
|
|
|
/**
|
|
* Capitalize all characters automatically.
|
|
* @constant
|
|
* @type Number
|
|
*/
|
|
cc.EDITBOX_INPUT_FLAG_INITIAL_CAPS_ALL_CHARACTERS = 4;
|
|
|
|
// PhysicsDebugNode
|
|
cc.PhysicsDebugNode.create = function( space ) {
|
|
var s = space;
|
|
if( space.handle !== undefined )
|
|
s = space.handle;
|
|
return cc.PhysicsDebugNode._create( s );
|
|
};
|
|
cc.PhysicsDebugNode.prototype.setSpace = function( space ) {
|
|
var s = space;
|
|
if( space.handle !== undefined )
|
|
s = space.handle;
|
|
return this._setSpace( s );
|
|
};
|
|
|
|
// PhysicsSprite
|
|
cc.PhysicsSprite.prototype.setBody = function( body ) {
|
|
var b = body;
|
|
if( body.handle !== undefined )
|
|
b = body.handle;
|
|
return this._setCPBody( b );
|
|
};
|
|
|
|
cc.ScrollView.extend = cc.Class.extend;
|
|
cc.TableView.extend = cc.Class.extend;
|
|
cc.TableViewCell.extend = cc.Class.extend;
|
|
cc.GLNode.extend = cc.Class.extend;
|