提示信息取消关闭按钮
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 42s

This commit is contained in:
TJH 2025-11-05 11:31:13 +08:00
parent 846e13deb2
commit 3e513a8593
2 changed files with 81 additions and 229 deletions

View File

@ -28,17 +28,17 @@
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 90 "__id__": 84
}, },
{ {
"__id__": 92 "__id__": 86
}, },
{ {
"__id__": 94 "__id__": 88
} }
], ],
"_prefab": { "_prefab": {
"__id__": 96 "__id__": 90
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
@ -287,38 +287,35 @@
"__id__": 31 "__id__": 31
}, },
{ {
"__id__": 37 "__id__": 39
}, },
{ {
"__id__": 45 "__id__": 45
}, },
{ {
"__id__": 51 "__id__": 53
}, },
{ {
"__id__": 59 "__id__": 59
}, },
{ {
"__id__": 65 "__id__": 67
}, },
{ {
"__id__": 73 "__id__": 73
},
{
"__id__": 79
} }
], ],
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 85 "__id__": 79
}, },
{ {
"__id__": 87 "__id__": 81
} }
], ],
"_prefab": { "_prefab": {
"__id__": 89 "__id__": 83
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
@ -629,7 +626,7 @@
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "Btn_Close_A", "_name": "Btn_Confirm",
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"_parent": { "_parent": {
@ -650,8 +647,8 @@
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 361.82399999999996, "x": 200,
"y": 201.5039999999999, "y": -155,
"z": 0 "z": 0
}, },
"_lrot": { "_lrot": {
@ -689,142 +686,6 @@
"__prefab": { "__prefab": {
"__id__": 27 "__id__": 27
}, },
"_contentSize": {
"__type__": "cc.Size",
"width": 50,
"height": 50
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0.5,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "10gA4Nb7tMrbzzyBtBAX6x"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 25
},
"_enabled": true,
"__prefab": {
"__id__": 29
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_spriteFrame": {
"__uuid__": "65bd128a-5b00-4ace-b646-dbf840043116@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 0,
"_fillType": 0,
"_sizeMode": 2,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "63fJkyacRL+7WAfqYIkEL6"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "b3a6gc+YlJhItiIGL9tVv7",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.Node",
"_name": "Btn_Confirm",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 12
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 32
},
{
"__id__": 34
}
],
"_prefab": {
"__id__": 36
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 200,
"y": -155,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 33554432,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 31
},
"_enabled": true,
"__prefab": {
"__id__": 33
},
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 287, "width": 287,
@ -847,11 +708,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 31 "__id__": 25
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 35 "__id__": 29
}, },
"_customMaterial": null, "_customMaterial": null,
"_srcBlendFactor": 2, "_srcBlendFactor": 2,
@ -914,17 +775,17 @@
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 38 "__id__": 32
}, },
{ {
"__id__": 40 "__id__": 34
}, },
{ {
"__id__": 42 "__id__": 36
} }
], ],
"_prefab": { "_prefab": {
"__id__": 44 "__id__": 38
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
@ -961,11 +822,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 37 "__id__": 31
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 39 "__id__": 33
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
@ -989,11 +850,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 37 "__id__": 31
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 41 "__id__": 35
}, },
"_customMaterial": null, "_customMaterial": null,
"_srcBlendFactor": 2, "_srcBlendFactor": 2,
@ -1060,11 +921,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 37 "__id__": 31
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 43 "__id__": 37
}, },
"_key": "AID_QUIT_RIGHT_BUTTON", "_key": "AID_QUIT_RIGHT_BUTTON",
"_id": "" "_id": ""
@ -1098,14 +959,14 @@
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 46 "__id__": 40
}, },
{ {
"__id__": 48 "__id__": 42
} }
], ],
"_prefab": { "_prefab": {
"__id__": 50 "__id__": 44
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
@ -1142,11 +1003,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 45 "__id__": 39
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 47 "__id__": 41
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
@ -1170,11 +1031,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 45 "__id__": 39
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 49 "__id__": 43
}, },
"_customMaterial": null, "_customMaterial": null,
"_srcBlendFactor": 2, "_srcBlendFactor": 2,
@ -1237,17 +1098,17 @@
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 52 "__id__": 46
}, },
{ {
"__id__": 54 "__id__": 48
}, },
{ {
"__id__": 56 "__id__": 50
} }
], ],
"_prefab": { "_prefab": {
"__id__": 58 "__id__": 52
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
@ -1284,11 +1145,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 51 "__id__": 45
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 53 "__id__": 47
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
@ -1312,11 +1173,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 51 "__id__": 45
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 55 "__id__": 49
}, },
"_customMaterial": null, "_customMaterial": null,
"_srcBlendFactor": 2, "_srcBlendFactor": 2,
@ -1383,11 +1244,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 51 "__id__": 45
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 57 "__id__": 51
}, },
"_key": "AID_QUIT_LEFT_BUTTON", "_key": "AID_QUIT_LEFT_BUTTON",
"_id": "" "_id": ""
@ -1421,14 +1282,14 @@
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 60 "__id__": 54
}, },
{ {
"__id__": 62 "__id__": 56
} }
], ],
"_prefab": { "_prefab": {
"__id__": 64 "__id__": 58
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
@ -1465,11 +1326,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 59 "__id__": 53
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 61 "__id__": 55
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
@ -1493,11 +1354,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 59 "__id__": 53
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 63 "__id__": 57
}, },
"_customMaterial": null, "_customMaterial": null,
"_srcBlendFactor": 2, "_srcBlendFactor": 2,
@ -1560,17 +1421,17 @@
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 66 "__id__": 60
}, },
{ {
"__id__": 68 "__id__": 62
}, },
{ {
"__id__": 70 "__id__": 64
} }
], ],
"_prefab": { "_prefab": {
"__id__": 72 "__id__": 66
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
@ -1607,11 +1468,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 65 "__id__": 59
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 67 "__id__": 61
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
@ -1635,11 +1496,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 65 "__id__": 59
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 69 "__id__": 63
}, },
"_customMaterial": null, "_customMaterial": null,
"_srcBlendFactor": 2, "_srcBlendFactor": 2,
@ -1706,11 +1567,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 65 "__id__": 59
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 71 "__id__": 65
}, },
"_key": "AID_QUIT_LEFT_BUTTON", "_key": "AID_QUIT_LEFT_BUTTON",
"_id": "" "_id": ""
@ -1744,14 +1605,14 @@
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 74 "__id__": 68
}, },
{ {
"__id__": 76 "__id__": 70
} }
], ],
"_prefab": { "_prefab": {
"__id__": 78 "__id__": 72
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
@ -1788,11 +1649,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 73 "__id__": 67
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 75 "__id__": 69
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
@ -1816,11 +1677,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 73 "__id__": 67
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 77 "__id__": 71
}, },
"_customMaterial": null, "_customMaterial": null,
"_srcBlendFactor": 2, "_srcBlendFactor": 2,
@ -1906,14 +1767,14 @@
"_active": true, "_active": true,
"_components": [ "_components": [
{ {
"__id__": 80 "__id__": 74
}, },
{ {
"__id__": 82 "__id__": 76
} }
], ],
"_prefab": { "_prefab": {
"__id__": 84 "__id__": 78
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
@ -1950,11 +1811,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 79 "__id__": 73
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 81 "__id__": 75
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
@ -1978,11 +1839,11 @@
"_objFlags": 0, "_objFlags": 0,
"__editorExtras__": {}, "__editorExtras__": {},
"node": { "node": {
"__id__": 79 "__id__": 73
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 83 "__id__": 77
}, },
"_customMaterial": null, "_customMaterial": null,
"_srcBlendFactor": 2, "_srcBlendFactor": 2,
@ -2066,7 +1927,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 86 "__id__": 80
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
@ -2094,7 +1955,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 88 "__id__": 82
}, },
"_alignFlags": 45, "_alignFlags": 45,
"_target": null, "_target": null,
@ -2143,7 +2004,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 91 "__id__": 85
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
@ -2171,7 +2032,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 93 "__id__": 87
}, },
"_alignFlags": 45, "_alignFlags": 45,
"_target": null, "_target": null,
@ -2207,7 +2068,7 @@
}, },
"_enabled": true, "_enabled": true,
"__prefab": { "__prefab": {
"__id__": 95 "__id__": 89
}, },
"_id": "" "_id": ""
}, },

View File

@ -16,7 +16,7 @@ export class TipPanel extends Component {
tipNode: Node = null; tipNode: Node = null;
messageNode: Node = null; messageNode: Node = null;
hasTip:boolean = false; hasTip: boolean = false;
/** /**
@ -129,14 +129,6 @@ export class TipPanel extends Component {
.start(); .start();
}); });
} }
// 添加关闭按钮点击事件
let closeBtn = message.getChildByName('Btn_Close_A');
closeBtn.on(Node.EventType.TOUCH_END, () => {
if (this.isAnimating) return;
AudioManager.instance.playSFX('Common_Button_Click');
this.closeTip();
});
} }
// 回收节点 // 回收节点
@ -146,7 +138,6 @@ export class TipPanel extends Component {
this.messageNode.getChildByName('Btn_Confirm').off(Node.EventType.TOUCH_END); this.messageNode.getChildByName('Btn_Confirm').off(Node.EventType.TOUCH_END);
this.messageNode.getChildByName('Btn_Cancel').off(Node.EventType.TOUCH_END); this.messageNode.getChildByName('Btn_Cancel').off(Node.EventType.TOUCH_END);
this.messageNode.getChildByName('Btn_Confirm_1').off(Node.EventType.TOUCH_END); this.messageNode.getChildByName('Btn_Confirm_1').off(Node.EventType.TOUCH_END);
this.messageNode.getChildByName('Btn_Close_A').off(Node.EventType.TOUCH_END);
// 回收节点 // 回收节点
NodePoolManager.instance.putNodeToPool('TipMessagePanel', this.tipNode); NodePoolManager.instance.putNodeToPool('TipMessagePanel', this.tipNode);
} }