UI module support zh/en UItooltip (#8335)

* UI module support zh/en UItooltip

* change sub-context file name

* remove white space

* update
This commit is contained in:
ChiaNing
2021-03-13 13:04:34 +08:00
committed by GitHub
parent d827db0834
commit 2d869577a5
19 changed files with 209 additions and 152 deletions
@@ -29,7 +29,7 @@
* @module event
*/
import { ccclass, type, serializable, editable } from 'cc.decorator';
import { ccclass, type, serializable, editable, tooltip } from 'cc.decorator';
import { Node } from '../scene-graph';
import { legacyCC } from '../global-exports';
@@ -98,6 +98,7 @@ export class EventHandler {
* 事件响应组件和函数所在节点
*/
@type(legacyCC.Node)
@tooltip('i18n:button.click_event.target')
public target: Node | null = null;
/**
* @en
@@ -108,6 +109,7 @@ export class EventHandler {
// only for deserializing old project component field
@serializable
@editable
@tooltip('i18n:button.click_event.component')
public component = '';
@serializable
@@ -121,6 +123,7 @@ export class EventHandler {
*/
@serializable
@editable
@tooltip('i18n:button.click_event.handler')
public handler = '';
/**
@@ -131,6 +134,7 @@ export class EventHandler {
*/
@serializable
@editable
@tooltip('i18n:button.click_event.customEventData')
public customEventData = '';
/**
+14 -14
View File
@@ -195,7 +195,7 @@ export class Button extends Component {
*/
@type(Node)
@displayOrder(0)
@tooltip('指定 Button 背景节点,Button 状态改变时会修改此节点的 Color 或 Sprite 属性')
@tooltip('i18n:button.target')
get target () {
return this._target || this.node;
}
@@ -221,7 +221,7 @@ export class Button extends Component {
* 按钮事件是否被响应,如果为 false,则按钮将被禁用。
*/
@displayOrder(1)
@tooltip('按钮是否可交互,这一项未选中时,按钮处在禁用状态')
@tooltip('i18n:button.interactable')
get interactable () {
return this._interactable;
}
@@ -257,7 +257,7 @@ export class Button extends Component {
*/
@type(Transition)
@displayOrder(2)
@tooltip('按钮状态变化时的过渡类型')
@tooltip('i18n:button.transition')
get transition () {
return this._transition;
}
@@ -286,7 +286,7 @@ export class Button extends Component {
* @zh
* 普通状态下按钮所显示的颜色。
*/
@tooltip('普通状态的按钮背景颜色')
@tooltip('i18n:button.normal_color')
// @constget
get normalColor (): Readonly<Color> {
return this._normalColor;
@@ -308,7 +308,7 @@ export class Button extends Component {
* @zh
* 按下状态时按钮所显示的颜色。
*/
@tooltip('按下状态的按钮背景颜色')
@tooltip('i18n:button.pressed_color')
// @constget
get pressedColor (): Readonly<Color> {
return this._pressedColor;
@@ -329,7 +329,7 @@ export class Button extends Component {
* @zh
* 悬停状态下按钮所显示的颜色。
*/
@tooltip('悬停状态的按钮背景颜色')
@tooltip('i18n:button.hover_color')
// @constget
get hoverColor (): Readonly<Color> {
return this._hoverColor;
@@ -349,7 +349,7 @@ export class Button extends Component {
* @zh
* 禁用状态下按钮所显示的颜色。
*/
@tooltip('禁用状态的按钮背景颜色')
@tooltip('i18n:button.disabled_color')
// @constget
get disabledColor (): Readonly<Color> {
return this._disabledColor;
@@ -373,7 +373,7 @@ export class Button extends Component {
*/
@rangeMin(0)
@rangeMax(10)
@tooltip('按钮颜色变化或者缩放变化的过渡时间')
@tooltip('i18n:button.duration')
get duration () {
return this._duration;
}
@@ -398,7 +398,7 @@ export class Button extends Component {
* 注意:不建议 zoomScale 的值小于 1, 否则缩放后如果触摸点在触摸区域外, 则会触发 touchCancel 事件。
* 如果你需要这么做,你应该把 target 设置为另一个背景节点,而不是按钮节点。
*/
@tooltip('当用户点击按钮后,按钮会缩放到一个值,这个值等于 Button 原始 scale * zoomScale。')
@tooltip('i18n:button.zoom_scale')
get zoomScale () {
return this._zoomScale;
}
@@ -420,7 +420,7 @@ export class Button extends Component {
* 普通状态下按钮所显示的 Sprite。
*/
@type(SpriteFrame)
@tooltip('普通状态的按钮背景图资源')
@tooltip('i18n:button.normal_sprite')
get normalSprite () {
return this._normalSprite;
}
@@ -447,7 +447,7 @@ export class Button extends Component {
* 按下状态时按钮所显示的 Sprite。
*/
@type(SpriteFrame)
@tooltip('按下状态的按钮背景图资源')
@tooltip('i18n:button.pressed_sprite')
get pressedSprite () {
return this._pressedSprite;
}
@@ -469,7 +469,7 @@ export class Button extends Component {
* 悬停状态下按钮所显示的 Sprite。
*/
@type(SpriteFrame)
@tooltip('悬停状态的按钮背景图资源')
@tooltip('i18n:button.hover_sprite')
get hoverSprite () {
return this._hoverSprite;
}
@@ -491,7 +491,7 @@ export class Button extends Component {
* 禁用状态下按钮所显示的 Sprite。
*/
@type(SpriteFrame)
@tooltip('禁用状态的按钮背景图资源')
@tooltip('i18n:button.disabled_sprite')
get disabledSprite () {
return this._disabledSprite;
}
@@ -517,7 +517,7 @@ export class Button extends Component {
@type([ComponentEventHandler])
@serializable
@displayOrder(20)
@tooltip('按钮点击事件的列表。先将数量改为1或更多,就可以为每个点击事件设置接受者和处理方法')
@tooltip('i18n:button.click_events')
public clickEvents: ComponentEventHandler[] = [];
@serializable
protected _interactable = true;
+1 -1
View File
@@ -27,7 +27,7 @@
* @packageDocumentation
* @module ui
*/
import { UICoordinateTracker } from './ui-coodinate-tracker';
import { UICoordinateTracker } from './ui-coordinate-tracker';
import { BlockInputEvents } from './block-input-events';
import { Button } from './button';
import { EditBox } from './editbox/edit-box';
+14 -14
View File
@@ -86,7 +86,7 @@ export class EditBox extends Component {
* 输入框的初始输入内容,如果为空则会显示占位符的文本。
*/
@displayOrder(1)
@tooltip('输入框的初始输入内容,如果为空则会显示占位符的文本')
@tooltip('i18n:editbox.string')
get string () {
return this._string;
}
@@ -108,7 +108,7 @@ export class EditBox extends Component {
* 输入框占位符的文本内容。
*/
@displayOrder(2)
@tooltip('输入框占位符的文本内容')
@tooltip('i18n:editbox.placeholder')
get placeholder () {
if (!this._placeholderLabel) {
return '';
@@ -131,7 +131,7 @@ export class EditBox extends Component {
*/
@type(Label)
@displayOrder(3)
@tooltip('输入框输入文本节点上挂载的 Label 组件对象')
@tooltip('i18n:editbox.text_lable')
get textLabel () {
return this._textLabel;
}
@@ -155,7 +155,7 @@ export class EditBox extends Component {
*/
@type(Label)
@displayOrder(4)
@tooltip('输入框占位符节点上挂载的 Label 组件对象')
@tooltip('i18n:editbox.placeholder_label')
get placeholderLabel () {
return this._placeholderLabel;
}
@@ -179,7 +179,7 @@ export class EditBox extends Component {
*/
@type(SpriteFrame)
@displayOrder(5)
@tooltip('输入框的背景图片')
@tooltip('i18n:editbox.backgroundImage')
get backgroundImage () {
return this._backgroundImage;
}
@@ -202,7 +202,7 @@ export class EditBox extends Component {
*/
@type(InputFlag)
@displayOrder(6)
@tooltip('指定输入标志位,可以指定输入方式为密码或者单词首字母大写')
@tooltip('i18n:editbox.input_flag')
get inputFlag () {
return this._inputFlag;
}
@@ -222,7 +222,7 @@ export class EditBox extends Component {
*/
@type(InputMode)
@displayOrder(7)
@tooltip('指定输入模式: ANY 表示多行输入,其它都是单行输入,移动平台上还可以指定键盘样式')
@tooltip('i18n:editbox.input_mode')
get inputMode () {
return this._inputMode;
}
@@ -246,7 +246,7 @@ export class EditBox extends Component {
*/
@type(KeyboardReturnType)
@displayOrder(8)
@tooltip('指定移动设备上面回车按钮的样式')
@tooltip('i18n:editbox.returnType')
get returnType () {
return this._returnType;
}
@@ -267,7 +267,7 @@ export class EditBox extends Component {
* - 如果值为 0,则不允许用户进行任何输入。
*/
@displayOrder(9)
@tooltip('输入框最大允许输入的字符个数')
@tooltip('i18n:editbox.max_length')
get maxLength () {
return this._maxLength;
}
@@ -283,7 +283,7 @@ export class EditBox extends Component {
* 修改 DOM 输入元素的 tabIndex(这个属性只有在 Web 上面修改有意义)。
*/
@displayOrder(10)
@tooltip('修改 DOM 输入元素的 tabIndex(这个属性只有在 Web 上面修改有意义)')
@tooltip('i18n:editbox.tab_index')
get tabIndex () {
return this._tabIndex;
}
@@ -312,7 +312,7 @@ export class EditBox extends Component {
@type([ComponentEventHandler])
@serializable
@displayOrder(11)
@tooltip('该事件在用户点击输入框获取焦点的时候被触发')
@tooltip('i18n:editbox.editing_began')
public editingDidBegan: ComponentEventHandler[] = [];
/**
@@ -325,7 +325,7 @@ export class EditBox extends Component {
@type([ComponentEventHandler])
@serializable
@displayOrder(12)
@tooltip('编辑文本输入框时触发的事件回调')
@tooltip('i18n:editbox.text_changed')
public textChanged: ComponentEventHandler[] = [];
/**
@@ -338,7 +338,7 @@ export class EditBox extends Component {
@type([ComponentEventHandler])
@serializable
@displayOrder(13)
@tooltip('在单行模式下面,一般是在用户按下回车或者点击屏幕输入框以外的地方调用该函数。 如果是多行输入,一般是在用户点击屏幕输入框以外的地方调用该函数')
@tooltip('i18n:editbox.editing_ended')
public editingDidEnded: ComponentEventHandler[] = [];
/**
@@ -351,7 +351,7 @@ export class EditBox extends Component {
@type([ComponentEventHandler])
@serializable
@displayOrder(14)
@tooltip('该事件在用户按下回车键的时候被触发, 如果是单行输入框,按回车键还会使输入框失去焦点')
@tooltip('i18n:editbox.editing_return')
public editingReturn: ComponentEventHandler[] = [];
public _impl: EditBoxImplBase | null = null;
+2 -2
View File
@@ -41,8 +41,8 @@ export { Widget } from './widget';
export { PageView } from './page-view';
export { PageViewIndicator } from './page-view-indicator';
export { SafeArea } from './safe-area';
export { UICoordinateTracker } from './ui-coodinate-tracker';
export { UICoordinateTracker } from './ui-coordinate-tracker';
export { BlockInputEvents } from './block-input-events';
export { SubContextView } from './SubContextView';
export { SubContextView } from './sub-context-view';
export { widgetManager } from './widget-manager';
export * from './deprecated';
+17 -17
View File
@@ -227,7 +227,7 @@ export class Layout extends Component {
@visible(function (this: Layout) {
return this._layoutType === Type.HORIZONTAL;
})
@tooltip('自动对齐。在 Type 为 Horizontal 或 Vertical 时按同个方向位置排列')
@tooltip('i18n:layout.align_horizontal')
get alignHorizontal () {
return this._isAlign;
}
@@ -251,7 +251,7 @@ export class Layout extends Component {
@visible(function (this: Layout) {
return this._layoutType === Type.VERTICAL;
})
@tooltip('自动对齐。在 Type 为 Vertical 时按同个方向位置排列')
@tooltip('i18n:layout.align_vertical')
get alignVertical () {
return this._isAlign;
}
@@ -273,7 +273,7 @@ export class Layout extends Component {
* 布局类型。
*/
@type(Type)
@tooltip('自动布局模式,包括:\n 1. NONE,不会对子节点进行自动布局 \n 2. HORIZONTAL,横向自动排布子物体 \n 3. VERTICAL,垂直自动排布子物体\n 4. GRID, 采用网格方式对子物体自动进行布局')
@tooltip('i18n:layout.layout_type')
get type () {
return this._layoutType;
}
@@ -293,7 +293,7 @@ export class Layout extends Component {
@visible(function (this: Layout) {
return this._layoutType !== Type.NONE;
})
@tooltip('缩放模式,包括:\n 1. NONE,不会对子节点和容器进行大小缩放 \n 2. CONTAINER, 对容器的大小进行缩放 \n 3. CHILDREN, 对子节点的大小进行缩放')
@tooltip('i18n:layout.resize_mode')
get resizeMode () {
return this._resizeMode;
}
@@ -320,7 +320,7 @@ export class Layout extends Component {
return false;
})
@tooltip('每个格子的大小,只有布局类型为 GRID 的时候才有效')
@tooltip('i18n:layout.cell_size')
get cellSize (): Readonly<Size> {
return this._cellSize;
}
@@ -343,7 +343,7 @@ export class Layout extends Component {
* 起始轴方向类型,可进行水平和垂直布局排列,只有布局类型为 GRID 的时候才有效。
*/
@type(AxisDirection)
@tooltip('起始轴方向类型,可进行水平和垂直布局排列,只有布局类型为 GRID 的时候才有效')
@tooltip('i18n:layout.start_axis')
get startAxis () {
return this._startAxis;
}
@@ -363,7 +363,7 @@ export class Layout extends Component {
* @zh
* 容器内左边距,只会在一个布局方向上生效。
*/
@tooltip('容器内左边距,只会在一个布局方向上生效')
@tooltip('i18n:layout.padding_left')
get paddingLeft () {
return this._paddingLeft;
}
@@ -383,7 +383,7 @@ export class Layout extends Component {
* @zh
* 容器内右边距,只会在一个布局方向上生效。
*/
@tooltip('容器内右边距,只会在一个布局方向上生效')
@tooltip('i18n:layout.padding_right')
get paddingRight () {
return this._paddingRight;
}
@@ -403,7 +403,7 @@ export class Layout extends Component {
* @zh
* 容器内上边距,只会在一个布局方向上生效。
*/
@tooltip('容器内上边距,只会在一个布局方向上生效')
@tooltip('i18n:layout.padding_top')
get paddingTop () {
return this._paddingTop;
}
@@ -423,7 +423,7 @@ export class Layout extends Component {
* @zh
* 容器内下边距,只会在一个布局方向上生效。
*/
@tooltip('容器内下边距,只会在一个布局方向上生效')
@tooltip('i18n:layout.padding_bottom')
get paddingBottom () {
return this._paddingBottom;
}
@@ -443,7 +443,7 @@ export class Layout extends Component {
* @zh
* 子节点之间的水平间距。
*/
@tooltip('子节点之间的水平间距')
@tooltip('i18n:layout.space_x')
get spacingX () {
return this._spacingX;
}
@@ -464,7 +464,7 @@ export class Layout extends Component {
* @zh
* 子节点之间的垂直间距。
*/
@tooltip('子节点之间的垂直间距')
@tooltip('i18n:layout.space_y')
get spacingY () {
return this._spacingY;
}
@@ -487,7 +487,7 @@ export class Layout extends Component {
* 垂直排列子节点的方向。
*/
@type(VerticalDirection)
@tooltip('垂直排列子节点的方向')
@tooltip('i18n:layout.vertical_direction')
get verticalDirection () {
return this._verticalDirection;
}
@@ -510,7 +510,7 @@ export class Layout extends Component {
* 水平排列子节点的方向。
*/
@type(HorizontalDirection)
@tooltip('水平排列子节点的方向')
@tooltip('i18n:layout.horizontal_direction')
get horizontalDirection () {
return this._horizontalDirection;
}
@@ -553,7 +553,7 @@ export class Layout extends Component {
@visible(function (this: Layout) {
return this.type === Type.GRID;
})
@tooltip('容器内布局约束')
@tooltip('i18n:layout.constraint')
get constraint () {
return this._constraint;
}
@@ -577,7 +577,7 @@ export class Layout extends Component {
@visible(function (this: Layout) {
return this._constraint !== Constraint.NONE;
})
@tooltip('容器内布局约束数值')
@tooltip('i18n:layout.constraint_number')
get constraintNum () {
return this._constraintNum;
}
@@ -602,7 +602,7 @@ export class Layout extends Component {
* @zh
* 子节点缩放比例是否影响布局。
*/
@tooltip('子节点缩放比例是否影响布局')
@tooltip('i18n:layout.affected_scale')
get affectedByScale () {
return this._affectedByScale;
}
+4 -4
View File
@@ -87,7 +87,7 @@ export class PageViewIndicator extends Component {
* 每个页面标记显示的图片
*/
@type(SpriteFrame)
@tooltip('每个页面标记显示的图片')
@tooltip('i18n:pageview_indicator.spriteFrame')
get spriteFrame () {
return this._spriteFrame;
}
@@ -109,7 +109,7 @@ export class PageViewIndicator extends Component {
* @param direction 摆放方向
*/
@type(Direction)
@tooltip('页面标记摆放方向')
@tooltip('i18n:pageview_indicator.direction')
get direction () {
return this._direction;
}
@@ -129,7 +129,7 @@ export class PageViewIndicator extends Component {
* 每个页面标记的大小
*/
@type(Size)
@tooltip('每个页面标记的大小')
@tooltip('i18n:pageview_indicator.cell_size')
get cellSize () {
return this._cellSize;
}
@@ -151,7 +151,7 @@ export class PageViewIndicator extends Component {
* 每个页面标记之间的边距
*/
@serializable
@tooltip('每个页面标记之间的边距')
@tooltip('i18n:pageview_indicator.spacing')
public spacing = 0;
@serializable
protected _spriteFrame: SpriteFrame | null = null;
+7 -7
View File
@@ -114,7 +114,7 @@ export class PageView extends ScrollView {
* 页面视图中每个页面大小类型
*/
@type(SizeMode)
@tooltip('页面视图中每个页面大小类型')
@tooltip('i18n:pageview.sizeMode')
get sizeMode () {
return this._sizeMode;
}
@@ -136,7 +136,7 @@ export class PageView extends ScrollView {
* 页面视图滚动类型
*/
@type(Direction)
@tooltip('页面视图滚动类型')
@tooltip('i18n:pageview.direction')
get direction () {
return this._direction;
}
@@ -160,7 +160,7 @@ export class PageView extends ScrollView {
*/
@slide
@range([0, 1, 0.01])
@tooltip('滚动临界值,默认单位百分比,当拖拽超出该数值时,松开会自动滚动下一页,小于时则还原')
@tooltip('i18n:pageview.scrollThreshold')
get scrollThreshold () {
return this._scrollThreshold;
}
@@ -182,7 +182,7 @@ export class PageView extends ScrollView {
*/
@slide
@range([0, 1, 0.01])
@tooltip('设置 PageView PageTurning 事件的发送时机')
@tooltip('i18n:pageview.pageTurningEventTiming')
get pageTurningEventTiming () {
return this._pageTurningEventTiming;
}
@@ -203,7 +203,7 @@ export class PageView extends ScrollView {
* 页面视图指示器组件
*/
@type(PageViewIndicator)
@tooltip('页面视图指示器组件')
@tooltip('i18n:pageview.indicator')
get indicator () {
return this._indicator;
}
@@ -239,7 +239,7 @@ export class PageView extends ScrollView {
* 该值与此临界值相比较,如果大于临界值,则进行自动翻页。
*/
@serializable
@tooltip('快速滑动翻页临界值\n当用户快速滑动时,会根据滑动开始和结束的距离与时间计算出一个速度值\n该值与此临界值相比较,如果大于临界值,则进行自动翻页')
@tooltip('i18n:pageview.autoPageTurningThreshold')
public autoPageTurningThreshold = 100;
@type(ScrollBar)
@@ -299,7 +299,7 @@ export class PageView extends ScrollView {
*/
@type([ComponentEventHandler])
@serializable
@tooltip('滚动视图的事件回调函数')
@tooltip('i18n:pageview.pageEvents')
public pageEvents: ComponentEventHandler[] = [];
@serializable
+5 -5
View File
@@ -114,7 +114,7 @@ export class ProgressBar extends Component {
* 用来显示进度条比例的 Sprite 对象。
*/
@type(Sprite)
@tooltip('进度条显示用的 Sprite 节点,可以动态改变尺寸')
@tooltip('i18n:progress.bar_sprite')
get barSprite () {
return this._barSprite;
}
@@ -136,7 +136,7 @@ export class ProgressBar extends Component {
* 进度条的模式。
*/
@type(Mode)
@tooltip('进度条显示模式,目前支持水平和垂直两种')
@tooltip('i18n:progress.mode')
get mode () {
return this._mode;
}
@@ -169,7 +169,7 @@ export class ProgressBar extends Component {
* @zh
* 进度条实际的总长度。
*/
@tooltip('进度条在 progress 为 1 时的最大长度')
@tooltip('i18n:progress.total_length')
get totalLength () {
return this._totalLength;
}
@@ -191,7 +191,7 @@ export class ProgressBar extends Component {
*/
@range([0, 1, 0.1])
@slide
@tooltip('当前进度指示,范围从 0 到 1')
@tooltip('i18n:progress.progress')
get progress () {
return this._progress;
}
@@ -212,7 +212,7 @@ export class ProgressBar extends Component {
* @zh
* 进度条是否进行反方向变化。
*/
@tooltip('是否反向驱动进度条')
@tooltip('i18n:progress.reverse')
get reverse () {
return this._reverse;
}
+4 -4
View File
@@ -98,7 +98,7 @@ export class ScrollBar extends Component {
*/
@type(Sprite)
@displayOrder(0)
@tooltip('作为当前滚动区域位置显示的滑块 Sprite')
@tooltip('i18n:scrollbar.handle')
get handle () {
return this._handle;
}
@@ -120,7 +120,7 @@ export class ScrollBar extends Component {
*/
@type(Direction)
@displayOrder(1)
@tooltip('ScrollBar 的滚动方向')
@tooltip('i18n:scrollbar.direction')
get direction () {
return this._direction;
}
@@ -142,7 +142,7 @@ export class ScrollBar extends Component {
* 是否在没有滚动动作时自动隐藏 ScrollBar。
*/
@displayOrder(2)
@tooltip('是否在没有滚动动作时自动隐藏 ScrollBar')
@tooltip('i18n:scrollbar.auto_hide')
get enableAutoHide () {
return this._enableAutoHide;
}
@@ -168,7 +168,7 @@ export class ScrollBar extends Component {
* 注意:只要当 “enableAutoHide” 为 true 时,才有效。
*/
@displayOrder(3)
@tooltip('没有滚动动作后经过多久会自动隐藏。\n注意:只要当 “enableAutoHide” 为 true 时,才有效。')
@tooltip('i18n:scrollbar.auto_hide_time')
get autoHideTime () {
return this._autoHideTime;
}
+11 -11
View File
@@ -222,7 +222,7 @@ export class ScrollView extends ViewGroup {
@serializable
@range([0, 10])
@displayOrder(0)
@tooltip('回弹持续的时间,0 表示将立即反弹')
@tooltip('i18n:scrollview.bounceDuration')
public bounceDuration = 1;
/**
@@ -236,7 +236,7 @@ export class ScrollView extends ViewGroup {
@serializable
@range([0, 1, 0.1])
@displayOrder(1)
@tooltip('开启惯性后,在用户停止触摸后滚动多快停止,0 表示永不停止,1 表示立刻停止')
@tooltip('i18n:scrollview.brake')
public brake = 0.5;
/**
@@ -248,7 +248,7 @@ export class ScrollView extends ViewGroup {
*/
@serializable
@displayOrder(2)
@tooltip('是否允许滚动内容超过边界,并在停止触摸后回弹')
@tooltip('i18n:scrollview.elastic')
public elastic = true;
/**
@@ -260,7 +260,7 @@ export class ScrollView extends ViewGroup {
*/
@serializable
@displayOrder(3)
@tooltip('是否开启滚动惯性')
@tooltip('i18n:scrollview.inertia')
public inertia = true;
/**
@@ -272,7 +272,7 @@ export class ScrollView extends ViewGroup {
*/
@type(Node)
@displayOrder(4)
@tooltip('可滚动展示内容的节点')
@tooltip('i18n:scrollview.content')
get content () {
return this._content;
}
@@ -299,7 +299,7 @@ export class ScrollView extends ViewGroup {
*/
@serializable
@displayOrder(5)
@tooltip('是否开启水平滚动')
@tooltip('i18n:scrollview.horizontal')
public horizontal = true;
/**
@@ -310,7 +310,7 @@ export class ScrollView extends ViewGroup {
*/
@type(ScrollBar)
@displayOrder(6)
@tooltip('水平滚动的 ScrollBar')
@tooltip('i18n:scrollview.horizontal_bar')
get horizontalScrollBar () {
return this._horizontalScrollBar;
}
@@ -337,7 +337,7 @@ export class ScrollView extends ViewGroup {
*/
@serializable
@displayOrder(7)
@tooltip('是否开启垂直滚动')
@tooltip('i18n:scrollview.vertical')
public vertical = true;
/**
@@ -349,7 +349,7 @@ export class ScrollView extends ViewGroup {
*/
@type(ScrollBar)
@displayOrder(8)
@tooltip('垂直滚动的 ScrollBar')
@tooltip('i18n:scrollview.vertical_bar')
get verticalScrollBar () {
return this._verticalScrollBar;
}
@@ -378,7 +378,7 @@ export class ScrollView extends ViewGroup {
*/
@serializable
@displayOrder(9)
@tooltip('滚动行为是否会取消子节点上注册的触摸事件')
@tooltip('i18n:scrollview.cancelInnerEvents')
public cancelInnerEvents = true;
/**
@@ -391,7 +391,7 @@ export class ScrollView extends ViewGroup {
@type([ComponentEventHandler])
@serializable
@displayOrder(10)
@tooltip('滚动视图的事件回调函数')
@tooltip('i18n:scrollview.scrollEvents')
public scrollEvents: ComponentEventHandler[] = [];
get view () {
+4 -4
View File
@@ -90,7 +90,7 @@ export class Slider extends Component {
* 滑动器滑块按钮部件。
*/
@type(Sprite)
@tooltip('滑块按钮部件')
@tooltip('i18n:slider.handle')
get handle () {
return this._handle;
}
@@ -114,7 +114,7 @@ export class Slider extends Component {
* 滑动器方向。
*/
@type(Direction)
@tooltip('滑动方向')
@tooltip('i18n:slider.direction')
get direction () {
return this._direction;
}
@@ -137,7 +137,7 @@ export class Slider extends Component {
*/
@slide
@range([0, 1, 0.01])
@tooltip('当前进度值,该数值的区间是 0 - 1 之间。')
@tooltip('i18n:slider.progress')
get progress () {
return this._progress;
}
@@ -162,7 +162,7 @@ export class Slider extends Component {
*/
@type([EventHandler])
@serializable
@tooltip('滑动器组件事件回调函数')
@tooltip('i18n:slider.slideEvents')
public slideEvents: EventHandler[] = [];
@serializable
private _handle: Sprite | null = null;
@@ -70,7 +70,7 @@ import { legacyCC } from '../core/global-exports';
@requireComponent(UITransform)
@menu('Miscellaneous/SubContextView')
export class SubContextView extends Component {
@tooltip('子域的设计分辨率,禁止在运行时动态更新')
@tooltip('i18n:subContextView.design_size')
get designResolutionSize () {
return this._designResolutionSize;
}
@@ -81,7 +81,7 @@ export class SubContextView extends Component {
this._designResolutionSize.set(value);
}
@tooltip('主域更新子域贴图的频率')
@tooltip('i18n:subContextView.fps')
get fps () {
return this._fps;
}
+2 -2
View File
@@ -63,7 +63,7 @@ export class ToggleContainer extends Component {
* @zh
* 如果这个设置为 true,那么 toggle 按钮在被点击的时候可以反复地被选中和未选中。
*/
@tooltip('如果这个设置为 true, 那么 toggle 按钮在被点击的时候可以反复地被选中和未选中。')
@tooltip('i18n:toggle_group.allowSwitchOff')
get allowSwitchOff () {
return this._allowSwitchOff;
}
@@ -81,7 +81,7 @@ export class ToggleContainer extends Component {
*/
@type([ComponentEventHandler])
@serializable
@tooltip('选中事件。列表类型,默认为空,用户添加的每一个事件由节点引用,组件名称和一个响应函数组成。')
@tooltip('i18n:toggle_group.check_events')
public checkEvents: ComponentEventHandler[] = [];
/**
+3 -3
View File
@@ -66,7 +66,7 @@ export class Toggle extends Button {
* 如果这个设置为 true,则 check mark 组件会处于 enabled 状态,否则处于 disabled 状态。
*/
@displayOrder(2)
@tooltip('如果这个设置为 true,则 check mark 组件会处于 enabled 状态,否则处于 disabled 状态。')
@tooltip('i18n:toggle.isChecked')
get isChecked () {
return this._isChecked;
}
@@ -84,7 +84,7 @@ export class Toggle extends Button {
*/
@type(Sprite)
@displayOrder(3)
@tooltip('Toggle 处于选中状态时显示的精灵图片')
@tooltip('i18n:toggle.checkMark')
get checkMark () {
return this._checkMark;
}
@@ -122,7 +122,7 @@ export class Toggle extends Button {
*/
@type([ComponentEventHandler])
@serializable
@tooltip('列表类型,默认为空,用户添加的每一个事件由节点引用,组件名称和一个响应函数组成')
@tooltip('i18n:toggle.check_events')
public checkEvents: ComponentEventHandler[] = [];
@serializable
protected _isChecked = true;
@@ -55,7 +55,7 @@ export class UICoordinateTracker extends Component {
* 目标对象。
*/
@type(Node)
@tooltip('目标对象')
@tooltip('i18n:UICoordinateTracker.target')
get target () {
return this._target;
}
@@ -71,13 +71,13 @@ export class UICoordinateTracker extends Component {
/**
* @en
* 3D camera for conversion.
* The 3D camera representing the original coordinate system.
*
* @zh
* 照射相机。
*/
@type(Camera)
@tooltip('照射相机')
@tooltip('i18n:UICoordinateTracker.camera')
get camera () {
return this._camera;
}
@@ -93,13 +93,12 @@ export class UICoordinateTracker extends Component {
/**
* @en
* Do you need to scale the converted 2d node size according to how far the 3D node is from the camera.
* Note:need to combine the distance parameter to calculate.
* Whether to scale the converted 2d node's size according to the distance between the camera and the 3d node.
*
* @zh
* 是否是缩放映射。
*/
@tooltip('是否是缩放映射')
@tooltip('i18n:UICoordinateTracker.use_scale')
get useScale () {
return this._useScale;
}
@@ -114,12 +113,12 @@ export class UICoordinateTracker extends Component {
/**
* @en
* The distance from the camera is the normal display calculation size.
* The distance from the camera for displaying the 2d node in normal size.
*
* @zh
* 距相机多少距离为正常显示计算大小。
*/
@tooltip('距相机多少距离为正常显示计算大小')
@tooltip('i18n:UICoordinateTracker.distance')
get distance () {
return this._distance;
}
@@ -134,14 +133,16 @@ export class UICoordinateTracker extends Component {
/**
* @en
* Event callback after value change.
* Event callback after coordinates synchronization.
* The first parameter of the callback is the mapped local coordinate in UI camera.
* The second parameter is the distance scale of the 3d node from the 3d camera viewport.
*
* @zh
* 映射数据事件。回调的第一个参数是映射后的本地坐标,第二个是距相机距离比。
*/
@type([EventHandler])
@serializable
@tooltip('映射数据事件。回调的第一个参数是映射后的本地坐标,第二个是距相机距离比')
@tooltip('i18n:UICoordinateTracker.sync_events')
public syncEvents: EventHandler[] = [];
@serializable
+14 -8
View File
@@ -218,7 +218,7 @@ export class Widget extends Component {
* 指定一个对齐目标,只能是当前节点的其中一个父节点,默认为空,为空时表示当前父节点。
*/
@type(Node)
@tooltip('对齐目标')
@tooltip('i18n:widget.target')
get target () {
return this._target;
}
@@ -248,7 +248,7 @@ export class Widget extends Component {
* @zh
* 是否对齐上边。
*/
@tooltip('是否对齐上边')
@tooltip('i18n:widget.align_top')
get isAlignTop () {
return (this._alignFlags & AlignFlags.TOP) > 0;
}
@@ -264,7 +264,7 @@ export class Widget extends Component {
* @zh
* 是否对齐下边。
*/
@tooltip('是否对齐下边')
@tooltip('i18n:widget.align_bottom')
get isAlignBottom () {
return (this._alignFlags & AlignFlags.BOT) > 0;
}
@@ -280,7 +280,7 @@ export class Widget extends Component {
* @zh
* 是否对齐左边。
*/
@tooltip('是否对齐左边')
@tooltip('i18n:widget.align_left')
get isAlignLeft () {
return (this._alignFlags & AlignFlags.LEFT) > 0;
}
@@ -296,7 +296,7 @@ export class Widget extends Component {
* @zh
* 是否对齐右边。
*/
@tooltip('是否对齐右边')
@tooltip('i18n:widget.align_right')
get isAlignRight () {
return (this._alignFlags & AlignFlags.RIGHT) > 0;
}
@@ -312,7 +312,7 @@ export class Widget extends Component {
* @zh
* 是否垂直方向对齐中点,开启此项会将垂直方向其他对齐选项取消。
*/
@tooltip('是否垂直方向对齐中点,开启此项会将垂直方向其他对齐选项取消')
@tooltip('i18n:widget.align_h_center')
get isAlignVerticalCenter () {
return (this._alignFlags & AlignFlags.MID) > 0;
}
@@ -335,7 +335,7 @@ export class Widget extends Component {
* @zh
* 是否水平方向对齐中点,开启此选项会将水平方向其他对齐选项取消。
*/
@tooltip('是否水平方向对齐中点,开启此选项会将水平方向其他对齐选项取消')
@tooltip('i18n:widget.align_v_center')
get isAlignHorizontalCenter () {
return (this._alignFlags & AlignFlags.CENTER) > 0;
}
@@ -386,6 +386,7 @@ export class Widget extends Component {
* @zh
* 本节点顶边和父节点顶边的距离,可填写负值,只有在 isAlignTop 开启时才有作用。
*/
@tooltip('i18n:widget.top')
get top () {
return this._top;
}
@@ -414,6 +415,7 @@ export class Widget extends Component {
* @zh
* 本节点底边和父节点底边的距离,可填写负值,只有在 isAlignBottom 开启时才有作用。
*/
@tooltip('i18n:widget.bottom')
get bottom () {
return this._bottom;
}
@@ -442,6 +444,7 @@ export class Widget extends Component {
* @zh
* 本节点左边和父节点左边的距离,可填写负值,只有在 isAlignLeft 开启时才有作用。
*/
@tooltip('i18n:widget.left')
get left () {
return this._left;
}
@@ -470,6 +473,7 @@ export class Widget extends Component {
* @zh
* 本节点右边和父节点右边的距离,可填写负值,只有在 isAlignRight 开启时才有作用。
*/
@tooltip('i18n:widget.right')
get right () {
return this._right;
}
@@ -498,6 +502,7 @@ export class Widget extends Component {
* @zh
* 水平居中的偏移值,可填写负值,只有在 isAlignHorizontalCenter 开启时才有作用。
*/
@tooltip('i18n:widget.horizontal_center')
get horizontalCenter () {
return this._horizontalCenter;
}
@@ -526,6 +531,7 @@ export class Widget extends Component {
* @zh
* 垂直居中的偏移值,可填写负值,只有在 isAlignVerticalCenter 开启时才有作用。
*/
@tooltip('i18n:widget.vertical_center')
get verticalCenter () {
return this._verticalCenter;
}
@@ -680,7 +686,7 @@ export class Widget extends Component {
* ```
*/
@type(AlignMode)
@tooltip('指定 widget 的对齐方式,用于决定运行时 widget 应何时更新')
@tooltip('i18n:widget.align_mode')
get alignMode () {
return this._alignMode;
}
+51 -28
View File
@@ -150,28 +150,28 @@ module.exports = {
},
button: {
click_event: {
target: 'Node receives a click event?',
component: 'Component receives a click event?',
handler: 'What method is called on the click event?',
target: 'Node that receives click events',
component: 'Component that receive click events',
handler: 'Component method to respond to click events',
customEventData: "The extra event data passed to the event handler, it's passed in as the last argument in the event handler. ",
},
interactable: 'Interactive button? When this one is not selected, the button is in a disabled state',
transition: 'Transition Type: when the state changes',
interactable: 'Interactable state of the button, when this item is unchecked, the button is disabled',
transition: 'Transition type when the button state changes',
normal_color: 'Button color',
pressed_color: 'Button color when pressed',
hover_color: 'Button color when the mouse hovers over it',
disabled_color: 'Button color when disabled',
duration: 'How long until the button color/scale transitions to a new color?',
duration: 'Transition time for button color change or zoom change',
zoom_scale:
'When user press the button, the button will zoom to a scale.The final scale of the button equals (button original scale * zoomScale), zoomScale could be negative value.',
'When the user clicks the button, the button is scaled to a value equal to the original scale of the Button * zoomScale, zoomScale can be a negative number',
auto_gray_effect: 'When this flag is true, Button target sprite will turn gray when interactable is false.',
normal_sprite: 'The Sprite that is used when the button is in a normal sate.',
pressed_sprite: 'The Sprite that is used when the button is in a pressed sate.',
hover_sprite: 'The Sprite that is used when the button is hovered over.',
disabled_sprite: 'The Sprite that is used when the button is in a disabled sate.',
normal_sprite: 'The sprite frame used when the button is in a normal sate.',
pressed_sprite: 'The sprite frame used when the button is in a pressed sate.',
hover_sprite: 'The sprite frame used when the button is in hovered over.',
disabled_sprite: 'The sprite frame used when the button is in a disabled sate.',
target:
"reference to the Sprite as button's background. When the state of the button changes the sprite's color or spriteFrame will be updated.",
click_events: 'What method is called on the click event?',
"reference to the Sprite as target's background. When the state of the target changes the sprite's color or spriteFrame will be updated.",
click_events: 'By changing the number to 1 or more, you can set the receiver and the handler for each click event',
},
canvas: {
camera: '2D rendering camera',
@@ -209,7 +209,7 @@ module.exports = {
},
progress: {
bar_sprite: 'A progress bar is displayed with the Sprite node that can dynamically change the size',
mode: 'Horizontal or Vertical progress bar?',
mode: 'Progress bar display modes, including: \n 1. HORIZONTAL: horizontal mode \n 2. VERTICAL: vertical mode \n 3. FILLED: fan-fill mode',
total_length: 'Length of progress bar. The maximum length of 100',
progress: 'Current progress indicator, ranging from 0-1',
reverse: 'Can the progress bar update negatively (i.e go backwards)',
@@ -217,20 +217,19 @@ module.exports = {
scrollbar: {
handle: 'reference to the interactive bar sprite',
direction: 'Scroll direction',
auto_hide: 'Hide scroll bar when it is not scrolling?',
auto_hide_time: 'How long to wait to hide the scroll bar when it is not scrolling?',
auto_hide: 'Automatically hide',
auto_hide_time: 'How long will the scroll bar to be hidden after no scrolling action.\nNote: Only valid if "enableAutoHide" is true',
},
scrollview: {
content: 'A scrollable display of the Nodes content',
horizontal: 'Horizontal scroll',
vertical: 'Vertical scroll',
inertia: 'Use intertia when scrolling? (or just let your finger do all the work?)',
brake: 'When using interia scrolling what to do when the user stops touching? 0 never stop, 1 stop immediately',
elastic: 'Use elastic scrolling?',
bounce_time: 'When using elastic scrolling how long to rebound afterwards?',
inertia: 'When inertia is set, the content will continue to move when touch ended',
brake: 'It determines how quickly the content stop moving\nA value of 1 will stop the movement immediately\nA value of 0 will never stop the movement until it reaches to the boundary of scrollview',
elastic: "If elastic is set, the content will bounce back when it's moved out of scroll boundary.",
horizontal_bar: 'Horizontal scrollbar',
vertical_bar: 'Vertical scrollbar',
bounceDuration: 'The elapse time of bouncing back. A value of 0 will bounce back immediately',
bounceDuration: 'The elapse time for bouncing. A value of 0 means the content will bounce back immediately.',
scrollEvents: 'Scrollview events callback',
cancelInnerEvents: 'If cancelInnerEvents is set to true, the scroll behavior will cancel touch events on inner content nodes',
},
@@ -245,7 +244,7 @@ module.exports = {
pageTurningSpeed: 'The time required to turn over a page. unit: second',
pageEvents: 'PageView events callback',
autoPageTurningThreshold:
'Auto page turning velocity threshold. When users swipe the PageView quickly, it will calculate a velocity based on the scroll distance and time, if the calculated velocity is larger than the threshold, then it will trigger page turning',
'The turning velocity threshold for page turning\nWhen user swipes the PageView quickly, a velocity is calculated based on the swipe distance and time.\nIf the velocity is larger than the threshold, the page will be flipped',
},
pageview_indicator: {
spriteFrame: 'The spriteFrame for each element',
@@ -275,10 +274,12 @@ module.exports = {
checkMark: 'The Sprite component displayed when Toggle is checked.',
toggleGroup:
'The toggle group which the toggle belongs to. When it is null, the toggle is a CheckBox. Otherwise, the toggle is a RadioButton.',
check_events: 'The events triggered while toggle item is checked',
},
toggle_group: {
allowSwitchOff:
"If this setting is true, a toggle could be switched off and on when pressed.If it is false, it will make sure there is always only one toggle could be switched on and the already switched on toggle can't be switched off.",
check_events: "If Toggle is clicked, it will trigger event's handler.",
},
slider: {
handle: 'The "handle" part of the slider',
@@ -289,12 +290,12 @@ module.exports = {
widget: {
target:
'Specifies an alignment target that can only be one of the parent nodes of the current node. The default value is null, and when null, indicates the current parent',
align_top: 'Top edge alignment of the parent Node',
align_bottom: 'Bottom edge alignment of the parent Node',
align_left: 'Left edge alignment of the parent Node',
align_right: 'Right edge alignment of the parent Node',
align_h_center: 'Align to the horizontal midpoint of the parent Node',
align_v_center: 'Align to the vertical midpoint of the parent Node',
align_top: 'Top edge alignment of the target Node',
align_bottom: 'Bottom edge alignment of the target Node',
align_left: 'Left edge alignment of the target Node',
align_right: 'Right edge alignment of the target Node',
align_h_center: 'Align to the horizontal midpoint of the target Node',
align_v_center: 'Align to the vertical midpoint of the target Node',
align_mode: 'Specifies the alignment mode of the Widget, which determines when the widget should refresh at runtime.',
top: 'Top edge postion in pixels. This can be a percentage and a positive or negative value',
bottom: 'Bottom edge postion in pixels. This can be a percentage and a positive or negative value',
@@ -318,6 +319,11 @@ module.exports = {
horizontal_direction: 'Horizontally align in the direction of the child Nodes: \n 1. LEFT_TO_RIGHT \n 2. RIGHT_TO_LEFT',
cell_size: 'In Grid layout, the size of each child element.',
start_axis: 'In Grid layout, the arrangement direction of children elements.',
constraint: 'In Grid layout, content layout constraints, including: \n 1.NONE, no constraints \n 2.FIXED_ROW, fixed number of rows \n 3.FIXED_COL, fixed number of columns',
constraint_number: 'In Grid layout, number of rows or columns for content layout constraints',
affected_scale: 'Child node scaling affects layout',
align_horizontal: 'Align content horizontally\nFixed starting position in the same direction when Type is Horizontal.',
align_vertical: 'Align content vertically\nFixed starting position in the same direction when Type is Vertical.',
},
particle: {
export_title: 'Export custom particle data to plist file.',
@@ -341,6 +347,12 @@ module.exports = {
placeholder_font_size: 'The font size of placeholder label.',
placeholder_font_color: 'The font color of placeholder label.',
max_length: 'The maximize input characters.',
text_lable: "The Label component attached to the node for EditBox's input text label",
placeholder_label: "The Label component attached to the node for EditBox's placeholder text label",
editing_began: 'The event handler to be triggered when user begin to edit text',
text_changed: 'The event handler to be triggered when the text content changes',
editing_ended: 'The event handler to be triggered when user stop editing\nIn single line mode, the function is usually called when the user presses enter or clicks outside the input box on the screen \n In case of multiline input, the function is usually called when the user clicks outside the input box on the screen',
editing_return: 'The event handler to be called when return key is pressed\nIn single line mode, pressing the Enter key also causes the input box to lose focus',
},
videoplayer: {
resourceType: 'The resource type of video player, REMOTE for remote url and LOCAL for local file path.',
@@ -377,6 +389,17 @@ module.exports = {
handleTouchEvent:
'Once checked, the RichText will block all input events (mouse and touch) within the bounding box of the node, preventing the input from penetrating into the underlying node.',
},
UICoordinateTracker: {
target: 'Target node',
camera: 'The 3D camera representing the original coordinate system.',
use_scale: "Whether to scale the converted 2d node's size according to the distance between the camera and the 3d node.",
distance: 'The distance from the camera for displaying the 2d node in normal size',
sync_events: 'Event callback after coordinates synchronization.\nThe first parameter of the callback is the mapped local coordinate in UI camera.\nThe second parameter is the distance scale of the 3d node from the 3d camera viewport.',
},
SubContextView: {
design_size: 'Design resolution of the SubContextView, dynamic updates at runtime is not possible',
fps: 'Update frame rate for the SubContextView',
},
skeleton: {
skeleton_data: 'The skeleton data contains the skeleton information, drag the json file exported from Spine to get started.',
default_skin: 'Choose the default skin.',
+38 -15
View File
@@ -165,7 +165,7 @@ module.exports = {
pressed_sprite: '按下状态的按钮背景图资源',
hover_sprite: '悬停状态的按钮背景图资源',
disabled_sprite: '禁用状态的按钮背景图资源',
target: '指定 Button 背景节点,Button 状态改变时会修改此节点的 Color 或 Sprite 属性',
target: '指定背景节点,状态改变时会修改此节点的 Color 或 Sprite 属性',
click_events: '按钮点击事件的列表。先将数量改为1或更多,就可以为每个点击事件设置接受者和处理方法',
},
canvas: {
@@ -205,7 +205,7 @@ module.exports = {
},
progress: {
bar_sprite: '进度条显示用的 Sprite 节点,可以动态改变尺寸',
mode: '进度条显示模式,目前支持水平和垂直两种',
mode: '进度条显示模式, 包括以下三种:\n 1. HORIZONTAL: 水平方向模式 \n 2. VERTICAL: 垂直方向模式 \n 3. FILLED: 扇形填充模式',
total_length: '进度条在 progress 为 1 时的最大长度',
progress: '当前进度指示,范围从0到1',
reverse: '是否反向驱动进度条',
@@ -214,7 +214,7 @@ module.exports = {
handle: '作为当前滚动区域位置显示的滑块 Sprite',
direction: 'ScrollBar的滚动方向',
auto_hide: '是否在没有滚动动作时自动隐藏 ScrollBar',
auto_hide_time: '没有滚动动作后经过多久会自动隐藏',
auto_hide_time: '没有滚动动作后经过多久会自动隐藏\n注意:只有当 “enableAutoHide” 为 true 时,才有效',
},
scrollview: {
content: '包含可滚动展示内容的节点引用',
@@ -223,7 +223,6 @@ module.exports = {
inertia: '是否开启滚动惯性',
brake: '开启惯性后,在用户停止触摸后滚动多快停止,0表示永不停止,1表示立刻停止',
elastic: '是否允许滚动内容超过边界,并在停止触摸后回弹',
bounce_time: '回弹持续的时间',
horizontal_bar: '水平滚动的 ScrollBar',
vertical_bar: '垂直滚动的 ScrollBar',
bounceDuration: '回弹持续的时间,0 表示将立即反弹',
@@ -239,7 +238,7 @@ module.exports = {
pageTurningSpeed: '每个页面翻页时所需时间。单位:秒',
pageEvents: '页面视图的事件回调函数',
autoPageTurningThreshold:
'快速滑动翻页临界值。 当用户快速滑动时,会根据滑动开始和结束的距离与时间计算出一个速度值,该值与此临界值相比较,如果大于临界值,则进行自动翻页',
'快速滑动翻页临界值\n当用户快速滑动时,会根据滑动开始和结束的距离与时间计算出一个速度值\n该值与此临界值相比较,如果大于临界值,则进行自动翻页',
},
pageview_indicator: {
spriteFrame: '每个页面标记显示的图片',
@@ -268,9 +267,11 @@ module.exports = {
checkMark: 'Toggle 处于选中状态时显示的精灵图片',
toggleGroup:
'Toggle 所属的 ToggleGroup,这个属性是可选的。如果这个属性为 null,则 Toggle 是一个 CheckBox,否则,Toggle 是一个 RadioButton。',
check_events: 'Toggle 按钮的点击事件列表',
},
toggle_group: {
allowSwitchOff: '如果这个设置为 true, 那么 toggle 按钮在被点击的时候可以反复地被选中和未选中。',
check_events: 'Toggle 按钮的点击事件列表',
},
slider: {
handle: '滑块按钮部件',
@@ -280,18 +281,18 @@ module.exports = {
},
widget: {
target: '指定一个对齐目标,只能是当前节点的其中一个父节点,默认为空,为空时表示当前父节点',
align_top: '是否对齐父节点顶边',
align_bottom: '是否对齐父节点底边',
align_left: '是否对齐父节点左边',
align_right: '是否对齐父节点右边',
align_h_center: '是否对齐父节点水平中点,开启这一选项将取消水平轴上的其他对齐选项',
align_v_center: '是否对齐父节点垂直中点,开启这一选项将取消垂直轴上的其他对齐选项',
align_top: '是否对齐 target 顶边',
align_bottom: '是否对齐 target 底边',
align_left: '是否对齐 target 左边',
align_right: '是否对齐 target 右边',
align_h_center: '是否对齐 target 水平中点,开启这一选项将取消水平轴上的其他对齐选项',
align_v_center: '是否对齐 target 垂直中点,开启这一选项将取消垂直轴上的其他对齐选项',
align_mode: '指定 Widget 的对齐模式,用于决定运行时 Widget 应该何时刷新。',
top: '本节点顶边和父节点顶边的距离,可输入负值,默认单位为像素(px),也可以输入百分比,根据父节点 height 和百分比数值计算出距离',
top: '本节点顶边和 target 顶边的距离,可输入负值,默认单位为像素(px),也可以输入百分比,根据 target height 和百分比数值计算出距离',
bottom:
'本节点底边和父节点底边的距离,可输入负值,默认单位为像素(px),也可以输入百分比,根据父节点 height 和百分比数值计算出距离',
left: '本节点左边和父节点左边的距离,可输入负值,默认单位为像素(px),也可以输入百分比,根据父节点 width 和百分比数值计算出距离',
right: '本节点右边和父节点右边的距离,可输入负值,默认单位为像素(px),也可以输入百分比,根据父节点 width 和百分比数值计算出距离',
'本节点底边和 target 底边的距离,可输入负值,默认单位为像素(px),也可以输入百分比,根据 target height 和百分比数值计算出距离',
left: '本节点左边和 target 左边的距离,可输入负值,默认单位为像素(px),也可以输入百分比,根据 target width 和百分比数值计算出距离',
right: '本节点右边和 target 右边的距离,可输入负值,默认单位为像素(px),也可以输入百分比,根据 target width 和百分比数值计算出距离',
horizontal_center: '水平居中的偏移值,可输入负值,默认单位为像素(px),也可以是百分比',
vertical_center: '垂直居中的偏移值,可输入负值,默认单位为像素(px),也可以是百分比',
},
@@ -310,6 +311,11 @@ module.exports = {
horizontal_direction: '水平排列子节点的方向,包括:\n 1. LEFT_TO_RIGHT, 从左到右排列 \n 2. RIGHT_TO_LEFT, 从右到左排列',
cell_size: '网格布局中,规定每一个网格的大小',
start_axis: '网格布局中,子物体排版时的起始方向轴,支持水平和垂直两个方向。',
constraint: '网格布局中,内容布局约束,包括:\n 1.NONE,无约束 \n 2.FIXED_ROW,行数固定 \n 3.FIXED_COL,列数固定',
constraint_number: '网格布局中,内容布局约束的行或列数量',
affected_scale: '子节点缩放比例是否影响布局',
align_horizontal: '自动对齐。在 Type 为 Horizontal 时自动对齐纵坐标',
align_vertical: '自动对齐。在 Type 为 Vertical 时自动对齐横坐标',
},
particle: {
export_title: '将自定义的粒子数据导出成 plist 文件',
@@ -333,6 +339,12 @@ module.exports = {
placeholder_font_size: '输入框占位符的字体大小',
placeholder_font_color: '输入框占位符的字体颜色',
max_length: '输入框最大允许输入的字符个数',
text_lable: '输入框输入文本节点上挂载的 Label 组件对象',
placeholder_label: '输入框占位符节点上挂载的 Label 组件对象',
editing_began: '开始编辑文本输入框触发的事件回调',
text_changed: '编辑文本输入框时触发的事件回调',
editing_ended: '结束编辑文本输入框时触发的事件回调\n在单行模式下面,一般是在用户按下回车或者点击屏幕输入框以外的地方调用该函数\n如果是多行输入,一般是在用户点击屏幕输入框以外的地方调用该函数',
editing_return: '当用户按下回车按键时的事件回调\n如果是单行输入框,按回车键还会使输入框失去焦点',
},
videoplayer: {
resourceType: '视频来源:REMOTE 表示远程视频 URL,LOCAL 表示本地视频地址。',
@@ -365,6 +377,17 @@ module.exports = {
image_atlas: '对于 img 标签里面的 src 属性名称,都需要在 imageAtlas 里面找到一个有效的 spriteFrame,否则 img tag 会判定为无效',
handleTouchEvent: '选中此选项后,RichText 将阻止节点边界框中的所有输入事件(鼠标和触摸),从而防止输入事件穿透到底层节点',
},
UICoordinateTracker: {
target: '目标对象',
camera: '照射相机',
use_scale: '是否是缩放映射',
distance: '距相机多少距离为正常显示计算大小',
sync_events: '映射数据事件\n回调的第一个参数是映射后的本地坐标,第二个是距相机距离',
},
SubContextView: {
design_size: '子域的设计分辨率,禁止在运行时动态更新',
fps: '主域更新子域贴图的频率',
},
skeleton: {
skeleton_data: '骨骼信息数据,拖拽 Spine 导出的骨骼动画信息 json 资源到这里来开始使用',
default_skin: '选择默认的皮肤',