mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 15:52:40 +08:00
Merge pull request #454 from knoxHuang/v1.0
built-in module in the title next to add a help icon.
This commit is contained in:
@@ -44,7 +44,8 @@ var Animation = cc.Class({
|
||||
|
||||
editor: CC_EDITOR && {
|
||||
menu: 'i18n:MAIN_MENU.component.others/Animation',
|
||||
executeInEditMode: true
|
||||
help: 'app://docs/html/components/animation.html',
|
||||
executeInEditMode: true,
|
||||
},
|
||||
|
||||
ctor: function () {
|
||||
|
||||
@@ -36,7 +36,8 @@ var AudioSource = cc.Class({
|
||||
extends: require('./CCComponent'),
|
||||
|
||||
editor: CC_EDITOR && {
|
||||
menu: 'i18n:MAIN_MENU.component.others/AudioSource'
|
||||
menu: 'i18n:MAIN_MENU.component.others/AudioSource',
|
||||
help: 'app://docs/html/components/audiosource.html',
|
||||
},
|
||||
|
||||
ctor: function () {
|
||||
|
||||
@@ -78,6 +78,7 @@ var Button = cc.Class({
|
||||
|
||||
editor: CC_EDITOR && {
|
||||
menu: 'i18n:MAIN_MENU.component.ui/Button',
|
||||
help: 'app://docs/html/components/button.html',
|
||||
inspector: 'app://editor/page/inspector/button/button.html',
|
||||
executeInEditMode: true
|
||||
},
|
||||
|
||||
@@ -54,8 +54,9 @@ var Canvas = cc.Class({
|
||||
|
||||
editor: CC_EDITOR && {
|
||||
menu: 'i18n:MAIN_MENU.component.ui/Canvas',
|
||||
help: 'app://docs/html/components/canvas.html',
|
||||
executeInEditMode: true,
|
||||
disallowMultiple: true
|
||||
disallowMultiple: true,
|
||||
},
|
||||
|
||||
statics: {
|
||||
|
||||
@@ -747,6 +747,7 @@ if (CC_DEV) {
|
||||
Component._executeInEditMode = false;
|
||||
Component._playOnFocus = false;
|
||||
Component._disallowMultiple = null;
|
||||
Component._help = '';
|
||||
|
||||
// NON-INHERITED STATIC MEMBERS
|
||||
|
||||
@@ -815,6 +816,10 @@ Object.defineProperty(Component, '_registerEditorProps', {
|
||||
// skip here
|
||||
break;
|
||||
|
||||
case 'help':
|
||||
cls._help = val;
|
||||
break;
|
||||
|
||||
default:
|
||||
cc.warn('Unknown editor property "%s" in class "%s".', key, name);
|
||||
break;
|
||||
|
||||
@@ -41,6 +41,7 @@ var EditBox = cc.Class({
|
||||
editor: CC_EDITOR && {
|
||||
menu: 'i18n:MAIN_MENU.component.ui/EditBox',
|
||||
inspector: 'app://editor/page/inspector/cceditbox.html',
|
||||
help: 'app://docs/html/components/editbox.html',
|
||||
executeInEditMode: true,
|
||||
},
|
||||
|
||||
|
||||
@@ -37,7 +37,8 @@ var Label = cc.Class({
|
||||
extends: cc._RendererUnderSG,
|
||||
|
||||
editor: CC_EDITOR && {
|
||||
menu: 'i18n:MAIN_MENU.component.renderers/Label'
|
||||
menu: 'i18n:MAIN_MENU.component.renderers/Label',
|
||||
help: 'app://docs/html/components/label.html',
|
||||
},
|
||||
|
||||
properties: {
|
||||
|
||||
@@ -124,6 +124,7 @@ var Layout = cc.Class({
|
||||
|
||||
editor: CC_EDITOR && {
|
||||
menu: 'i18n:MAIN_MENU.component.ui/Layout',
|
||||
help: 'app://docs/html/components/layout.html',
|
||||
inspector: 'app://editor/page/inspector/cclayout.html',
|
||||
executeInEditMode: true,
|
||||
},
|
||||
|
||||
@@ -33,6 +33,7 @@ var Mask = cc.Class({
|
||||
|
||||
editor: CC_EDITOR && {
|
||||
menu: 'i18n:MAIN_MENU.component.renderers/Mask',
|
||||
help: 'app://docs/html/components/mask.html',
|
||||
},
|
||||
|
||||
properties: {
|
||||
|
||||
@@ -54,7 +54,8 @@ var ProgressBar = cc.Class({
|
||||
extends: require('./CCComponent'),
|
||||
|
||||
editor: CC_EDITOR && {
|
||||
menu: 'i18n:MAIN_MENU.component.ui/ProgressBar'
|
||||
menu: 'i18n:MAIN_MENU.component.ui/ProgressBar',
|
||||
help: 'app://docs/html/components/progressbar.html',
|
||||
},
|
||||
|
||||
_initBarSprite: function() {
|
||||
|
||||
@@ -51,7 +51,8 @@ var Scrollbar = cc.Class({
|
||||
extends: require('./CCComponent'),
|
||||
|
||||
editor: CC_EDITOR && {
|
||||
menu: 'i18n:MAIN_MENU.component.ui/ScrollBar'
|
||||
menu: 'i18n:MAIN_MENU.component.ui/ScrollBar',
|
||||
help: 'app://docs/html/components/scrollbar.html',
|
||||
},
|
||||
|
||||
properties: {
|
||||
|
||||
@@ -51,7 +51,8 @@ var ScrollView = cc.Class({
|
||||
|
||||
editor: CC_EDITOR && {
|
||||
menu: 'i18n:MAIN_MENU.component.ui/ScrollView',
|
||||
executeInEditMode: true
|
||||
help: 'app://docs/html/components/scrollview.html',
|
||||
executeInEditMode: true,
|
||||
},
|
||||
|
||||
ctor: function() {
|
||||
|
||||
@@ -72,7 +72,8 @@ var Sprite = cc.Class({
|
||||
|
||||
editor: CC_EDITOR && {
|
||||
menu: 'i18n:MAIN_MENU.component.renderers/Sprite',
|
||||
inspector: 'app://editor/page/inspector/sprite.html'
|
||||
help: 'app://docs/html/components/sprite.html',
|
||||
inspector: 'app://editor/page/inspector/sprite.html',
|
||||
},
|
||||
|
||||
ctor: function() {
|
||||
|
||||
@@ -45,9 +45,10 @@ var Widget = cc.Class({
|
||||
|
||||
editor: CC_EDITOR && {
|
||||
menu: 'i18n:MAIN_MENU.component.ui/Widget',
|
||||
help: 'app://docs/html/components/widget.html',
|
||||
inspector: 'app://editor/page/inspector/widget/index.html',
|
||||
executeInEditMode: true,
|
||||
disallowMultiple: true,
|
||||
inspector: 'app://editor/page/inspector/widget/index.html'
|
||||
},
|
||||
|
||||
properties: {
|
||||
|
||||
@@ -716,6 +716,14 @@ function declareProperties (cls, className, properties, baseClass, mixins) {
|
||||
* @default ""
|
||||
*/
|
||||
|
||||
/**
|
||||
* The custom documentation URL
|
||||
*
|
||||
* @property help
|
||||
* @type {String}
|
||||
* @default ""
|
||||
*/
|
||||
|
||||
/**
|
||||
* @module cc
|
||||
*/
|
||||
|
||||
@@ -56,6 +56,7 @@ sp.Skeleton = cc.Class({
|
||||
extends: cc._RendererUnderSG,
|
||||
editor: CC_EDITOR && {
|
||||
menu: 'i18n:MAIN_MENU.component.others/Spine Skeleton',
|
||||
help: 'app://docs/html/components/spine.html',
|
||||
//playOnFocus: true
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user