2015-05-05 10:50:19 +08:00
/ *
2017-02-14 14:36:57 +08:00
* Copyright ( c ) 2013 - 2017 Chukong Technologies Inc .
2015-05-05 10:50:19 +08:00
*
* Permission is hereby granted , free of charge , to any person obtaining a copy
* of this software and associated documentation files ( the "Software" ) , to deal
* in the Software without restriction , including without limitation the rights
* to use , copy , modify , merge , publish , distribute , sublicense , and / or sell
* copies of the Software , and to permit persons to whom the Software is
* furnished to do so , subject to the following conditions :
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software .
*
* THE SOFTWARE IS PROVIDED "AS IS" , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
* IMPLIED , INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY ,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT . IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM , DAMAGES OR OTHER
* LIABILITY , WHETHER IN AN ACTION OF CONTRACT , TORT OR OTHERWISE , ARISING FROM ,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE .
* /
/ * *
* @ type { Object }
* @ name jsb . AssetsManager
* jsb . AssetsManager is the native AssetsManager for your game resources or scripts .
* please refer to this document to know how to use it : http : //www.cocos2d-x.org/docs/manual/framework/html5/v3/assets-manager/en
* Only available in JSB
* /
jsb . AssetsManager = cc . AssetsManager ;
delete cc . AssetsManager ;
2017-03-15 16:09:02 +08:00
/ * *
* @ type { Object }
* @ name jsb . Manifest
* please refer to this document to know how to use it : http : //www.cocos2d-x.org/docs/manual/framework/html5/v3/assets-manager/en
* Only available in JSB
* /
jsb . Manifest = cc . Manifest ;
delete cc . Manifest ;
2015-05-05 10:50:19 +08:00
/ * *
* @ type { Object }
* @ name jsb . EventListenerAssetsManager
* jsb . EventListenerAssetsManager is the native event listener for AssetsManager .
* please refer to this document to know how to use it : http : //www.cocos2d-x.org/docs/manual/framework/html5/v3/assets-manager/en
* Only available in JSB
* /
jsb . EventListenerAssetsManager = cc . EventListenerAssetsManager ;
delete cc . EventListenerAssetsManager ;
/ * *
* @ type { Object }
* @ name jsb . EventAssetsManager
* jsb . EventAssetsManager is the native event for AssetsManager .
* please refer to this document to know how to use it : http : //www.cocos2d-x.org/docs/manual/framework/html5/v3/assets-manager/en
* Only available in JSB
* /
jsb . EventAssetsManager = cc . EventAssetsManager ;
delete cc . EventAssetsManager ;
// move from jsb_cocos2d
//start------------------------------
cc . ControlButton . extend = cc . Class . extend ;
cc . ControlColourPicker . extend = cc . Class . extend ;
cc . ControlPotentiometer . extend = cc . Class . extend ;
cc . ControlSlider . extend = cc . Class . extend ;
cc . ControlStepper . extend = cc . Class . extend ;
cc . ControlSwitch . extend = cc . Class . extend ;
//end------------------------------
//
// 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 EditBox : : InputMode 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 ;
cc . CONTROL _EVENT _TOTAL _NUMBER = 9 ;
cc . CONTROL _EVENT _TOUCH _DOWN = 1 << 0 ; // A touch-down event in the control.
cc . CONTROL _EVENT _TOUCH _DRAG _INSIDE = 1 << 1 ; // An event where a finger is dragged inside the bounds of the control.
cc . CONTROL _EVENT _TOUCH _DRAG _OUTSIDE = 1 << 2 ; // An event where a finger is dragged just outside the bounds of the control.
cc . CONTROL _EVENT _TOUCH _DRAG _ENTER = 1 << 3 ; // An event where a finger is dragged into the bounds of the control.
cc . CONTROL _EVENT _TOUCH _DRAG _EXIT = 1 << 4 ; // An event where a finger is dragged from within a control to outside its bounds.
cc . CONTROL _EVENT _TOUCH _UP _INSIDE = 1 << 5 ; // A touch-up event in the control where the finger is inside the bounds of the control.
cc . CONTROL _EVENT _TOUCH _UP _OUTSIDE = 1 << 6 ; // A touch-up event in the control where the finger is outside the bounds of the control.
cc . CONTROL _EVENT _TOUCH _CANCEL = 1 << 7 ; // A system event canceling the current touches for the control.
cc . CONTROL _EVENT _VALUECHANGED = 1 << 8 ; // A touch dragging or otherwise manipulating a control; causing it to emit a series of different values.
cc . CONTROL _STATE _NORMAL = 1 << 0 ; // The normal; or default state of a control梩hat is; enabled but neither selected nor highlighted.
cc . CONTROL _STATE _HIGHLIGHTED = 1 << 1 ; // Highlighted state of a control. A control enters this state when a touch down; drag inside or drag enter is performed. You can retrieve and set this value through the highlighted property.
cc . CONTROL _STATE _DISABLED = 1 << 2 ; // Disabled state of a control. This state indicates that the control is currently disabled. You can retrieve and set this value through the enabled property.
cc . CONTROL _STATE _SELECTED = 1 << 3 ; // Selected state of a control. This state indicates that the control is currently selected. You can retrieve and set this value through the selected property.
cc . CONTROL _STATE _INITIAL = 1 << 3 ;
cc . CONTROL _ZOOM _ACTION _TAG = 0xCCCB0001 ; //CCControlButton.js
cc . CONTROL _STEPPER _PARTMINUS = 0 ; //CCControlStepper.js
cc . CONTROL _STEPPER _PARTPLUS = 1 ;
cc . CONTROL _STEPPER _PARTNONE = 2 ;
cc . CONTROL _STEPPER _LABELCOLOR _ENABLED = cc . color ( 55 , 55 , 55 ) ;
cc . CONTROL _STEPPER _LABELCOLOR _DISABLED = cc . color ( 147 , 147 , 147 ) ;
cc . CONTROL _STEPPER _LABELFONT = "CourierNewPSMT" ;
cc . AUTOREPEAT _DELTATIME = 0.15 ;
cc . AUTOREPEAT _INCREASETIME _INCREMENT = 12 ;
2017-03-15 16:09:02 +08:00
jsb . Manifest . DownloadState = {
UNSTARTED : 0 ,
DOWNLOADING : 1 ,
SUCCESSED : 2 ,
UNMARKED : 3
} ;
2015-05-05 10:50:19 +08:00
jsb . EventAssetsManager . ERROR _NO _LOCAL _MANIFEST = 0 ;
jsb . EventAssetsManager . ERROR _DOWNLOAD _MANIFEST = 1 ;
jsb . EventAssetsManager . ERROR _PARSE _MANIFEST = 2 ;
jsb . EventAssetsManager . NEW _VERSION _FOUND = 3 ;
jsb . EventAssetsManager . ALREADY _UP _TO _DATE = 4 ;
jsb . EventAssetsManager . UPDATE _PROGRESSION = 5 ;
jsb . EventAssetsManager . ASSET _UPDATED = 6 ;
jsb . EventAssetsManager . ERROR _UPDATING = 7 ;
jsb . EventAssetsManager . UPDATE _FINISHED = 8 ;
jsb . EventAssetsManager . UPDATE _FAILED = 9 ;
jsb . EventAssetsManager . ERROR _DECOMPRESS = 10 ;
cc . ScrollView . extend = cc . Class . extend ;
cc . TableView . extend = cc . Class . extend ;
cc . TableViewCell . extend = cc . Class . extend ;