mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 07:42:38 +08:00
7c66c1e4b6
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
40 lines
854 B
JavaScript
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: '',
|
|
}
|
|
}
|
|
});
|