feat: 道具弹窗换图
@@ -1,4 +1,4 @@
|
||||
const { ccclass } = cc._decorator;
|
||||
const { ccclass, executeInEditMode } = cc._decorator;
|
||||
|
||||
type PropWindowAction = (event?: cc.Event, customEventData?: string) => void;
|
||||
|
||||
@@ -8,9 +8,28 @@ interface PropWindowActions {
|
||||
|
||||
/** propWindow prefab 的按钮桥接层。 */
|
||||
@ccclass
|
||||
@executeInEditMode
|
||||
export default class PropWindowPanel extends cc.Component {
|
||||
private actions: PropWindowActions = null;
|
||||
|
||||
onLoad() {
|
||||
// The supplied panel texture starts at the rim; draw the two rounded ears behind it.
|
||||
const prop = this.node.getChildByName("prop");
|
||||
if (!prop || prop.getChildByName("panelEars")) return;
|
||||
const ears = new cc.Node("panelEars");
|
||||
(ears as any)._objFlags |= (cc.Object as any).Flags.DontSave;
|
||||
prop.addChild(ears);
|
||||
ears.setSiblingIndex(0);
|
||||
const graphics = ears.addComponent(cc.Graphics);
|
||||
graphics.fillColor = cc.color(244, 229, 200);
|
||||
[-1, 1].forEach(side => {
|
||||
graphics.moveTo(side * 190, 628);
|
||||
graphics.bezierCurveTo(side * 245, 710, side * 282, 713, side * 303, 628);
|
||||
graphics.close();
|
||||
graphics.fill();
|
||||
});
|
||||
}
|
||||
|
||||
bind(actions: PropWindowActions) {
|
||||
this.actions = actions || {};
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 3.5 KiB |
@@ -8,8 +8,8 @@
|
||||
"premultiplyAlpha": false,
|
||||
"genMipmaps": false,
|
||||
"packable": true,
|
||||
"width": 256,
|
||||
"height": 67,
|
||||
"width": 324,
|
||||
"height": 86,
|
||||
"platformSettings": {},
|
||||
"subMetas": {
|
||||
"Buy": {
|
||||
@@ -21,13 +21,13 @@
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"offsetY": 0.5,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 256,
|
||||
"height": 67,
|
||||
"rawWidth": 256,
|
||||
"rawHeight": 67,
|
||||
"width": 324,
|
||||
"height": 85,
|
||||
"rawWidth": 324,
|
||||
"rawHeight": 86,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
|
||||
|
Before Width: | Height: | Size: 5.2 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"ver": "2.3.7",
|
||||
"uuid": "3a4984d8-d34b-4cf6-be1e-7eea694149b5",
|
||||
"uuid": "291ff358-5d71-4920-a636-54f78db9da60",
|
||||
"importer": "texture",
|
||||
"type": "sprite",
|
||||
"wrapMode": "clamp",
|
||||
@@ -8,26 +8,26 @@
|
||||
"premultiplyAlpha": false,
|
||||
"genMipmaps": false,
|
||||
"packable": true,
|
||||
"width": 131,
|
||||
"height": 102,
|
||||
"width": 642,
|
||||
"height": 170,
|
||||
"platformSettings": {},
|
||||
"subMetas": {
|
||||
"buy_x1": {
|
||||
"buy_button": {
|
||||
"ver": "1.0.6",
|
||||
"uuid": "8c1bca86-7a3e-43db-a574-d62cb7d4eb99",
|
||||
"uuid": "1ee1b245-8942-4090-a7ff-6b7d202ef356",
|
||||
"importer": "sprite-frame",
|
||||
"rawTextureUuid": "3a4984d8-d34b-4cf6-be1e-7eea694149b5",
|
||||
"trimType": "auto",
|
||||
"rawTextureUuid": "291ff358-5d71-4920-a636-54f78db9da60",
|
||||
"trimType": "custom",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": -0.5,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 130,
|
||||
"height": 102,
|
||||
"rawWidth": 131,
|
||||
"rawHeight": 102,
|
||||
"width": 642,
|
||||
"height": 170,
|
||||
"rawWidth": 642,
|
||||
"rawHeight": 170,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
|
After Width: | Height: | Size: 1.9 KiB |
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"ver": "2.3.7",
|
||||
"uuid": "095b1352-bfa9-429a-af7e-2a932cbbaa27",
|
||||
"uuid": "18ff6391-183e-4252-ad27-15f7ba99f65b",
|
||||
"importer": "texture",
|
||||
"type": "sprite",
|
||||
"wrapMode": "clamp",
|
||||
@@ -8,26 +8,26 @@
|
||||
"premultiplyAlpha": false,
|
||||
"genMipmaps": false,
|
||||
"packable": true,
|
||||
"width": 636,
|
||||
"height": 173,
|
||||
"width": 142,
|
||||
"height": 72,
|
||||
"platformSettings": {},
|
||||
"subMetas": {
|
||||
"btn_Buy": {
|
||||
"buy_label": {
|
||||
"ver": "1.0.6",
|
||||
"uuid": "0e54b4bc-f5a9-4a3f-82dc-b3c9537da2af",
|
||||
"uuid": "dedec64a-9f93-4742-a430-7ae97fc25c57",
|
||||
"importer": "sprite-frame",
|
||||
"rawTextureUuid": "095b1352-bfa9-429a-af7e-2a932cbbaa27",
|
||||
"trimType": "auto",
|
||||
"rawTextureUuid": "18ff6391-183e-4252-ad27-15f7ba99f65b",
|
||||
"trimType": "custom",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 636,
|
||||
"height": 173,
|
||||
"rawWidth": 636,
|
||||
"rawHeight": 173,
|
||||
"width": 142,
|
||||
"height": 72,
|
||||
"rawWidth": 142,
|
||||
"rawHeight": 72,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
@@ -1,38 +0,0 @@
|
||||
{
|
||||
"ver": "2.3.7",
|
||||
"uuid": "9f29e5a2-dee6-468c-82cd-cad221262602",
|
||||
"importer": "texture",
|
||||
"type": "sprite",
|
||||
"wrapMode": "clamp",
|
||||
"filterMode": "bilinear",
|
||||
"premultiplyAlpha": false,
|
||||
"genMipmaps": false,
|
||||
"packable": true,
|
||||
"width": 145,
|
||||
"height": 103,
|
||||
"platformSettings": {},
|
||||
"subMetas": {
|
||||
"buy_x3": {
|
||||
"ver": "1.0.6",
|
||||
"uuid": "d6dc38cb-4956-4677-8e4e-3720f0cac0e9",
|
||||
"importer": "sprite-frame",
|
||||
"rawTextureUuid": "9f29e5a2-dee6-468c-82cd-cad221262602",
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": -0.5,
|
||||
"offsetY": 0.5,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 144,
|
||||
"height": 102,
|
||||
"rawWidth": 145,
|
||||
"rawHeight": 103,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
"borderRight": 0,
|
||||
"subMetas": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 11 KiB |
@@ -8,8 +8,8 @@
|
||||
"premultiplyAlpha": false,
|
||||
"genMipmaps": false,
|
||||
"packable": true,
|
||||
"width": 284,
|
||||
"height": 297,
|
||||
"width": 265,
|
||||
"height": 281,
|
||||
"platformSettings": {},
|
||||
"subMetas": {
|
||||
"daojudamof": {
|
||||
@@ -20,14 +20,14 @@
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0.5,
|
||||
"offsetY": 0.5,
|
||||
"trimX": 1,
|
||||
"trimY": 0,
|
||||
"width": 283,
|
||||
"height": 296,
|
||||
"rawWidth": 284,
|
||||
"rawHeight": 297,
|
||||
"offsetX": -0.5,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 1,
|
||||
"width": 264,
|
||||
"height": 279,
|
||||
"rawWidth": 265,
|
||||
"rawHeight": 281,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
|
||||
|
After Width: | Height: | Size: 4.8 KiB |
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"ver": "2.3.7",
|
||||
"uuid": "f85f9bbe-8243-4c96-9e3d-fbf7def0c493",
|
||||
"importer": "texture",
|
||||
"type": "sprite",
|
||||
"wrapMode": "clamp",
|
||||
"filterMode": "bilinear",
|
||||
"premultiplyAlpha": false,
|
||||
"genMipmaps": false,
|
||||
"packable": true,
|
||||
"width": 862,
|
||||
"height": 812,
|
||||
"platformSettings": {},
|
||||
"subMetas": {
|
||||
"dikuang": {
|
||||
"ver": "1.0.6",
|
||||
"uuid": "6cd50f79-461b-4f9a-8231-6279fd62ebac",
|
||||
"importer": "sprite-frame",
|
||||
"rawTextureUuid": "f85f9bbe-8243-4c96-9e3d-fbf7def0c493",
|
||||
"trimType": "custom",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": -26,
|
||||
"trimX": 0,
|
||||
"trimY": 52,
|
||||
"width": 862,
|
||||
"height": 760,
|
||||
"rawWidth": 862,
|
||||
"rawHeight": 812,
|
||||
"borderTop": 160,
|
||||
"borderBottom": 480,
|
||||
"borderLeft": 60,
|
||||
"borderRight": 60,
|
||||
"subMetas": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 4.3 KiB |
@@ -8,8 +8,8 @@
|
||||
"premultiplyAlpha": false,
|
||||
"genMipmaps": false,
|
||||
"packable": true,
|
||||
"width": 404,
|
||||
"height": 83,
|
||||
"width": 408,
|
||||
"height": 87,
|
||||
"platformSettings": {},
|
||||
"subMetas": {
|
||||
"freeze_Label": {
|
||||
@@ -24,10 +24,10 @@
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 403,
|
||||
"height": 83,
|
||||
"rawWidth": 404,
|
||||
"rawHeight": 83,
|
||||
"width": 407,
|
||||
"height": 87,
|
||||
"rawWidth": 408,
|
||||
"rawHeight": 87,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
|
||||
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.1 KiB |
@@ -8,7 +8,7 @@
|
||||
"premultiplyAlpha": false,
|
||||
"genMipmaps": false,
|
||||
"packable": true,
|
||||
"width": 530,
|
||||
"width": 531,
|
||||
"height": 148,
|
||||
"platformSettings": {},
|
||||
"subMetas": {
|
||||
@@ -24,9 +24,9 @@
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 530,
|
||||
"width": 531,
|
||||
"height": 148,
|
||||
"rawWidth": 530,
|
||||
"rawWidth": 531,
|
||||
"rawHeight": 148,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
|
||||
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 3.5 KiB |
@@ -8,8 +8,8 @@
|
||||
"premultiplyAlpha": false,
|
||||
"genMipmaps": false,
|
||||
"packable": true,
|
||||
"width": 318,
|
||||
"height": 84,
|
||||
"width": 322,
|
||||
"height": 88,
|
||||
"platformSettings": {},
|
||||
"subMetas": {
|
||||
"hammer_Label": {
|
||||
@@ -24,10 +24,10 @@
|
||||
"offsetY": -0.5,
|
||||
"trimX": 1,
|
||||
"trimY": 1,
|
||||
"width": 317,
|
||||
"height": 83,
|
||||
"rawWidth": 318,
|
||||
"rawHeight": 84,
|
||||
"width": 321,
|
||||
"height": 87,
|
||||
"rawWidth": 322,
|
||||
"rawHeight": 88,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
|
||||
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.4 KiB |
@@ -8,8 +8,8 @@
|
||||
"premultiplyAlpha": false,
|
||||
"genMipmaps": false,
|
||||
"packable": true,
|
||||
"width": 194,
|
||||
"height": 84,
|
||||
"width": 198,
|
||||
"height": 88,
|
||||
"platformSettings": {},
|
||||
"subMetas": {
|
||||
"magic_Label": {
|
||||
@@ -24,10 +24,10 @@
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 194,
|
||||
"height": 84,
|
||||
"rawWidth": 194,
|
||||
"rawHeight": 84,
|
||||
"width": 198,
|
||||
"height": 88,
|
||||
"rawWidth": 198,
|
||||
"rawHeight": 88,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
|
||||
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 11 KiB |
@@ -8,8 +8,8 @@
|
||||
"premultiplyAlpha": false,
|
||||
"genMipmaps": false,
|
||||
"packable": true,
|
||||
"width": 240,
|
||||
"height": 291,
|
||||
"width": 250,
|
||||
"height": 293,
|
||||
"platformSettings": {},
|
||||
"subMetas": {
|
||||
"prop_freeze": {
|
||||
@@ -21,13 +21,13 @@
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"offsetY": -0.5,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 240,
|
||||
"height": 291,
|
||||
"rawWidth": 240,
|
||||
"rawHeight": 291,
|
||||
"trimY": 1,
|
||||
"width": 250,
|
||||
"height": 292,
|
||||
"rawWidth": 250,
|
||||
"rawHeight": 293,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
|
||||
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 12 KiB |
@@ -8,8 +8,8 @@
|
||||
"premultiplyAlpha": false,
|
||||
"genMipmaps": false,
|
||||
"packable": true,
|
||||
"width": 303,
|
||||
"height": 316,
|
||||
"width": 277,
|
||||
"height": 310,
|
||||
"platformSettings": {},
|
||||
"subMetas": {
|
||||
"prop_hammer": {
|
||||
@@ -20,14 +20,14 @@
|
||||
"trimType": "auto",
|
||||
"trimThreshold": 1,
|
||||
"rotated": false,
|
||||
"offsetX": -0.5,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"trimX": 0,
|
||||
"trimY": 0,
|
||||
"width": 302,
|
||||
"height": 316,
|
||||
"rawWidth": 303,
|
||||
"rawHeight": 316,
|
||||
"trimY": 1,
|
||||
"width": 277,
|
||||
"height": 308,
|
||||
"rawWidth": 277,
|
||||
"rawHeight": 310,
|
||||
"borderTop": 0,
|
||||
"borderBottom": 0,
|
||||
"borderLeft": 0,
|
||||
|
||||