适配 3.8.6

This commit is contained in:
Nice
2025-07-29 14:04:44 +08:00
parent 0d90c0b6dd
commit 64603ad87e
5 changed files with 69 additions and 57 deletions

View File

@@ -2011,12 +2011,20 @@
this._isItalic = false;
this._isBold = false;
this._isUnderline = false;
this._enableOutline = false;
this._outlineColor = new CCColor(255, 255, 255, 255);
this._outlineWidth = 0;
}
updateWithLayer(psdLayer) {
this._fontSize = psdLayer.fontSize;
// this._actualFontSize = this._fontSize;
this._string = this._N$string = psdLayer.text;
this._lineHeight = this._fontSize + config.textLineHeightOffset;
if (psdLayer.outline) {
this._enableOutline = true;
this._outlineColor.set(psdLayer.outline.color);
this._outlineWidth = psdLayer.outline.width;
}
if (config.editorVersion >= EditorVersion.v342) {
this._srcBlendFactor = 2;
this._dstBlendFactor = 4;
@@ -2113,31 +2121,19 @@
__decorate([
ccversion(EditorVersion.v342)
], CCLabel.prototype, "_isUnderline", void 0);
__decorate([
ccversion(EditorVersion.v342)
], CCLabel.prototype, "_enableOutline", void 0);
__decorate([
ccversion(EditorVersion.v342)
], CCLabel.prototype, "_outlineColor", void 0);
__decorate([
ccversion(EditorVersion.v342)
], CCLabel.prototype, "_outlineWidth", void 0);
CCLabel = __decorate([
cctype("cc.Label")
], CCLabel);
let CCLabelOutline = class CCLabelOutline extends CCComponent {
constructor() {
super(...arguments);
this._color = new CCColor(255, 255, 255, 255);
this._width = 1;
}
updateWithLayer(psdLayer) {
this._width = psdLayer.outline.width;
this._color.set(psdLayer.outline.color);
}
};
__decorate([
ccversion(EditorVersion.all)
], CCLabelOutline.prototype, "_color", void 0);
__decorate([
ccversion(EditorVersion.all)
], CCLabelOutline.prototype, "_width", void 0);
CCLabelOutline = __decorate([
cctype("cc.LabelOutline")
], CCLabelOutline);
class ExportImageMgr {
constructor() {
this.textObjects = [];
@@ -2602,13 +2598,13 @@
});
label.updateWithLayer(layer);
this.applyConfig(label);
// 有描边
if (layer.outline) {
let labelOutline = new CCLabelOutline();
node.addComponent(labelOutline);
labelOutline.updateWithLayer(layer);
this.applyConfig(labelOutline);
}
// // 有描边
// if (layer.outline) {
// let labelOutline = new CCLabelOutline();
// node.addComponent(labelOutline);
// labelOutline.updateWithLayer(layer);
// this.applyConfig(labelOutline);
// }
}
// Button / Toggle / ProgressBar
if (layer.attr) {