修复暂停按钮

This commit is contained in:
2025-06-03 19:57:43 +08:00
parent 483df4cf34
commit b1a3d44bdb
5 changed files with 36 additions and 42 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 865 B

View File

@@ -1,6 +0,0 @@
{
"uuid": "d45b000b-f3e3-4db4-ab5d-a3f0715ac18f",
"importer": {
"textureType": 2
}
}

View File

@@ -19,7 +19,7 @@
}, },
"btn_new": null, "btn_new": null,
"btn_pause": { "btn_pause": {
"_$ref": "qfuij2yw" "_$ref": "m2fmtqrc"
}, },
"obj_mask": { "obj_mask": {
"_$ref": "n15hk529" "_$ref": "n15hk529"
@@ -98,24 +98,23 @@
] ]
}, },
{ {
"_$id": "qfuij2yw", "_$id": "m2fmtqrc",
"_$type": "Button", "_$type": "Box",
"name": "btn_pause", "name": "btn_pause",
"x": 990, "x": 990,
"width": 75, "width": 200,
"height": 75, "height": 200,
"_mouseState": 2, "_$child": [
"stateNum": 1,
"skin": "res://7d36066d-f01a-4a46-9eb7-109f58cdbc19",
"label": "",
"labelSize": 20,
"labelAlign": "center",
"labelVAlign": "middle",
"_$comp": [
{ {
"_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", "_$id": "5uhu17g4",
"scriptPath": "../src/views/common/CommonHover.ts", "_$type": "Image",
"hoverAlpha": true "name": "Image",
"width": 84,
"height": 84,
"mouseThrough": true,
"skin": "res://7d36066d-f01a-4a46-9eb7-109f58cdbc19",
"useSourceSize": true,
"color": "#ffffff"
} }
] ]
} }
@@ -45649,6 +45648,7 @@
"name": "mask", "name": "mask",
"width": 1080, "width": 1080,
"height": 1920, "height": 1920,
"visible": false,
"centerX": 0, "centerX": 0,
"centerY": 0, "centerY": 0,
"_$child": [ "_$child": [

View File

@@ -21,7 +21,7 @@
"_$ref": "zz4k3kw6" "_$ref": "zz4k3kw6"
}, },
"btn_pause": { "btn_pause": {
"_$ref": "a584gnqk" "_$ref": "xl8gtdmx"
}, },
"obj_mask": { "obj_mask": {
"_$ref": "9y0dq6th" "_$ref": "9y0dq6th"
@@ -45495,27 +45495,26 @@
"padding": "0,0,0,0", "padding": "0,0,0,0",
"_$child": [ "_$child": [
{ {
"_$id": "a584gnqk", "_$id": "xl8gtdmx",
"_$type": "Button", "_$type": "Box",
"name": "btn_pause", "name": "btn_pause",
"x": 306, "x": 306,
"y": -2, "y": -2,
"width": 30, "width": 30,
"height": 30, "height": 30,
"_mouseState": 2, "_$child": [
"right": -36,
"centerY": -2,
"stateNum": 1,
"skin": "res://d45b000b-f3e3-4db4-ab5d-a3f0715ac18f",
"label": "",
"labelSize": 20,
"labelAlign": "center",
"labelVAlign": "middle",
"_$comp": [
{ {
"_$type": "a541bdfc-e8e1-4795-b68e-7138c5190f17", "_$id": "7000il0d",
"scriptPath": "../src/views/common/CommonHover.ts", "_$type": "Image",
"hoverAlpha": true "name": "Image",
"width": 84,
"height": 84,
"scaleX": 0.35,
"scaleY": 0.35,
"mouseThrough": true,
"skin": "res://7d36066d-f01a-4a46-9eb7-109f58cdbc19",
"useSourceSize": true,
"color": "#ffffff"
} }
] ]
} }

View File

@@ -20,8 +20,8 @@ export class Stage extends Laya.Script {
@property(Laya.Box) @property(Laya.Box)
public btn_new: Laya.Box public btn_new: Laya.Box
@property(Laya.Button) @property(Laya.Box)
public btn_pause: Laya.Button public btn_pause: Laya.Box
@property(Laya.Box) @property(Laya.Box)
public obj_mask: Laya.Box public obj_mask: Laya.Box
@@ -143,8 +143,6 @@ export class Stage extends Laya.Script {
this.btn_hint_ad = this.btn_hint.getChildByName("Image").getChildByName("ad") as Laya.Box this.btn_hint_ad = this.btn_hint.getChildByName("Image").getChildByName("ad") as Laya.Box
this.btn_hint_label = this.btn_hint.getChildByName("Image").getChildByName("normal").getChildByName("label") as Laya.Label this.btn_hint_label = this.btn_hint.getChildByName("Image").getChildByName("normal").getChildByName("label") as Laya.Label
this.obj_mask.visible = false
EventManager.getInstance().RegisterEvent(EVENT_TYPES.NOT_UPDATE_MISTAKE, Stage.EventUpdateMistake) EventManager.getInstance().RegisterEvent(EVENT_TYPES.NOT_UPDATE_MISTAKE, Stage.EventUpdateMistake)
EventManager.getInstance().RegisterEvent(EVENT_TYPES.NOT_UPDATE_PAUSE, Stage.EventUpdatePause) EventManager.getInstance().RegisterEvent(EVENT_TYPES.NOT_UPDATE_PAUSE, Stage.EventUpdatePause)
} }
@@ -174,6 +172,8 @@ export class Stage extends Laya.Script {
this.data = doStage this.data = doStage
this.paused = false this.paused = false
this.obj_mask.visible = false
if (config.H_SCREEN) { if (config.H_SCREEN) {
this.btn_back.visible = this.data.get_stageType() === config.STAGE_TYPE.DC this.btn_back.visible = this.data.get_stageType() === config.STAGE_TYPE.DC
this.btn_new.visible = this.data.get_stageType() === config.STAGE_TYPE.MAIN this.btn_new.visible = this.data.get_stageType() === config.STAGE_TYPE.MAIN
@@ -210,6 +210,7 @@ export class Stage extends Laya.Script {
block.setBlock(doBlock) block.setBlock(doBlock)
block.setTipsBgColor(false) block.setTipsBgColor(false)
block.setSelected(false) block.setSelected(false)
block.setPaused(false)
} }
this.onUpdateCandys() this.onUpdateCandys()
this.onClickNote(null) this.onClickNote(null)