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
});
}
saveUserData() {
this.checkNeedBack();
const result = [];
this.timePointData.forEach(p => {
const t = {...p};
......@@ -563,6 +566,11 @@ export class LrcEditorComponent implements OnInit, OnChanges, OnDestroy, AfterVi
this.editFinished.emit(this.LRCData);
// console.log(this.timePointData);
}
checkNeedBack() {
if (this.isScaleTimeLine) {
this.restoreTimeLine();
}
}
changePlaybackRate(val) {
this.audioObj.playbackRate = val;
}
......
......@@ -430,15 +430,21 @@ cc.Class({
} else {
btn.actionStatus = this.BUTTON_STATUS.ACTIVE;
cc.tween(button).to(dur, {scale: 1.2}).start()
this.changeBtnActive(button, true);
}
return;
}
button.actionStatus = this.BUTTON_STATUS.IDLE
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) {
// 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 @@
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": -0.5,
"trimX": 2,
"trimY": 1,
"width": 152,
"height": 131,
"rawWidth": 156,
"rawHeight": 132,
"offsetY": 0,
"trimX": 0,
"trimY": 5,
"width": 80,
"height": 70,
"rawWidth": 80,
"rawHeight": 80,
"borderTop": 0,
"borderBottom": 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 @@
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 156,
"height": 132,
"width": 80,
"height": 80,
"platformSettings": {},
"subMetas": {
"btn2": {
......@@ -18,14 +18,14 @@
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": -0.5,
"offsetX": -0.5,
"offsetY": 0,
"trimX": 2,
"trimY": 1,
"width": 152,
"height": 131,
"rawWidth": 156,
"rawHeight": 132,
"trimY": 7,
"width": 75,
"height": 66,
"rawWidth": 80,
"rawHeight": 80,
"borderTop": 0,
"borderBottom": 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 @@
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 75,
"height": 150,
"width": 80,
"height": 80,
"platformSettings": {
"default": {
"formats": []
......@@ -22,14 +22,14 @@
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetX": -0.5,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 75,
"height": 150,
"rawWidth": 75,
"rawHeight": 150,
"trimX": 18,
"trimY": 1,
"width": 43,
"height": 78,
"rawWidth": 80,
"rawHeight": 80,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
......
......@@ -18,14 +18,14 @@
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetX": -0.5,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 213,
"height": 180,
"rawWidth": 213,
"rawHeight": 180,
"trimY": 6,
"width": 79,
"height": 68,
"rawWidth": 80,
"rawHeight": 80,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
......
......@@ -7,8 +7,8 @@
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 213,
"height": 180,
"width": 80,
"height": 80,
"platformSettings": {},
"subMetas": {
"play": {
......@@ -18,14 +18,14 @@
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetX": -0.5,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 213,
"height": 180,
"rawWidth": 213,
"rawHeight": 180,
"trimY": 6,
"width": 79,
"height": 68,
"rawWidth": 80,
"rawHeight": 80,
"borderTop": 0,
"borderBottom": 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