diff --git a/cocos/2d/assembler/label/letter-font.ts b/cocos/2d/assembler/label/letter-font.ts index 3acef2a0bcf..a0229c12bfa 100644 --- a/cocos/2d/assembler/label/letter-font.ts +++ b/cocos/2d/assembler/label/letter-font.ts @@ -25,7 +25,7 @@ import { js } from '../../../core'; import { Label, LabelOutline } from '../../components'; import { bmfontUtils } from './bmfontUtils'; -import { shareLabelInfo, LetterAtlas, computeHash } from './font-utils'; +import { shareLabelInfo, LetterAtlas, computeHash, LetterRenderTexture } from './font-utils'; const _atlasWidth = 1024; const _atlasHeight = 1024; @@ -39,7 +39,7 @@ export const letterFont = js.mixin(bmfontUtils, { _shareAtlas = new LetterAtlas(_atlasWidth, _atlasHeight); } - return _shareAtlas.getTexture(); + return _shareAtlas.getTexture() as LetterRenderTexture | null; }, _updateFontFamily (comp) { @@ -47,12 +47,12 @@ export const letterFont = js.mixin(bmfontUtils, { shareLabelInfo.fontFamily = this._getFontFamily(comp); // outline - const outline = comp.getComponent(LabelOutline); - if (outline && outline.enabled) { + const isOutlined = comp.outlineUsed && comp.outlineWidth > 0; + if (isOutlined) { shareLabelInfo.isOutlined = true; - shareLabelInfo.margin = outline.width; - shareLabelInfo.out = outline.color.clone(); - shareLabelInfo.out.a = outline.color.a * comp.color.a / 255.0; + shareLabelInfo.margin = comp.outlineWidth; + shareLabelInfo.out = comp.outlineColor.clone(); + shareLabelInfo.out.a = comp.outlineColor.color.a * comp.color.a / 255.0; } else { shareLabelInfo.isOutlined = false; shareLabelInfo.margin = 0; diff --git a/cocos/2d/assembler/label/ttfUtils.ts b/cocos/2d/assembler/label/ttfUtils.ts index 941cad48eac..95acfeca9e5 100644 --- a/cocos/2d/assembler/label/ttfUtils.ts +++ b/cocos/2d/assembler/label/ttfUtils.ts @@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -import { Label, LabelOutline, LabelShadow } from '../../components'; +import { Label } from '../../components'; import { ISharedLabelData } from './font-utils'; import { UITransform } from '../../framework/ui-transform'; import { dynamicAtlasManager } from '../../utils/dynamic-atlas/atlas-manager'; @@ -35,8 +35,14 @@ const Overflow = Label.Overflow; export const ttfUtils = { - updateProcessingData (style: TextStyle, layout: TextLayout, - outputLayoutData: TextOutputLayoutData, outputRenderData: TextOutputRenderData, comp: Label, trans: UITransform): void { + updateProcessingData ( + style: TextStyle, + layout: TextLayout, + outputLayoutData: TextOutputLayoutData, + outputRenderData: TextOutputRenderData, + comp: Label, + trans: UITransform, + ): void { // font info // both style.isSystemFontUsed = comp.useSystemFont; style.fontSize = comp.fontSize; @@ -62,25 +68,23 @@ export const ttfUtils = { style.underlineHeight = comp.underlineHeight; // outline// both - let outlineComp = LabelOutline && comp.getComponent(LabelOutline); - outlineComp = (outlineComp && outlineComp.enabled && outlineComp.width > 0) ? outlineComp : null; - if (outlineComp) { + const isOutlined = comp.outlineUsed && comp.outlineWidth > 0; + if (isOutlined) { style.isOutlined = true; - style.outlineColor.set(outlineComp.color); - style.outlineWidth = outlineComp.width; + style.outlineColor.set(comp.outlineColor); + style.outlineWidth = comp.outlineWidth; } else { style.isOutlined = false; } // shadow// both - let shadowComp = LabelShadow && comp.getComponent(LabelShadow); - shadowComp = (shadowComp && shadowComp.enabled) ? shadowComp : null; - if (shadowComp) { + const isShadow = comp.shadowUsed; + if (isShadow) { style.hasShadow = true; - style.shadowColor.set(shadowComp.color); - style.shadowBlur = shadowComp.blur; - style.shadowOffsetX = shadowComp.offset.x; - style.shadowOffsetY = shadowComp.offset.y; + style.shadowColor.set(comp.shadowColor); + style.shadowBlur = comp.shadowBlur; + style.shadowOffsetX = comp.shadowOffset.x; + style.shadowOffsetY = comp.shadowOffset.y; } else { style.hasShadow = false; } @@ -126,8 +130,15 @@ export const ttfUtils = { // TextProcessing processing.processingString(false, style, layout, outputLayoutData, comp.string); - processing.generateRenderInfo(false, style, layout, outputLayoutData, outputRenderData, - comp.string, this.generateVertexData); + processing.generateRenderInfo( + false, + style, + layout, + outputLayoutData, + outputRenderData, + comp.string, + this.generateVertexData, + ); const renderData = comp.renderData; renderData.textureDirty = true; @@ -173,9 +184,11 @@ export const ttfUtils = { }, updateVertexData (comp: Label): void { + // no needs to update vertex data }, updateUVs (comp: Label): void { + // no needs to update uv data }, _updateFontFamily (comp: Label): string { diff --git a/cocos/2d/components/deprecated.ts b/cocos/2d/components/deprecated.ts index 0e8eb00bceb..cd2ed98e9d1 100644 --- a/cocos/2d/components/deprecated.ts +++ b/cocos/2d/components/deprecated.ts @@ -31,7 +31,8 @@ import { UIMeshRenderer } from './ui-mesh-renderer'; import { Graphics } from './graphics'; import { UIStaticBatch } from './ui-static-batch'; import { UIOpacity } from './ui-opacity'; -import { js, cclegacy, replaceProperty } from '../../core'; +import { js, cclegacy, replaceProperty, markAsWarning } from '../../core'; +import { LabelShadow } from './label-shadow'; /** * Alias of [[Mask]] @@ -125,3 +126,29 @@ replaceProperty(MaskType, 'MaskType', [ targetName: 'MaskType', }, ]); + +markAsWarning(LabelOutline.prototype, 'LabelOutline.prototype', [ + { + name: 'width', + suggest: 'Please use Label.prototype.outlineWidth instead.', + }, + { + name: 'color', + suggest: 'Please use Label.prototype.outlineColor instead.', + }, +]); + +markAsWarning(LabelShadow.prototype, 'LabelShadow.prototype', [ + { + name: 'color', + suggest: 'Please use Label.prototype.shadowColor instead.', + }, + { + name: 'offset', + suggest: 'Please use Label.prototype.shadowOffset instead.', + }, + { + name: 'blur', + suggest: 'Please use Label.prototype.shadowBlur instead.', + }, +]); diff --git a/cocos/2d/components/label-outline.ts b/cocos/2d/components/label-outline.ts index ba50ae80fa8..b00cb516297 100644 --- a/cocos/2d/components/label-outline.ts +++ b/cocos/2d/components/label-outline.ts @@ -35,15 +35,7 @@ import { Label } from './label'; * @zh * 描边效果组件,用于字体描边,只能用于系统字体。 * - * @example - * ```ts - * import { Node, Label, LabelOutline } from 'cc'; - * // Create a new node and add label components. - * const node = new Node("New Label"); - * const label = node.addComponent(Label); - * const outline = node.addComponent(LabelOutline); - * node.parent = this.node; - * ``` + * @deprecated since v3.8.2, please use [[Label.outlineUsed]] instead. */ @ccclass('cc.LabelOutline') @help('i18n:cc.LabelOutline') @@ -64,11 +56,7 @@ export class LabelOutline extends Component { * @zh * 改变描边的颜色。 * - * @example - * ```ts - * import { Color } from 'cc'; - * outline.color = new Color(0.5, 0.3, 0.7, 1.0); - * ``` + * @deprecated since v3.8.2, please use [[Label.outlineColor]] instead. */ @tooltip('i18n:labelOutline.color') // @constget @@ -82,7 +70,10 @@ export class LabelOutline extends Component { } this._color.set(value); - this._updateRenderData(); + const label = this.node.getComponent(Label); + if (label) { + label.outlineColor = this._color; + } } /** @@ -92,10 +83,7 @@ export class LabelOutline extends Component { * @zh * 改变描边的宽度。 * - * @example - * ```ts - * outline.width = 3; - * ``` + * @deprecated since v3.8.2, please use [[Label.outlineWidth]] instead. */ @tooltip('i18n:labelOutline.width') get width (): number { @@ -108,21 +96,29 @@ export class LabelOutline extends Component { } this._width = value; - this._updateRenderData(); + const label = this.node.getComponent(Label); + if (label) { + label.outlineWidth = this._width; + } } + /** + * @deprecated since v3.8.2, please use [[Label.outlineUsed]] instead. + */ public onEnable (): void { - this._updateRenderData(); + const label = this.node.getComponent(Label); + if (label) { + label.outlineUsed = true; + } } + /** + * @deprecated since v3.8.2, please use [[Label.outlineUsed]] instead. + */ public onDisable (): void { - this._updateRenderData(); - } - - protected _updateRenderData (): void { const label = this.node.getComponent(Label); if (label) { - label.updateRenderData(true); + label.outlineUsed = false; } } } diff --git a/cocos/2d/components/label-shadow.ts b/cocos/2d/components/label-shadow.ts index bab05719cbd..a5a16447bbb 100644 --- a/cocos/2d/components/label-shadow.ts +++ b/cocos/2d/components/label-shadow.ts @@ -31,13 +31,8 @@ import { Label } from './label'; /** * @en Shadow effect for Label component, only for system fonts or TTF fonts. * @zh 用于给 Label 组件添加阴影效果,只能用于系统字体或 ttf 字体。 - * @example - * import { Node, Label, LabelShadow } from 'cc'; - * // Create a new node and add label components. - * const node = new Node("New Label"); - * const label = node.addComponent(Label); - * const shadow = node.addComponent(LabelShadow); - * node.parent = this.node; + * + * @deprecated since v3.8.2, please use [[Label.shadowUsed]] instead. */ @ccclass('cc.LabelShadow') @help('i18n:cc.LabelShadow') @@ -60,11 +55,7 @@ export class LabelShadow extends Component { * @zh * 阴影的颜色。 * - * @example - * ```ts - * import { Color } from 'cc'; - * labelShadow.color = new Color(0.5, 0.3, 0.7, 1.0); - * ``` + * @deprecated since v3.8.2, please use [[Label.shadowColor]] instead. */ @tooltip('i18n:labelShadow.color') get color (): Readonly { @@ -77,7 +68,10 @@ export class LabelShadow extends Component { } this._color.set(value); - this._updateRenderData(); + const label = this.node.getComponent(Label); + if (label) { + label.shadowColor = this._color; + } } /** @@ -87,11 +81,7 @@ export class LabelShadow extends Component { * @zh * 字体与阴影的偏移。 * - * @example - * ```ts - * import { Vec2 } from 'cc'; - * labelShadow.offset = new Vec2(2, 2); - * ``` + * @deprecated since v3.8.2, please use [[Label.shadowOffset]] instead. */ @tooltip('i18n:labelShadow.offset') get offset (): Vec2 { @@ -100,7 +90,10 @@ export class LabelShadow extends Component { set offset (value) { this._offset = value; - this._updateRenderData(); + const label = this.node.getComponent(Label); + if (label) { + label.shadowOffset = this._offset; + } } /** @@ -110,10 +103,7 @@ export class LabelShadow extends Component { * @zh * 阴影的模糊程度。 * - * @example - * ```ts - * labelShadow.blur = 2; - * ``` + * @deprecated since v3.8.2, please use [[Label.shadowBlur]] instead. */ @tooltip('i18n:labelShadow.blur') get blur (): number { @@ -122,21 +112,29 @@ export class LabelShadow extends Component { set blur (value) { this._blur = value; - this._updateRenderData(); + const label = this.node.getComponent(Label); + if (label) { + label.shadowBlur = this._blur; + } } + /** + * @deprecated since v3.8.2, please use [[Label.shadowUsed]] instead. + */ public onEnable (): void { - this._updateRenderData(); + const label = this.node.getComponent(Label); + if (label) { + label.shadowUsed = true; + } } + /** + * @deprecated since v3.8.2, please use [[Label.shadowUsed]] instead. + */ public onDisable (): void { - this._updateRenderData(); - } - - protected _updateRenderData (): void { const label = this.node.getComponent(Label); if (label) { - label.updateRenderData(true); + label.shadowUsed = false; } } } diff --git a/cocos/2d/components/label.ts b/cocos/2d/components/label.ts index b22846c7875..103bf498c40 100644 --- a/cocos/2d/components/label.ts +++ b/cocos/2d/components/label.ts @@ -28,7 +28,7 @@ import { BYTEDANCE, EDITOR, JSB } from 'internal:constants'; import { minigame } from 'pal/minigame'; import { BitmapFont, Font, SpriteFrame } from '../assets'; import { ImageAsset, Texture2D } from '../../asset/assets'; -import { ccenum, cclegacy, Color } from '../../core'; +import { ccenum, cclegacy, Color, Vec2 } from '../../core'; import { IBatcher } from '../renderer/i-batcher'; import { FontAtlas } from '../assets/bitmap-font'; import { CanvasPool, ISharedLabelData, LetterRenderTexture } from '../assembler/label/font-utils'; @@ -594,15 +594,150 @@ export class Label extends UIRenderer { @editable @displayOrder(18) @tooltip('i18n:label.underline_height') - public get underlineHeight (): number { + get underlineHeight (): number { return this._underlineHeight; } - public set underlineHeight (value) { + set underlineHeight (value) { if (this._underlineHeight === value) return; this._underlineHeight = value; this.markForUpdateRenderData(); } + /** + ** @en + ** Outline effect used to change the display, only for system fonts or TTF fonts. + ** + ** @zh + ** 描边效果组件,用于字体描边,只能用于系统字体。 + **/ + @editable + @displayOrder(19) + @tooltip('i18n:label.outline_used') + get outlineUsed (): boolean { + return this._isOutline; + } + set outlineUsed (value) { + if (this._isOutline === value) return; + this._isOutline = value; + this.markForUpdateRenderData(); + } + + /** + * @en + * Outline color. + * + * @zh + * 改变描边的颜色。 + */ + @editable + @visible(function (this: Label) { return this._isOutline; }) + @displayOrder(20) + @tooltip('i18n:label.outline_color') + get outlineColor (): Color { + return this._outlineColor; + } + set outlineColor (value) { + if (this._outlineColor === value) return; + this._outlineColor.set(value); + this.markForUpdateRenderData(); + } + + /** + * @en + * Change the outline width. + * + * @zh + * 改变描边的宽度。 + */ + @editable + @visible(function (this: Label) { return this._isOutline; }) + @displayOrder(21) + @tooltip('i18n:label.outline_width') + get outlineWidth (): number { + return this._outlineWidth; + } + set outlineWidth (value) { + if (this._outlineWidth === value) return; + this._outlineWidth = value; + this.markForUpdateRenderData(); + } + + /** + * @en Shadow effect for Label component, only for system fonts or TTF fonts. + * @zh 用于给 Label 组件添加阴影效果,只能用于系统字体或 ttf 字体。 + */ + @editable + @displayOrder(22) + @tooltip('i18n:label.shadow_used') + get shadowUsed (): boolean { + return this._isShadow; + } + set shadowUsed (value) { + if (this._isShadow === value) return; + this._isShadow = value; + this.markForUpdateRenderData(); + } + + /** + * @en + * Shadow color. + * + * @zh + * 阴影的颜色。 + */ + @editable + @visible(function (this: Label) { return this._isShadow; }) + @displayOrder(23) + @tooltip('i18n:label.shadow_color') + get shadowColor (): Color { + return this._shadowColor; + } + set shadowColor (value) { + if (this._shadowColor === value) return; + this._shadowColor.set(value); + this.markForUpdateRenderData(); + } + + /** + * @en + * Offset between font and shadow. + * + * @zh + * 字体与阴影的偏移。 + */ + @editable + @visible(function (this: Label) { return this._isShadow; }) + @displayOrder(24) + @tooltip('i18n:label.shadow_offset') + get shadowOffset (): Vec2 { + return this._shadowOffset; + } + set shadowOffset (value) { + if (this._shadowOffset === value) return; + this._shadowOffset.set(value); + this.markForUpdateRenderData(); + } + + /** + * @en + * A non-negative float specifying the level of shadow blur. + * + * @zh + * 阴影的模糊程度。 + */ + @editable + @visible(function (this: Label) { return this._isShadow; }) + @displayOrder(25) + @tooltip('i18n:label.shadow_blur') + get shadowBlur (): number { + return this._shadowBlur; + } + set shadowBlur (value) { + if (this._shadowBlur === value) return; + this._shadowBlur = value; + this.markForUpdateRenderData(); + } + /** * @deprecated since v3.7.0, this is an engine private interface that will be removed in the future. */ @@ -705,6 +840,20 @@ export class Label extends UIRenderer { protected _underlineHeight = 2; @serializable protected _cacheMode = CacheMode.NONE; + @serializable + protected _isOutline = false; + @serializable + protected _outlineColor = new Color(0, 0, 0, 255); + @serializable + protected _outlineWidth = 2; + @serializable + protected _isShadow = false; + @serializable + protected _shadowColor = new Color(0, 0, 0, 255); + @serializable + protected _shadowOffset = new Vec2(2, 2); + @serializable + protected _shadowBlur = 2; // don't need serialize // 这个保存了旧项目的 file 数据 diff --git a/editor/assets/default_prefab/2d/Camera.prefab.meta b/editor/assets/default_prefab/2d/Camera.prefab.meta index 2a9efe9d3ad..ad7cdf57623 100644 --- a/editor/assets/default_prefab/2d/Camera.prefab.meta +++ b/editor/assets/default_prefab/2d/Camera.prefab.meta @@ -1,5 +1,5 @@ { - "ver": "1.1.48", + "ver": "1.1.49", "importer": "prefab", "imported": true, "uuid": "3487d118-0158-4983-93fe-c3822790e7c5", diff --git a/editor/assets/default_prefab/2d/ui/Canvas.prefab.meta b/editor/assets/default_prefab/2d/ui/Canvas.prefab.meta index 7a02f8602a3..f33a54cb75e 100644 --- a/editor/assets/default_prefab/2d/ui/Canvas.prefab.meta +++ b/editor/assets/default_prefab/2d/ui/Canvas.prefab.meta @@ -1,5 +1,5 @@ { - "ver": "1.1.48", + "ver": "1.1.49", "importer": "prefab", "imported": true, "uuid": "4c33600e-9ca9-483b-b734-946008261697", diff --git a/editor/assets/default_prefab/3d/Capsule.prefab.meta b/editor/assets/default_prefab/3d/Capsule.prefab.meta index 2cdc8360ae1..76db4af8e75 100644 --- a/editor/assets/default_prefab/3d/Capsule.prefab.meta +++ b/editor/assets/default_prefab/3d/Capsule.prefab.meta @@ -1,5 +1,5 @@ { - "ver": "1.1.48", + "ver": "1.1.49", "importer": "prefab", "imported": true, "uuid": "73ce1f7f-d1f4-4942-ad93-66ca3b3041ab", diff --git a/editor/assets/default_prefab/3d/Cone.prefab.meta b/editor/assets/default_prefab/3d/Cone.prefab.meta index caef62b443a..b34605a1e5a 100644 --- a/editor/assets/default_prefab/3d/Cone.prefab.meta +++ b/editor/assets/default_prefab/3d/Cone.prefab.meta @@ -1,5 +1,5 @@ { - "ver": "1.1.48", + "ver": "1.1.49", "importer": "prefab", "imported": true, "uuid": "6350d660-e888-4acf-a552-f3b719ae9110", diff --git a/editor/assets/default_prefab/3d/Cube.prefab.meta b/editor/assets/default_prefab/3d/Cube.prefab.meta index 7a3b4277d85..0155ae18b60 100644 --- a/editor/assets/default_prefab/3d/Cube.prefab.meta +++ b/editor/assets/default_prefab/3d/Cube.prefab.meta @@ -1,5 +1,5 @@ { - "ver": "1.1.48", + "ver": "1.1.49", "importer": "prefab", "imported": true, "uuid": "30da77a1-f02d-4ede-aa56-403452ee7fde", diff --git a/editor/assets/default_prefab/3d/Cylinder.prefab.meta b/editor/assets/default_prefab/3d/Cylinder.prefab.meta index de6fd2091f3..23303d97fc7 100644 --- a/editor/assets/default_prefab/3d/Cylinder.prefab.meta +++ b/editor/assets/default_prefab/3d/Cylinder.prefab.meta @@ -1,5 +1,5 @@ { - "ver": "1.1.48", + "ver": "1.1.49", "importer": "prefab", "imported": true, "uuid": "ab3e16f9-671e-48a7-90b7-d0884d9cbb85", diff --git a/editor/assets/default_prefab/3d/Plane.prefab.meta b/editor/assets/default_prefab/3d/Plane.prefab.meta index 762d5e1c3cb..28f5dda5f49 100644 --- a/editor/assets/default_prefab/3d/Plane.prefab.meta +++ b/editor/assets/default_prefab/3d/Plane.prefab.meta @@ -1,5 +1,5 @@ { - "ver": "1.1.48", + "ver": "1.1.49", "importer": "prefab", "imported": true, "uuid": "40563723-f8fc-4216-99ea-a81636435c10", diff --git a/editor/assets/default_prefab/3d/Quad.prefab.meta b/editor/assets/default_prefab/3d/Quad.prefab.meta index 05f6a30a78f..8e16ec5e9e8 100644 --- a/editor/assets/default_prefab/3d/Quad.prefab.meta +++ b/editor/assets/default_prefab/3d/Quad.prefab.meta @@ -1,5 +1,5 @@ { - "ver": "1.1.48", + "ver": "1.1.49", "importer": "prefab", "imported": true, "uuid": "34a07346-9f62-4a84-90ae-cb83f7a426c1", diff --git a/editor/assets/default_prefab/3d/Sphere.prefab.meta b/editor/assets/default_prefab/3d/Sphere.prefab.meta index 379f0318d21..2226e2e1585 100644 --- a/editor/assets/default_prefab/3d/Sphere.prefab.meta +++ b/editor/assets/default_prefab/3d/Sphere.prefab.meta @@ -1,5 +1,5 @@ { - "ver": "1.1.48", + "ver": "1.1.49", "importer": "prefab", "imported": true, "uuid": "655c9519-1a37-472b-bae6-29fefac0b550", diff --git a/editor/assets/default_prefab/3d/Torus.prefab.meta b/editor/assets/default_prefab/3d/Torus.prefab.meta index 1c916b0f66e..03be60e79be 100644 --- a/editor/assets/default_prefab/3d/Torus.prefab.meta +++ b/editor/assets/default_prefab/3d/Torus.prefab.meta @@ -1,5 +1,5 @@ { - "ver": "1.1.48", + "ver": "1.1.49", "importer": "prefab", "imported": true, "uuid": "d47f5d5e-c931-4ff4-987b-cc818a728b82", diff --git a/editor/assets/default_prefab/Camera.prefab.meta b/editor/assets/default_prefab/Camera.prefab.meta index 647ff9aef3a..92ea57a3a5a 100644 --- a/editor/assets/default_prefab/Camera.prefab.meta +++ b/editor/assets/default_prefab/Camera.prefab.meta @@ -1,5 +1,5 @@ { - "ver": "1.1.48", + "ver": "1.1.49", "importer": "prefab", "imported": true, "uuid": "bb0a6472-cd67-4afb-a031-94fca8f4cc92", diff --git a/editor/assets/default_prefab/Terrain.prefab.meta b/editor/assets/default_prefab/Terrain.prefab.meta index 66b2240a22e..7b34955b2f4 100644 --- a/editor/assets/default_prefab/Terrain.prefab.meta +++ b/editor/assets/default_prefab/Terrain.prefab.meta @@ -1,5 +1,5 @@ { - "ver": "1.1.48", + "ver": "1.1.49", "importer": "prefab", "imported": true, "uuid": "90e8b0d4-12dc-412d-9156-ea1fdb18c15b", diff --git a/editor/assets/default_prefab/effects/Particle System.prefab.meta b/editor/assets/default_prefab/effects/Particle System.prefab.meta index fc311329e1c..ac7961c5284 100644 --- a/editor/assets/default_prefab/effects/Particle System.prefab.meta +++ b/editor/assets/default_prefab/effects/Particle System.prefab.meta @@ -1,5 +1,5 @@ { - "ver": "1.1.48", + "ver": "1.1.49", "importer": "prefab", "imported": true, "uuid": "f09a0597-10e6-49e5-8759-a148b5e85395", diff --git a/editor/assets/default_prefab/light/Directional Light.prefab.meta b/editor/assets/default_prefab/light/Directional Light.prefab.meta index 89d28c73bdc..b92f75d0535 100644 --- a/editor/assets/default_prefab/light/Directional Light.prefab.meta +++ b/editor/assets/default_prefab/light/Directional Light.prefab.meta @@ -1,5 +1,5 @@ { - "ver": "1.1.48", + "ver": "1.1.49", "importer": "prefab", "imported": true, "uuid": "a0e9756d-9128-4f49-8097-e041c8b733b8", diff --git a/editor/assets/default_prefab/light/Light Probe Group.prefab.meta b/editor/assets/default_prefab/light/Light Probe Group.prefab.meta index 197281caacb..359cec2c3c4 100644 --- a/editor/assets/default_prefab/light/Light Probe Group.prefab.meta +++ b/editor/assets/default_prefab/light/Light Probe Group.prefab.meta @@ -1,5 +1,5 @@ { - "ver": "1.1.48", + "ver": "1.1.49", "importer": "prefab", "imported": true, "uuid": "50dfda40-7c45-4868-a876-2fe2a4c782f4", diff --git a/editor/assets/default_prefab/light/Point Light.prefab.meta b/editor/assets/default_prefab/light/Point Light.prefab.meta index 598d473c0e3..7d1909c9a08 100644 --- a/editor/assets/default_prefab/light/Point Light.prefab.meta +++ b/editor/assets/default_prefab/light/Point Light.prefab.meta @@ -1,5 +1,5 @@ { - "ver": "1.1.48", + "ver": "1.1.49", "importer": "prefab", "imported": true, "uuid": "03029371-ee64-4f14-820a-d495ad7cdc29", diff --git a/editor/assets/default_prefab/light/Ranged Directional Light.prefab.meta b/editor/assets/default_prefab/light/Ranged Directional Light.prefab.meta index 69df4adf90d..925508bc6e4 100644 --- a/editor/assets/default_prefab/light/Ranged Directional Light.prefab.meta +++ b/editor/assets/default_prefab/light/Ranged Directional Light.prefab.meta @@ -1,5 +1,5 @@ { - "ver": "1.1.48", + "ver": "1.1.49", "importer": "prefab", "imported": true, "uuid": "df72d0f6-49d3-452a-b082-8b23d38b33af", diff --git a/editor/assets/default_prefab/light/Reflection Probe.prefab.meta b/editor/assets/default_prefab/light/Reflection Probe.prefab.meta index 0e0ab920114..c38fbdde580 100644 --- a/editor/assets/default_prefab/light/Reflection Probe.prefab.meta +++ b/editor/assets/default_prefab/light/Reflection Probe.prefab.meta @@ -1,5 +1,5 @@ { - "ver": "1.1.48", + "ver": "1.1.49", "importer": "prefab", "imported": true, "uuid": "d8b49b64-cfba-4cfa-be53-1e469547b28b", diff --git a/editor/assets/default_prefab/light/Sphere Light.prefab.meta b/editor/assets/default_prefab/light/Sphere Light.prefab.meta index 1bebad0a135..77bee59cc15 100644 --- a/editor/assets/default_prefab/light/Sphere Light.prefab.meta +++ b/editor/assets/default_prefab/light/Sphere Light.prefab.meta @@ -1,5 +1,5 @@ { - "ver": "1.1.48", + "ver": "1.1.49", "importer": "prefab", "imported": true, "uuid": "4182ee46-ffa0-4de2-b66b-c93cc6c7e9b8", diff --git a/editor/assets/default_prefab/light/Spot Light.prefab.meta b/editor/assets/default_prefab/light/Spot Light.prefab.meta index d60bc004f17..5a000536c5a 100644 --- a/editor/assets/default_prefab/light/Spot Light.prefab.meta +++ b/editor/assets/default_prefab/light/Spot Light.prefab.meta @@ -1,5 +1,5 @@ { - "ver": "1.1.48", + "ver": "1.1.49", "importer": "prefab", "imported": true, "uuid": "7a49aa24-bd7a-40a8-b31a-b2a9da85abcd", diff --git a/editor/assets/default_prefab/ui/Button.prefab.meta b/editor/assets/default_prefab/ui/Button.prefab.meta index 22327fc1710..ad185655c69 100644 --- a/editor/assets/default_prefab/ui/Button.prefab.meta +++ b/editor/assets/default_prefab/ui/Button.prefab.meta @@ -1,5 +1,5 @@ { - "ver": "1.1.48", + "ver": "1.1.49", "importer": "prefab", "imported": true, "uuid": "90bdd2a9-2838-4888-b66c-e94c8b7a5169", diff --git a/editor/assets/default_prefab/ui/Canvas.prefab.meta b/editor/assets/default_prefab/ui/Canvas.prefab.meta index a398ec48963..7b7c6384ab0 100644 --- a/editor/assets/default_prefab/ui/Canvas.prefab.meta +++ b/editor/assets/default_prefab/ui/Canvas.prefab.meta @@ -1,5 +1,5 @@ { - "ver": "1.1.48", + "ver": "1.1.49", "importer": "prefab", "imported": true, "uuid": "f773db21-62b8-4540-956a-29bacf5ddbf5", diff --git a/editor/assets/default_prefab/ui/EditBox.prefab.meta b/editor/assets/default_prefab/ui/EditBox.prefab.meta index d72c1f6fb58..7661b7f8c90 100644 --- a/editor/assets/default_prefab/ui/EditBox.prefab.meta +++ b/editor/assets/default_prefab/ui/EditBox.prefab.meta @@ -1,5 +1,5 @@ { - "ver": "1.1.48", + "ver": "1.1.49", "importer": "prefab", "imported": true, "uuid": "05e79121-8675-4551-9ad7-1b901a4025db", diff --git a/editor/assets/default_prefab/ui/Graphics.prefab.meta b/editor/assets/default_prefab/ui/Graphics.prefab.meta index 7c692252572..7b4463acc28 100644 --- a/editor/assets/default_prefab/ui/Graphics.prefab.meta +++ b/editor/assets/default_prefab/ui/Graphics.prefab.meta @@ -1,5 +1,5 @@ { - "ver": "1.1.48", + "ver": "1.1.49", "importer": "prefab", "imported": true, "uuid": "c96e159e-43ea-4a16-8279-05bc39119d1a", diff --git a/editor/assets/default_prefab/ui/Label.prefab.meta b/editor/assets/default_prefab/ui/Label.prefab.meta index 6a5eacbd453..881efa9de41 100644 --- a/editor/assets/default_prefab/ui/Label.prefab.meta +++ b/editor/assets/default_prefab/ui/Label.prefab.meta @@ -1,5 +1,5 @@ { - "ver": "1.1.48", + "ver": "1.1.49", "importer": "prefab", "imported": true, "uuid": "36008810-7ad3-47c0-8112-e30aee089e45", diff --git a/editor/assets/default_prefab/ui/Layout.prefab.meta b/editor/assets/default_prefab/ui/Layout.prefab.meta index 01428016c51..5d691e90730 100644 --- a/editor/assets/default_prefab/ui/Layout.prefab.meta +++ b/editor/assets/default_prefab/ui/Layout.prefab.meta @@ -1,5 +1,5 @@ { - "ver": "1.1.48", + "ver": "1.1.49", "importer": "prefab", "imported": true, "uuid": "a9ef7dfc-ea8b-4cf8-918e-36da948c4de0", diff --git a/editor/assets/default_prefab/ui/Mask.prefab.meta b/editor/assets/default_prefab/ui/Mask.prefab.meta index 377ec5e6f5a..3792c4b84bc 100644 --- a/editor/assets/default_prefab/ui/Mask.prefab.meta +++ b/editor/assets/default_prefab/ui/Mask.prefab.meta @@ -1,5 +1,5 @@ { - "ver": "1.1.48", + "ver": "1.1.49", "importer": "prefab", "imported": true, "uuid": "7fa63aed-f3e2-46a5-8a7c-c1a1adf6cea6", diff --git a/editor/assets/default_prefab/ui/ParticleSystem2D.prefab.meta b/editor/assets/default_prefab/ui/ParticleSystem2D.prefab.meta index 7072bfdef2b..7fc1b6ea004 100644 --- a/editor/assets/default_prefab/ui/ParticleSystem2D.prefab.meta +++ b/editor/assets/default_prefab/ui/ParticleSystem2D.prefab.meta @@ -1,5 +1,5 @@ { - "ver": "1.1.48", + "ver": "1.1.49", "importer": "prefab", "imported": true, "uuid": "f396261e-3e06-41ec-bdd6-9a8b6d99026f", diff --git a/editor/assets/default_prefab/ui/ProgressBar.prefab.meta b/editor/assets/default_prefab/ui/ProgressBar.prefab.meta index e73a3746162..8f13645d809 100644 --- a/editor/assets/default_prefab/ui/ProgressBar.prefab.meta +++ b/editor/assets/default_prefab/ui/ProgressBar.prefab.meta @@ -1,5 +1,5 @@ { - "ver": "1.1.48", + "ver": "1.1.49", "importer": "prefab", "imported": true, "uuid": "0d9353c4-6fb9-49bb-bc62-77f1750078c2", diff --git a/editor/assets/default_prefab/ui/RichText.prefab.meta b/editor/assets/default_prefab/ui/RichText.prefab.meta index 262b90f4b93..73797af04e4 100644 --- a/editor/assets/default_prefab/ui/RichText.prefab.meta +++ b/editor/assets/default_prefab/ui/RichText.prefab.meta @@ -1,5 +1,5 @@ { - "ver": "1.1.48", + "ver": "1.1.49", "importer": "prefab", "imported": true, "uuid": "fc6bfcfa-8086-4326-809b-0ba1226bac7d", diff --git a/editor/assets/default_prefab/ui/ScrollView.prefab.meta b/editor/assets/default_prefab/ui/ScrollView.prefab.meta index 98626d08d6f..92ae53d13fe 100644 --- a/editor/assets/default_prefab/ui/ScrollView.prefab.meta +++ b/editor/assets/default_prefab/ui/ScrollView.prefab.meta @@ -1,5 +1,5 @@ { - "ver": "1.1.48", + "ver": "1.1.49", "importer": "prefab", "imported": true, "uuid": "c1baa707-78d6-4b89-8d5d-0b7fdf0c39bc", diff --git a/editor/assets/default_prefab/ui/Slider.prefab.meta b/editor/assets/default_prefab/ui/Slider.prefab.meta index 70669c12858..14586825920 100644 --- a/editor/assets/default_prefab/ui/Slider.prefab.meta +++ b/editor/assets/default_prefab/ui/Slider.prefab.meta @@ -1,5 +1,5 @@ { - "ver": "1.1.48", + "ver": "1.1.49", "importer": "prefab", "imported": true, "uuid": "2bd7e5b6-cd8c-41a1-8136-ddb8efbf6326", diff --git a/editor/assets/default_prefab/ui/Sprite.prefab.meta b/editor/assets/default_prefab/ui/Sprite.prefab.meta index 26cd9988001..c0f94735dbb 100644 --- a/editor/assets/default_prefab/ui/Sprite.prefab.meta +++ b/editor/assets/default_prefab/ui/Sprite.prefab.meta @@ -1,5 +1,5 @@ { - "ver": "1.1.48", + "ver": "1.1.49", "importer": "prefab", "imported": true, "uuid": "9db8cd0b-cbe4-42e7-96a9-a239620c0a9d", diff --git a/editor/assets/default_prefab/ui/SpriteRenderer.prefab.meta b/editor/assets/default_prefab/ui/SpriteRenderer.prefab.meta index a257d54f0a8..77bbcb0ab98 100644 --- a/editor/assets/default_prefab/ui/SpriteRenderer.prefab.meta +++ b/editor/assets/default_prefab/ui/SpriteRenderer.prefab.meta @@ -1,5 +1,5 @@ { - "ver": "1.1.48", + "ver": "1.1.49", "importer": "prefab", "imported": true, "uuid": "279ed042-5a65-4efe-9afb-2fc23c61e15a", diff --git a/editor/assets/default_prefab/ui/SpriteSplash.prefab.meta b/editor/assets/default_prefab/ui/SpriteSplash.prefab.meta index cb3d5a47078..2727ee85ff7 100644 --- a/editor/assets/default_prefab/ui/SpriteSplash.prefab.meta +++ b/editor/assets/default_prefab/ui/SpriteSplash.prefab.meta @@ -1,5 +1,5 @@ { - "ver": "1.1.48", + "ver": "1.1.49", "importer": "prefab", "imported": true, "uuid": "e5f21aad-3a69-4011-ac62-b74352ac025e", diff --git a/editor/assets/default_prefab/ui/TiledMap.prefab.meta b/editor/assets/default_prefab/ui/TiledMap.prefab.meta index 53301ade82b..3072ca81b17 100644 --- a/editor/assets/default_prefab/ui/TiledMap.prefab.meta +++ b/editor/assets/default_prefab/ui/TiledMap.prefab.meta @@ -1,5 +1,5 @@ { - "ver": "1.1.48", + "ver": "1.1.49", "importer": "prefab", "imported": true, "uuid": "3139fa4f-8c42-4ce6-98be-15e848d9734c", diff --git a/editor/assets/default_prefab/ui/Toggle.prefab.meta b/editor/assets/default_prefab/ui/Toggle.prefab.meta index c05f65aa9f0..4aece91b233 100644 --- a/editor/assets/default_prefab/ui/Toggle.prefab.meta +++ b/editor/assets/default_prefab/ui/Toggle.prefab.meta @@ -1,5 +1,5 @@ { - "ver": "1.1.48", + "ver": "1.1.49", "importer": "prefab", "imported": true, "uuid": "0e89afe7-56de-4f99-96a1-cba8a75bedd2", diff --git a/editor/assets/default_prefab/ui/ToggleContainer.prefab.meta b/editor/assets/default_prefab/ui/ToggleContainer.prefab.meta index e3affc6f159..9c6c100db85 100644 --- a/editor/assets/default_prefab/ui/ToggleContainer.prefab.meta +++ b/editor/assets/default_prefab/ui/ToggleContainer.prefab.meta @@ -1,5 +1,5 @@ { - "ver": "1.1.48", + "ver": "1.1.49", "importer": "prefab", "imported": true, "uuid": "2af73429-41d1-4346-9062-7798e42945dd", diff --git a/editor/assets/default_prefab/ui/VideoPlayer.prefab.meta b/editor/assets/default_prefab/ui/VideoPlayer.prefab.meta index 24a28385ecc..fa11ee31a45 100644 --- a/editor/assets/default_prefab/ui/VideoPlayer.prefab.meta +++ b/editor/assets/default_prefab/ui/VideoPlayer.prefab.meta @@ -1,5 +1,5 @@ { - "ver": "1.1.48", + "ver": "1.1.49", "importer": "prefab", "imported": true, "uuid": "7e089eaf-fa97-40d7-8a20-741a152585df", diff --git a/editor/assets/default_prefab/ui/WebView.prefab.meta b/editor/assets/default_prefab/ui/WebView.prefab.meta index 7ad242dfe02..2085c013dbb 100644 --- a/editor/assets/default_prefab/ui/WebView.prefab.meta +++ b/editor/assets/default_prefab/ui/WebView.prefab.meta @@ -1,5 +1,5 @@ { - "ver": "1.1.48", + "ver": "1.1.49", "importer": "prefab", "imported": true, "uuid": "9c541fa2-1dc8-4d8b-813a-aec89133f5b1", diff --git a/editor/assets/default_prefab/ui/Widget.prefab.meta b/editor/assets/default_prefab/ui/Widget.prefab.meta index e1ed816df8a..68560828750 100644 --- a/editor/assets/default_prefab/ui/Widget.prefab.meta +++ b/editor/assets/default_prefab/ui/Widget.prefab.meta @@ -1,5 +1,5 @@ { - "ver": "1.1.48", + "ver": "1.1.49", "importer": "prefab", "imported": true, "uuid": "36ed4422-3542-4cc4-bf02-dc4bfc590836", diff --git a/editor/assets/default_prefab/ui/pageView.prefab.meta b/editor/assets/default_prefab/ui/pageView.prefab.meta index 3c4e7e8d451..000fc2d496c 100644 --- a/editor/assets/default_prefab/ui/pageView.prefab.meta +++ b/editor/assets/default_prefab/ui/pageView.prefab.meta @@ -1,5 +1,5 @@ { - "ver": "1.1.48", + "ver": "1.1.49", "importer": "prefab", "imported": true, "uuid": "20a5d8cb-ccad-4543-a937-fccd98c9f3de", diff --git a/editor/assets/tools/debug-view-runtime-control.prefab.meta b/editor/assets/tools/debug-view-runtime-control.prefab.meta index 34527f2712b..f9cb4c0b18f 100644 --- a/editor/assets/tools/debug-view-runtime-control.prefab.meta +++ b/editor/assets/tools/debug-view-runtime-control.prefab.meta @@ -1,5 +1,5 @@ { - "ver": "1.1.48", + "ver": "1.1.49", "importer": "prefab", "imported": true, "uuid": "7f4ddeab-efa9-4b76-bf6a-029520f68461", diff --git a/editor/i18n/en/localization.js b/editor/i18n/en/localization.js index c3b05125f0a..25fdd4add63 100755 --- a/editor/i18n/en/localization.js +++ b/editor/i18n/en/localization.js @@ -408,6 +408,13 @@ module.exports = link(mixin({ font_underline: 'Font underlined', spacing_x: 'The spacing between text characters, only available in BMFont', underline_height: 'The height of underline', + outline_used: 'Whether outline is enabled', + outline_width: 'The width of outline', + outline_color: 'The color of outline', + shadow_used: 'Whether shadow is enabled', + shadow_color: 'The color of shadow', + shadow_offset: 'Offset between font and shadow', + shadow_blur: 'A non-negative float specifying the level of shadow blur', }, labelOutline: { color: 'Outline color', diff --git a/editor/i18n/zh/localization.js b/editor/i18n/zh/localization.js index cd3a0881867..8916789929c 100755 --- a/editor/i18n/zh/localization.js +++ b/editor/i18n/zh/localization.js @@ -397,6 +397,13 @@ module.exports = link(mixin({ font_underline: '字体加下划线', spacing_x: '文本字符之间的间距。仅在使用 BMFont 位图字体时生效', underline_height: '下划线高度', + outline_used: '是否启用描边', + outline_width: '描边宽度', + outline_color: '描边颜色', + shadow_used: '是否启用阴影', + shadow_color: '阴影颜色', + shadow_offset: '阴影偏移量', + shadow_blur: '阴影模糊程度', }, labelOutline: { color: '描边的颜色',