future 1 year ago
parent
commit
4483e5eb7c

+ 271 - 70
assets/resources/prefab/task/other_drag_list_item.prefab

@@ -40,20 +40,23 @@
         "__id__": 216
       },
       {
-        "__id__": 252
+        "__id__": 224
+      },
+      {
+        "__id__": 260
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 258
+        "__id__": 266
       },
       {
-        "__id__": 260
+        "__id__": 268
       }
     ],
     "_prefab": {
-      "__id__": 262
+      "__id__": 270
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -5019,6 +5022,201 @@
     "targetOverrides": null,
     "nestedPrefabInstanceRoots": null
   },
+  {
+    "__type__": "cc.Node",
+    "_name": "btn_clear_finish",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 217
+      },
+      {
+        "__id__": 219
+      },
+      {
+        "__id__": 221
+      }
+    ],
+    "_prefab": {
+      "__id__": 223
+    },
+    "_lpos": {
+      "__type__": "cc.Vec3",
+      "x": 169.123,
+      "y": -59.708,
+      "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__": 216
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 218
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 40,
+      "height": 40
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "d2R85mMWRGqKrQ0Wujt5/T"
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 216
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 220
+    },
+    "_customMaterial": null,
+    "_srcBlendFactor": 2,
+    "_dstBlendFactor": 4,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_spriteFrame": {
+      "__uuid__": "64c1f2bf-dc82-4530-bd30-7879d5a3e03e@f9941",
+      "__expectedType__": "cc.SpriteFrame"
+    },
+    "_type": 0,
+    "_fillType": 0,
+    "_sizeMode": 0,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_useGrayscale": false,
+    "_atlas": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "ddrmYS7IpK0bGJlMRgIn4D"
+  },
+  {
+    "__type__": "cc.Button",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 216
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 222
+    },
+    "clickEvents": [],
+    "_interactable": true,
+    "_transition": 3,
+    "_normalColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_hoverColor": {
+      "__type__": "cc.Color",
+      "r": 211,
+      "g": 211,
+      "b": 211,
+      "a": 255
+    },
+    "_pressedColor": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_disabledColor": {
+      "__type__": "cc.Color",
+      "r": 124,
+      "g": 124,
+      "b": 124,
+      "a": 255
+    },
+    "_normalSprite": null,
+    "_hoverSprite": null,
+    "_pressedSprite": null,
+    "_disabledSprite": null,
+    "_duration": 0.1,
+    "_zoomScale": 0.9,
+    "_target": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "7eqbt+JlhLWKn2/0kPCgip"
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "e23u9rdjxEI7ae+PNST0g7",
+    "instance": null,
+    "targetOverrides": null,
+    "nestedPrefabInstanceRoots": null
+  },
   {
     "__type__": "cc.Node",
     "_name": "up_down_node",
@@ -5029,20 +5227,20 @@
     },
     "_children": [
       {
-        "__id__": 217
+        "__id__": 225
       },
       {
-        "__id__": 233
+        "__id__": 241
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 249
+        "__id__": 257
       }
     ],
     "_prefab": {
-      "__id__": 251
+      "__id__": 259
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -5079,30 +5277,30 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
-      "__id__": 216
+      "__id__": 224
     },
     "_children": [
       {
-        "__id__": 218
+        "__id__": 226
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 224
+        "__id__": 232
       },
       {
-        "__id__": 226
+        "__id__": 234
       },
       {
-        "__id__": 228
+        "__id__": 236
       },
       {
-        "__id__": 230
+        "__id__": 238
       }
     ],
     "_prefab": {
-      "__id__": 232
+      "__id__": 240
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -5139,20 +5337,20 @@
     "_objFlags": 512,
     "__editorExtras__": {},
     "_parent": {
-      "__id__": 217
+      "__id__": 225
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 219
+        "__id__": 227
       },
       {
-        "__id__": 221
+        "__id__": 229
       }
     ],
     "_prefab": {
-      "__id__": 223
+      "__id__": 231
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -5189,11 +5387,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 218
+      "__id__": 226
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 220
+      "__id__": 228
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -5217,11 +5415,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 218
+      "__id__": 226
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 222
+      "__id__": 230
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -5275,11 +5473,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 217
+      "__id__": 225
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 225
+      "__id__": 233
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -5303,11 +5501,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 217
+      "__id__": 225
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 227
+      "__id__": 235
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -5348,11 +5546,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 217
+      "__id__": 225
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 229
+      "__id__": 237
     },
     "clickEvents": [],
     "_interactable": true,
@@ -5392,7 +5590,7 @@
     "_duration": 0.1,
     "_zoomScale": 1.2,
     "_target": {
-      "__id__": 217
+      "__id__": 225
     },
     "_id": ""
   },
@@ -5406,11 +5604,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 217
+      "__id__": 225
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 231
+      "__id__": 239
     },
     "_alignFlags": 32,
     "_target": null,
@@ -5455,30 +5653,30 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
-      "__id__": 216
+      "__id__": 224
     },
     "_children": [
       {
-        "__id__": 234
+        "__id__": 242
       }
     ],
     "_active": true,
     "_components": [
       {
-        "__id__": 240
+        "__id__": 248
       },
       {
-        "__id__": 242
+        "__id__": 250
       },
       {
-        "__id__": 244
+        "__id__": 252
       },
       {
-        "__id__": 246
+        "__id__": 254
       }
     ],
     "_prefab": {
-      "__id__": 248
+      "__id__": 256
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -5515,20 +5713,20 @@
     "_objFlags": 512,
     "__editorExtras__": {},
     "_parent": {
-      "__id__": 233
+      "__id__": 241
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 235
+        "__id__": 243
       },
       {
-        "__id__": 237
+        "__id__": 245
       }
     ],
     "_prefab": {
-      "__id__": 239
+      "__id__": 247
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -5565,11 +5763,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 234
+      "__id__": 242
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 236
+      "__id__": 244
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -5593,11 +5791,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 234
+      "__id__": 242
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 238
+      "__id__": 246
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -5651,11 +5849,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 233
+      "__id__": 241
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 241
+      "__id__": 249
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -5679,11 +5877,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 233
+      "__id__": 241
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 243
+      "__id__": 251
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -5724,11 +5922,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 233
+      "__id__": 241
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 245
+      "__id__": 253
     },
     "clickEvents": [],
     "_interactable": true,
@@ -5768,7 +5966,7 @@
     "_duration": 0.1,
     "_zoomScale": 1.2,
     "_target": {
-      "__id__": 233
+      "__id__": 241
     },
     "_id": ""
   },
@@ -5782,11 +5980,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 233
+      "__id__": 241
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 247
+      "__id__": 255
     },
     "_alignFlags": 32,
     "_target": null,
@@ -5831,11 +6029,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 216
+      "__id__": 224
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 250
+      "__id__": 258
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -5878,14 +6076,14 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 253
+        "__id__": 261
       },
       {
-        "__id__": 255
+        "__id__": 263
       }
     ],
     "_prefab": {
-      "__id__": 257
+      "__id__": 265
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -5922,11 +6120,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 252
+      "__id__": 260
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 254
+      "__id__": 262
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -5950,11 +6148,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 252
+      "__id__": 260
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 256
+      "__id__": 264
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -6012,7 +6210,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 259
+      "__id__": 267
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -6040,7 +6238,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 261
+      "__id__": 269
     },
     "drag_width": {
       "__id__": 133
@@ -6061,7 +6259,7 @@
       "__id__": 203
     },
     "btn_delete": {
-      "__id__": 252
+      "__id__": 260
     },
     "editBox_remark": {
       "__id__": 34
@@ -6073,10 +6271,13 @@
       "__id__": 43
     },
     "btn_up": {
-      "__id__": 217
+      "__id__": 225
     },
     "btn_down": {
-      "__id__": 233
+      "__id__": 241
+    },
+    "btn_clear_finish": {
+      "__id__": 216
     },
     "_id": ""
   },

+ 11 - 0
assets/script/edit/attributes/other_drag_list_item.ts

@@ -21,6 +21,7 @@ export class other_drag_list_item extends Component {
     @property(Node) btn_is_show:Node = null;
     @property(Node) btn_up:Node = null;
     @property(Node) btn_down:Node = null;
+    @property(Node) btn_clear_finish:Node = null
     private m_index:number = 0
     private m_data:att_drag_data = null;
     private m_delete_call = null;
@@ -38,6 +39,16 @@ export class other_drag_list_item extends Component {
                 this.update_att(this.m_data)
             })
         })
+        this.btn_clear_finish.on(Node.EventType.TOUCH_END, ()=>{
+            if(this.m_data.other_event_id==-1) {
+                return
+            }
+            tools.show_dialog('清空?', ()=>{
+                this.m_data.other_event_id = -1
+                this.lab_finish_logic.getComponent(Label).string = "无"
+
+            })
+        })
         this.btn_delete.on(Node.EventType.TOUCH_END,()=>{
             if(this.m_delete_call){
                 this.m_delete_call(this.m_data)