mirror of
https://gitee.com/onvia/ccc-tnt-psd2ui
synced 2025-10-13 18:46:27 +00:00
适配 3.8.6
This commit is contained in:
52
psd2ui-tools/dist/index.js
vendored
52
psd2ui-tools/dist/index.js
vendored
@@ -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) {
|
||||
|
Reference in New Issue
Block a user