Commit d896137d authored by Li MingZhe's avatar Li MingZhe

feat: 状态按钮

parent d7f00111
...@@ -550,6 +550,9 @@ export class LrcEditorComponent implements OnInit, OnChanges, OnDestroy, AfterVi ...@@ -550,6 +550,9 @@ export class LrcEditorComponent implements OnInit, OnChanges, OnDestroy, AfterVi
}); });
} }
saveUserData() { saveUserData() {
this.checkNeedBack();
const result = []; const result = [];
this.timePointData.forEach(p => { this.timePointData.forEach(p => {
const t = {...p}; const t = {...p};
...@@ -563,6 +566,11 @@ export class LrcEditorComponent implements OnInit, OnChanges, OnDestroy, AfterVi ...@@ -563,6 +566,11 @@ export class LrcEditorComponent implements OnInit, OnChanges, OnDestroy, AfterVi
this.editFinished.emit(this.LRCData); this.editFinished.emit(this.LRCData);
// console.log(this.timePointData); // console.log(this.timePointData);
} }
checkNeedBack() {
if (this.isScaleTimeLine) {
this.restoreTimeLine();
}
}
changePlaybackRate(val) { changePlaybackRate(val) {
this.audioObj.playbackRate = val; this.audioObj.playbackRate = val;
} }
......
...@@ -430,15 +430,21 @@ cc.Class({ ...@@ -430,15 +430,21 @@ cc.Class({
} else { } else {
btn.actionStatus = this.BUTTON_STATUS.ACTIVE; btn.actionStatus = this.BUTTON_STATUS.ACTIVE;
cc.tween(button).to(dur, {scale: 1.2}).start() cc.tween(button).to(dur, {scale: 1.2}).start()
this.changeBtnActive(button, true);
} }
return; return;
} }
button.actionStatus = this.BUTTON_STATUS.IDLE button.actionStatus = this.BUTTON_STATUS.IDLE
cc.tween(button).to(dur, {scale: 1}).start() cc.tween(button).to(dur, {scale: 1}).start()
this.changeBtnActive(button, false);
}) })
}, },
changeBtnActive(btn, isActive) {
btn.getChildByName('Background').active = !isActive;
btn.getChildByName('BackgroundActive').active = isActive;
},
// onButtonClick(event, index) { // onButtonClick(event, index) {
// window.ttb = event.currentTarget; // window.ttb = event.currentTarget;
......
{
"ver": "2.3.5",
"uuid": "8da89080-cd5c-4326-a424-c3bd8af670db",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 80,
"height": 80,
"platformSettings": {},
"subMetas": {
"btn1-active": {
"ver": "1.0.4",
"uuid": "0694a810-c311-4b99-96de-45d7ccad7757",
"rawTextureUuid": "8da89080-cd5c-4326-a424-c3bd8af670db",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 5,
"width": 80,
"height": 70,
"rawWidth": 80,
"rawHeight": 80,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
...@@ -19,13 +19,13 @@ ...@@ -19,13 +19,13 @@
"trimThreshold": 1, "trimThreshold": 1,
"rotated": false, "rotated": false,
"offsetX": 0, "offsetX": 0,
"offsetY": -0.5, "offsetY": 0,
"trimX": 2, "trimX": 0,
"trimY": 1, "trimY": 5,
"width": 152, "width": 80,
"height": 131, "height": 70,
"rawWidth": 156, "rawWidth": 80,
"rawHeight": 132, "rawHeight": 80,
"borderTop": 0, "borderTop": 0,
"borderBottom": 0, "borderBottom": 0,
"borderLeft": 0, "borderLeft": 0,
......
{
"ver": "2.3.5",
"uuid": "91c31651-5030-4004-ae7c-e9421bf6883a",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 80,
"height": 80,
"platformSettings": {},
"subMetas": {
"btn2-active": {
"ver": "1.0.4",
"uuid": "f02d54a4-feef-430e-957e-42268439e491",
"rawTextureUuid": "91c31651-5030-4004-ae7c-e9421bf6883a",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -0.5,
"offsetY": 0,
"trimX": 2,
"trimY": 7,
"width": 75,
"height": 66,
"rawWidth": 80,
"rawHeight": 80,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
"premultiplyAlpha": false, "premultiplyAlpha": false,
"genMipmaps": false, "genMipmaps": false,
"packable": true, "packable": true,
"width": 156, "width": 80,
"height": 132, "height": 80,
"platformSettings": {}, "platformSettings": {},
"subMetas": { "subMetas": {
"btn2": { "btn2": {
...@@ -18,14 +18,14 @@ ...@@ -18,14 +18,14 @@
"trimType": "auto", "trimType": "auto",
"trimThreshold": 1, "trimThreshold": 1,
"rotated": false, "rotated": false,
"offsetX": 0, "offsetX": -0.5,
"offsetY": -0.5, "offsetY": 0,
"trimX": 2, "trimX": 2,
"trimY": 1, "trimY": 7,
"width": 152, "width": 75,
"height": 131, "height": 66,
"rawWidth": 156, "rawWidth": 80,
"rawHeight": 132, "rawHeight": 80,
"borderTop": 0, "borderTop": 0,
"borderBottom": 0, "borderBottom": 0,
"borderLeft": 0, "borderLeft": 0,
......
{
"ver": "2.3.5",
"uuid": "fc07163d-f7db-4599-9ebf-0ef76d1517a0",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 80,
"height": 80,
"platformSettings": {},
"subMetas": {
"btn3-active": {
"ver": "1.0.4",
"uuid": "75a69cd5-83c3-4696-95a3-35a15b9105ec",
"rawTextureUuid": "fc07163d-f7db-4599-9ebf-0ef76d1517a0",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -0.5,
"offsetY": 0,
"trimX": 18,
"trimY": 1,
"width": 43,
"height": 78,
"rawWidth": 80,
"rawHeight": 80,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
"premultiplyAlpha": false, "premultiplyAlpha": false,
"genMipmaps": false, "genMipmaps": false,
"packable": true, "packable": true,
"width": 75, "width": 80,
"height": 150, "height": 80,
"platformSettings": { "platformSettings": {
"default": { "default": {
"formats": [] "formats": []
...@@ -22,14 +22,14 @@ ...@@ -22,14 +22,14 @@
"trimType": "auto", "trimType": "auto",
"trimThreshold": 1, "trimThreshold": 1,
"rotated": false, "rotated": false,
"offsetX": 0, "offsetX": -0.5,
"offsetY": 0, "offsetY": 0,
"trimX": 0, "trimX": 18,
"trimY": 0, "trimY": 1,
"width": 75, "width": 43,
"height": 150, "height": 78,
"rawWidth": 75, "rawWidth": 80,
"rawHeight": 150, "rawHeight": 80,
"borderTop": 0, "borderTop": 0,
"borderBottom": 0, "borderBottom": 0,
"borderLeft": 0, "borderLeft": 0,
......
...@@ -18,14 +18,14 @@ ...@@ -18,14 +18,14 @@
"trimType": "auto", "trimType": "auto",
"trimThreshold": 1, "trimThreshold": 1,
"rotated": false, "rotated": false,
"offsetX": 0, "offsetX": -0.5,
"offsetY": 0, "offsetY": 0,
"trimX": 0, "trimX": 0,
"trimY": 0, "trimY": 6,
"width": 213, "width": 79,
"height": 180, "height": 68,
"rawWidth": 213, "rawWidth": 80,
"rawHeight": 180, "rawHeight": 80,
"borderTop": 0, "borderTop": 0,
"borderBottom": 0, "borderBottom": 0,
"borderLeft": 0, "borderLeft": 0,
......
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
"premultiplyAlpha": false, "premultiplyAlpha": false,
"genMipmaps": false, "genMipmaps": false,
"packable": true, "packable": true,
"width": 213, "width": 80,
"height": 180, "height": 80,
"platformSettings": {}, "platformSettings": {},
"subMetas": { "subMetas": {
"play": { "play": {
...@@ -18,14 +18,14 @@ ...@@ -18,14 +18,14 @@
"trimType": "auto", "trimType": "auto",
"trimThreshold": 1, "trimThreshold": 1,
"rotated": false, "rotated": false,
"offsetX": 0, "offsetX": -0.5,
"offsetY": 0, "offsetY": 0,
"trimX": 0, "trimX": 0,
"trimY": 0, "trimY": 6,
"width": 213, "width": 79,
"height": 180, "height": 68,
"rawWidth": 213, "rawWidth": 80,
"rawHeight": 180, "rawHeight": 80,
"borderTop": 0, "borderTop": 0,
"borderBottom": 0, "borderBottom": 0,
"borderLeft": 0, "borderLeft": 0,
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment