Files
cocos4/cocos2d/core/components/CCComponentEventHandler.js
T
zilongshanren 7c66c1e4b6 add EditBox component.
rename editbox to sgEditBox

add editbox components

add background scale9sprite to editbox

add function to change editbox bgsprite size

add editbox properties

add string property

sync all the interfaces

refactor button event handler

finish single line editobox

finish multiline editbox

add editbox component
2016-01-22 18:08:04 +08:00

40 lines
854 B
JavaScript

/**
* Component will register a event to target component's handler.
* And it will trigger the handler when a certain event occurs.
*
* @class cc.Component.EventHandler
*/
cc.Component.EventHandler = cc.Class({
name: 'cc.CompEventHandler',
properties: {
/**
* Event target
* @property target
* @type cc.Node
* @default null
*/
target: {
default: null,
type: cc.Node,
},
/**
* Component name
* @property component
* @type {String}
* @default ''
*/
component: {
default: '',
},
/**
* Event handler
* @property handler
* @type {String}
* @default ''
*/
handler: {
default: '',
}
}
});