future hace 1 año
padre
commit
a237d19d31

+ 101 - 213
assets/resources/ui/car_lib.prefab

@@ -31,20 +31,20 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 178
+        "__id__": 174
       },
       {
-        "__id__": 180
+        "__id__": 176
       },
       {
-        "__id__": 182
+        "__id__": 178
       },
       {
-        "__id__": 184
+        "__id__": 180
       }
     ],
     "_prefab": {
-      "__id__": 186
+      "__id__": 182
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -783,9 +783,9 @@
     "_dstBlendFactor": 4,
     "_color": {
       "__type__": "cc.Color",
-      "r": 170,
-      "g": 196,
-      "b": 239,
+      "r": 165,
+      "g": 198,
+      "b": 245,
       "a": 255
     },
     "_string": "用户1233221",
@@ -942,9 +942,9 @@
     "_dstBlendFactor": 4,
     "_color": {
       "__type__": "cc.Color",
-      "r": 170,
-      "g": 196,
-      "b": 239,
+      "r": 165,
+      "g": 198,
+      "b": 245,
       "a": 255
     },
     "_string": "粤A.ABCDEF",
@@ -1515,10 +1515,7 @@
       "b": 255,
       "a": 255
     },
-    "_spriteFrame": {
-      "__uuid__": "5eb1145a-7c33-447f-bc30-83fe23f76e80@f9941",
-      "__expectedType__": "cc.SpriteFrame"
-    },
+    "_spriteFrame": null,
     "_type": 0,
     "_fillType": 0,
     "_sizeMode": 1,
@@ -1758,6 +1755,9 @@
     "lab_car_pai": {
       "__id__": 32
     },
+    "img_car": {
+      "__id__": 56
+    },
     "_id": ""
   },
   {
@@ -1796,20 +1796,20 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 169
+        "__id__": 165
       },
       {
-        "__id__": 171
+        "__id__": 167
       },
       {
-        "__id__": 173
+        "__id__": 169
       },
       {
-        "__id__": 175
+        "__id__": 171
       }
     ],
     "_prefab": {
-      "__id__": 177
+      "__id__": 173
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -2327,9 +2327,9 @@
     "_dstBlendFactor": 4,
     "_color": {
       "__type__": "cc.Color",
-      "r": 255,
-      "g": 255,
-      "b": 255,
+      "r": 122,
+      "g": 233,
+      "b": 237,
       "a": 255
     },
     "_string": "1/15",
@@ -2904,20 +2904,20 @@
     "_active": true,
     "_components": [
       {
-        "__id__": 162
+        "__id__": 158
       },
       {
-        "__id__": 164
+        "__id__": 160
       },
       {
         "__id__": 137
       },
       {
-        "__id__": 166
+        "__id__": 162
       }
     ],
     "_prefab": {
-      "__id__": 168
+      "__id__": 164
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -2977,7 +2977,7 @@
       }
     ],
     "_prefab": {
-      "__id__": 161
+      "__id__": 157
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -3321,22 +3321,21 @@
     "_parent": {
       "__id__": 140
     },
-    "_children": [
-      {
-        "__id__": 150
-      }
-    ],
+    "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 156
+        "__id__": 150
       },
       {
-        "__id__": 158
+        "__id__": 152
+      },
+      {
+        "__id__": 154
       }
     ],
     "_prefab": {
-      "__id__": 160
+      "__id__": 156
     },
     "_lpos": {
       "__type__": "cc.Vec3",
@@ -3572,165 +3571,6 @@
     "targetOverrides": null,
     "nestedPrefabInstanceRoots": null
   },
-  {
-    "__type__": "cc.Node",
-    "_name": "item",
-    "_objFlags": 0,
-    "__editorExtras__": {},
-    "_parent": {
-      "__id__": 139
-    },
-    "_children": [],
-    "_active": true,
-    "_components": [
-      {
-        "__id__": 151
-      },
-      {
-        "__id__": 153
-      }
-    ],
-    "_prefab": {
-      "__id__": 155
-    },
-    "_lpos": {
-      "__type__": "cc.Vec3",
-      "x": -102,
-      "y": -10.15,
-      "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__": 150
-    },
-    "_enabled": true,
-    "__prefab": {
-      "__id__": 152
-    },
-    "_contentSize": {
-      "__type__": "cc.Size",
-      "width": 131.328125,
-      "height": 25.2
-    },
-    "_anchorPoint": {
-      "__type__": "cc.Vec2",
-      "x": 0,
-      "y": 1
-    },
-    "_id": ""
-  },
-  {
-    "__type__": "cc.CompPrefabInfo",
-    "fileId": "e8L4bQa+dA0Y7nQSkJLed7"
-  },
-  {
-    "__type__": "cc.Label",
-    "_name": "",
-    "_objFlags": 0,
-    "__editorExtras__": {},
-    "node": {
-      "__id__": 150
-    },
-    "_enabled": true,
-    "__prefab": {
-      "__id__": 154
-    },
-    "_customMaterial": null,
-    "_srcBlendFactor": 2,
-    "_dstBlendFactor": 4,
-    "_color": {
-      "__type__": "cc.Color",
-      "r": 0,
-      "g": 0,
-      "b": 0,
-      "a": 255
-    },
-    "_string": "ScrollView content",
-    "_horizontalAlign": 0,
-    "_verticalAlign": 0,
-    "_actualFontSize": 16,
-    "_fontSize": 16,
-    "_fontFamily": "Arial",
-    "_lineHeight": 20,
-    "_overflow": 0,
-    "_enableWrapText": true,
-    "_font": null,
-    "_isSystemFontUsed": true,
-    "_spacingX": 0,
-    "_isItalic": false,
-    "_isBold": false,
-    "_isUnderline": false,
-    "_underlineHeight": 2,
-    "_cacheMode": 0,
-    "_enableOutline": false,
-    "_outlineColor": {
-      "__type__": "cc.Color",
-      "r": 0,
-      "g": 0,
-      "b": 0,
-      "a": 255
-    },
-    "_outlineWidth": 2,
-    "_enableShadow": false,
-    "_shadowColor": {
-      "__type__": "cc.Color",
-      "r": 0,
-      "g": 0,
-      "b": 0,
-      "a": 255
-    },
-    "_shadowOffset": {
-      "__type__": "cc.Vec2",
-      "x": 2,
-      "y": 2
-    },
-    "_shadowBlur": 2,
-    "_id": ""
-  },
-  {
-    "__type__": "cc.CompPrefabInfo",
-    "fileId": "e026+Wo5JFQZMJ5pH6AJE2"
-  },
-  {
-    "__type__": "cc.PrefabInfo",
-    "root": {
-      "__id__": 1
-    },
-    "asset": {
-      "__id__": 0
-    },
-    "fileId": "0fFFBCJlxDSLz2vcog1LZR",
-    "instance": null,
-    "targetOverrides": null,
-    "nestedPrefabInstanceRoots": null
-  },
   {
     "__type__": "cc.UITransform",
     "_name": "",
@@ -3741,12 +3581,12 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 157
+      "__id__": 151
     },
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 400
+      "height": 40
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -3769,7 +3609,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 159
+      "__id__": 153
     },
     "_alignFlags": 40,
     "_target": null,
@@ -3795,6 +3635,44 @@
     "__type__": "cc.CompPrefabInfo",
     "fileId": "ceR0Wdui9GEKoNJd6UsmGW"
   },
+  {
+    "__type__": "cc.Layout",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 139
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 155
+    },
+    "_resizeMode": 1,
+    "_layoutType": 3,
+    "_cellSize": {
+      "__type__": "cc.Size",
+      "width": 40,
+      "height": 40
+    },
+    "_startAxis": 0,
+    "_paddingLeft": 0,
+    "_paddingRight": 0,
+    "_paddingTop": 20,
+    "_paddingBottom": 20,
+    "_spacingX": 0,
+    "_spacingY": 20,
+    "_verticalDirection": 1,
+    "_horizontalDirection": 0,
+    "_constraint": 2,
+    "_constraintNum": 2,
+    "_affectedByScale": false,
+    "_isAlign": false,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "11bl8IDsFLh4KSKXXXDTnO"
+  },
   {
     "__type__": "cc.PrefabInfo",
     "root": {
@@ -3831,7 +3709,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 163
+      "__id__": 159
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -3859,7 +3737,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 165
+      "__id__": 161
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -3871,10 +3749,7 @@
       "b": 255,
       "a": 255
     },
-    "_spriteFrame": {
-      "__uuid__": "b730527c-3233-41c2-aaf7-7cdab58f9749@f9941",
-      "__expectedType__": "cc.SpriteFrame"
-    },
+    "_spriteFrame": null,
     "_type": 1,
     "_fillType": 0,
     "_sizeMode": 0,
@@ -3904,7 +3779,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 167
+      "__id__": 163
     },
     "_alignFlags": 45,
     "_target": null,
@@ -3953,7 +3828,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 170
+      "__id__": 166
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -3981,7 +3856,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 172
+      "__id__": 168
     },
     "_alignFlags": 45,
     "_target": null,
@@ -4017,7 +3892,7 @@
     },
     "_enabled": false,
     "__prefab": {
-      "__id__": 174
+      "__id__": 170
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -4062,7 +3937,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 176
+      "__id__": 172
     },
     "btn_num_left": {
       "__id__": 79
@@ -4087,6 +3962,16 @@
       "__uuid__": "a16b13f2-f4e2-4e40-90dc-13b7f4e4fcc6@f9941",
       "__expectedType__": "cc.SpriteFrame"
     },
+    "list": {
+      "__id__": 121
+    },
+    "list_content": {
+      "__id__": 139
+    },
+    "list_item": {
+      "__uuid__": "b85c48d6-b97b-4356-a409-607c29ea4b52",
+      "__expectedType__": "cc.Prefab"
+    },
     "_id": ""
   },
   {
@@ -4116,7 +4001,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 179
+      "__id__": 175
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -4144,7 +4029,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 181
+      "__id__": 177
     },
     "_alignFlags": 45,
     "_target": null,
@@ -4180,7 +4065,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 183
+      "__id__": 179
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -4225,7 +4110,7 @@
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 185
+      "__id__": 181
     },
     "btn_back": {
       "__id__": 3
@@ -4233,6 +4118,9 @@
     "top_node": {
       "__id__": 18
     },
+    "bottom_node": {
+      "__id__": 76
+    },
     "_id": ""
   },
   {

+ 1297 - 0
assets/resources/ui/car_lib_list_item.prefab

@@ -0,0 +1,1297 @@
+[
+  {
+    "__type__": "cc.Prefab",
+    "_name": "car_lib_list_item",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "_native": "",
+    "data": {
+      "__id__": 1
+    },
+    "optimizationPolicy": 0,
+    "persistent": false
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "car_lib_list_item",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "_parent": null,
+    "_children": [
+      {
+        "__id__": 2
+      },
+      {
+        "__id__": 8
+      },
+      {
+        "__id__": 14
+      },
+      {
+        "__id__": 20
+      }
+    ],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 46
+      },
+      {
+        "__id__": 48
+      },
+      {
+        "__id__": 50
+      }
+    ],
+    "_prefab": {
+      "__id__": 52
+    },
+    "_lpos": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "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.Node",
+    "_name": "img_car",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 3
+      },
+      {
+        "__id__": 5
+      }
+    ],
+    "_prefab": {
+      "__id__": 7
+    },
+    "_lpos": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 44,
+      "z": 0
+    },
+    "_lrot": {
+      "__type__": "cc.Quat",
+      "x": 0,
+      "y": 0,
+      "z": 0,
+      "w": 1
+    },
+    "_lscale": {
+      "__type__": "cc.Vec3",
+      "x": 0.36,
+      "y": 0.36,
+      "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__": 2
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 4
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 634,
+      "height": 632
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "a42gWR+2BBY7CrljLHbkfe"
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 2
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 6
+    },
+    "_customMaterial": null,
+    "_srcBlendFactor": 2,
+    "_dstBlendFactor": 4,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_spriteFrame": {
+      "__uuid__": "5eb1145a-7c33-447f-bc30-83fe23f76e80@f9941",
+      "__expectedType__": "cc.SpriteFrame"
+    },
+    "_type": 0,
+    "_fillType": 0,
+    "_sizeMode": 1,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_useGrayscale": false,
+    "_atlas": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "d8xSQO1NZCh7xuTelExEHI"
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "08nVjUIJJIZKXSDLvnjGDU",
+    "instance": null,
+    "targetOverrides": null,
+    "nestedPrefabInstanceRoots": null
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "lab_car_name",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 9
+      },
+      {
+        "__id__": 11
+      }
+    ],
+    "_prefab": {
+      "__id__": 13
+    },
+    "_lpos": {
+      "__type__": "cc.Vec3",
+      "x": -79.75,
+      "y": -110,
+      "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__": 8
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 10
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 260,
+      "height": 50.4
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "5fsbOXCw1ExKUMu3IPLJ8f"
+  },
+  {
+    "__type__": "cc.Label",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 8
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 12
+    },
+    "_customMaterial": null,
+    "_srcBlendFactor": 2,
+    "_dstBlendFactor": 4,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 57,
+      "g": 55,
+      "b": 55,
+      "a": 255
+    },
+    "_string": "迈凯伦",
+    "_horizontalAlign": 0,
+    "_verticalAlign": 1,
+    "_actualFontSize": 37,
+    "_fontSize": 36,
+    "_fontFamily": "Arial",
+    "_lineHeight": 40,
+    "_overflow": 2,
+    "_enableWrapText": true,
+    "_font": null,
+    "_isSystemFontUsed": true,
+    "_spacingX": 0,
+    "_isItalic": false,
+    "_isBold": false,
+    "_isUnderline": false,
+    "_underlineHeight": 2,
+    "_cacheMode": 0,
+    "_enableOutline": false,
+    "_outlineColor": {
+      "__type__": "cc.Color",
+      "r": 0,
+      "g": 0,
+      "b": 0,
+      "a": 255
+    },
+    "_outlineWidth": 2,
+    "_enableShadow": false,
+    "_shadowColor": {
+      "__type__": "cc.Color",
+      "r": 0,
+      "g": 0,
+      "b": 0,
+      "a": 255
+    },
+    "_shadowOffset": {
+      "__type__": "cc.Vec2",
+      "x": 2,
+      "y": 2
+    },
+    "_shadowBlur": 2,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "86VU3b+zpNJ4TIno6EE43X"
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "88QOdNj/JI2L3Y2bWUcDrI",
+    "instance": null,
+    "targetOverrides": null,
+    "nestedPrefabInstanceRoots": null
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "lab_car_score",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 15
+      },
+      {
+        "__id__": 17
+      }
+    ],
+    "_prefab": {
+      "__id__": 19
+    },
+    "_lpos": {
+      "__type__": "cc.Vec3",
+      "x": 136.5,
+      "y": -110,
+      "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__": 14
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 16
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 160,
+      "height": 50.4
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "bfuiQemMlOQrjtckvvDgqd"
+  },
+  {
+    "__type__": "cc.Label",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 14
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 18
+    },
+    "_customMaterial": null,
+    "_srcBlendFactor": 2,
+    "_dstBlendFactor": 4,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 36,
+      "g": 94,
+      "b": 152,
+      "a": 255
+    },
+    "_string": "99999分",
+    "_horizontalAlign": 2,
+    "_verticalAlign": 1,
+    "_actualFontSize": 37,
+    "_fontSize": 36,
+    "_fontFamily": "Arial",
+    "_lineHeight": 40,
+    "_overflow": 2,
+    "_enableWrapText": true,
+    "_font": null,
+    "_isSystemFontUsed": true,
+    "_spacingX": 0,
+    "_isItalic": false,
+    "_isBold": false,
+    "_isUnderline": false,
+    "_underlineHeight": 2,
+    "_cacheMode": 0,
+    "_enableOutline": false,
+    "_outlineColor": {
+      "__type__": "cc.Color",
+      "r": 0,
+      "g": 0,
+      "b": 0,
+      "a": 255
+    },
+    "_outlineWidth": 2,
+    "_enableShadow": false,
+    "_shadowColor": {
+      "__type__": "cc.Color",
+      "r": 0,
+      "g": 0,
+      "b": 0,
+      "a": 255
+    },
+    "_shadowOffset": {
+      "__type__": "cc.Vec2",
+      "x": 2,
+      "y": 2
+    },
+    "_shadowBlur": 2,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "3ddFpuOpVE04yjKLyo2syI"
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "079hta7sZANL5Tc3pCADjt",
+    "instance": null,
+    "targetOverrides": null,
+    "nestedPrefabInstanceRoots": null
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "suo_node",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "_parent": {
+      "__id__": 1
+    },
+    "_children": [
+      {
+        "__id__": 21
+      },
+      {
+        "__id__": 27
+      },
+      {
+        "__id__": 33
+      }
+    ],
+    "_active": false,
+    "_components": [
+      {
+        "__id__": 39
+      },
+      {
+        "__id__": 41
+      },
+      {
+        "__id__": 43
+      }
+    ],
+    "_prefab": {
+      "__id__": 45
+    },
+    "_lpos": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 0,
+      "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.Node",
+    "_name": "img_suo",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "_parent": {
+      "__id__": 20
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 22
+      },
+      {
+        "__id__": 24
+      }
+    ],
+    "_prefab": {
+      "__id__": 26
+    },
+    "_lpos": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": 72,
+      "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__": 21
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 23
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 100,
+      "height": 124
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "c5htuPtBFDbIC1XQYNmVjh"
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 21
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 25
+    },
+    "_customMaterial": null,
+    "_srcBlendFactor": 2,
+    "_dstBlendFactor": 4,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_spriteFrame": {
+      "__uuid__": "463c3fdd-c4a3-4aa7-83e4-fe0aac99ea42@f9941",
+      "__expectedType__": "cc.SpriteFrame"
+    },
+    "_type": 0,
+    "_fillType": 0,
+    "_sizeMode": 1,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_useGrayscale": false,
+    "_atlas": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "07Pm7FiC1G6JYWOZb6n61f"
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "a1JrecyKdMb5t33hDTK2Ov",
+    "instance": null,
+    "targetOverrides": null,
+    "nestedPrefabInstanceRoots": null
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "lab_suo_score",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "_parent": {
+      "__id__": 20
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 28
+      },
+      {
+        "__id__": 30
+      }
+    ],
+    "_prefab": {
+      "__id__": 32
+    },
+    "_lpos": {
+      "__type__": "cc.Vec3",
+      "x": 0,
+      "y": -33,
+      "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__": 27
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 29
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 400,
+      "height": 50.4
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "58U2bNG0FCJ7ZKklZmnf+b"
+  },
+  {
+    "__type__": "cc.Label",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 27
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 31
+    },
+    "_customMaterial": null,
+    "_srcBlendFactor": 2,
+    "_dstBlendFactor": 4,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 215,
+      "g": 244,
+      "b": 255,
+      "a": 255
+    },
+    "_string": "",
+    "_horizontalAlign": 1,
+    "_verticalAlign": 1,
+    "_actualFontSize": 45,
+    "_fontSize": 45,
+    "_fontFamily": "Arial",
+    "_lineHeight": 50,
+    "_overflow": 2,
+    "_enableWrapText": true,
+    "_font": null,
+    "_isSystemFontUsed": true,
+    "_spacingX": 0,
+    "_isItalic": false,
+    "_isBold": false,
+    "_isUnderline": false,
+    "_underlineHeight": 2,
+    "_cacheMode": 0,
+    "_enableOutline": false,
+    "_outlineColor": {
+      "__type__": "cc.Color",
+      "r": 0,
+      "g": 0,
+      "b": 0,
+      "a": 255
+    },
+    "_outlineWidth": 2,
+    "_enableShadow": false,
+    "_shadowColor": {
+      "__type__": "cc.Color",
+      "r": 0,
+      "g": 0,
+      "b": 0,
+      "a": 255
+    },
+    "_shadowOffset": {
+      "__type__": "cc.Vec2",
+      "x": 2,
+      "y": 2
+    },
+    "_shadowBlur": 2,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "e19kHgX95KgLP/cURxxhBP"
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "6azeC9S2RAhL/55QevvpUQ",
+    "instance": null,
+    "targetOverrides": null,
+    "nestedPrefabInstanceRoots": null
+  },
+  {
+    "__type__": "cc.Node",
+    "_name": "lab_jiesuo",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "_parent": {
+      "__id__": 20
+    },
+    "_children": [],
+    "_active": true,
+    "_components": [
+      {
+        "__id__": 34
+      },
+      {
+        "__id__": 36
+      }
+    ],
+    "_prefab": {
+      "__id__": 38
+    },
+    "_lpos": {
+      "__type__": "cc.Vec3",
+      "x": -2.25,
+      "y": -96,
+      "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__": 33
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 35
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 80,
+      "height": 63
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "80lRBpJBlFwLisSuqJuKXK"
+  },
+  {
+    "__type__": "cc.Label",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 33
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 37
+    },
+    "_customMaterial": null,
+    "_srcBlendFactor": 2,
+    "_dstBlendFactor": 4,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 215,
+      "g": 244,
+      "b": 255,
+      "a": 255
+    },
+    "_string": "解锁",
+    "_horizontalAlign": 1,
+    "_verticalAlign": 1,
+    "_actualFontSize": 40,
+    "_fontSize": 40,
+    "_fontFamily": "Arial",
+    "_lineHeight": 50,
+    "_overflow": 0,
+    "_enableWrapText": true,
+    "_font": null,
+    "_isSystemFontUsed": true,
+    "_spacingX": 0,
+    "_isItalic": false,
+    "_isBold": false,
+    "_isUnderline": false,
+    "_underlineHeight": 2,
+    "_cacheMode": 0,
+    "_enableOutline": false,
+    "_outlineColor": {
+      "__type__": "cc.Color",
+      "r": 0,
+      "g": 0,
+      "b": 0,
+      "a": 255
+    },
+    "_outlineWidth": 2,
+    "_enableShadow": false,
+    "_shadowColor": {
+      "__type__": "cc.Color",
+      "r": 0,
+      "g": 0,
+      "b": 0,
+      "a": 255
+    },
+    "_shadowOffset": {
+      "__type__": "cc.Vec2",
+      "x": 2,
+      "y": 2
+    },
+    "_shadowBlur": 2,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "cemHtWchxOxbcMxIlObCAf"
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "72Rbg3+9hIAYEZmZf3y2ML",
+    "instance": null,
+    "targetOverrides": null,
+    "nestedPrefabInstanceRoots": null
+  },
+  {
+    "__type__": "cc.UITransform",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 20
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 40
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 530,
+      "height": 369
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "b2U7hT5+9GdbBKbN46mRz2"
+  },
+  {
+    "__type__": "cc.Widget",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 20
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 42
+    },
+    "_alignFlags": 45,
+    "_target": null,
+    "_left": 0,
+    "_right": 0,
+    "_top": 0,
+    "_bottom": 0,
+    "_horizontalCenter": 0,
+    "_verticalCenter": 0,
+    "_isAbsLeft": true,
+    "_isAbsRight": true,
+    "_isAbsTop": true,
+    "_isAbsBottom": true,
+    "_isAbsHorizontalCenter": true,
+    "_isAbsVerticalCenter": true,
+    "_originalWidth": 100,
+    "_originalHeight": 100,
+    "_alignMode": 2,
+    "_lockFlags": 0,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "e0GgqD8QdFQ4Qcu01Ti+qK"
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 20
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 44
+    },
+    "_customMaterial": null,
+    "_srcBlendFactor": 2,
+    "_dstBlendFactor": 4,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_spriteFrame": {
+      "__uuid__": "8d5629f0-fbad-46c1-8c7d-7d398f5d1b72@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": "669dRgaSJIu7uS64BceU0T"
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "a2oSdti4JH2YLcH9CoTFta",
+    "instance": null,
+    "targetOverrides": null,
+    "nestedPrefabInstanceRoots": null
+  },
+  {
+    "__type__": "cc.UITransform",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 47
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 530,
+      "height": 369
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "5bPkxgNzRPL6Lh0HUHUXBx"
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 49
+    },
+    "_customMaterial": null,
+    "_srcBlendFactor": 2,
+    "_dstBlendFactor": 4,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_spriteFrame": {
+      "__uuid__": "42277d08-9827-4ee8-a2d2-9bac6fd1657d@f9941",
+      "__expectedType__": "cc.SpriteFrame"
+    },
+    "_type": 0,
+    "_fillType": 0,
+    "_sizeMode": 1,
+    "_fillCenter": {
+      "__type__": "cc.Vec2",
+      "x": 0,
+      "y": 0
+    },
+    "_fillStart": 0,
+    "_fillRange": 0,
+    "_isTrimmedMode": true,
+    "_useGrayscale": false,
+    "_atlas": null,
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "bfh8sfQElLX50poU03cmPp"
+  },
+  {
+    "__type__": "9e6fdCyGM5BLLUbeGEGi/0L",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 1
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 51
+    },
+    "sf_bg_select": {
+      "__uuid__": "3a64131b-63dc-4fd3-88ec-2bd86ca51cf8@f9941",
+      "__expectedType__": "cc.SpriteFrame"
+    },
+    "sf_bg_unselect": {
+      "__uuid__": "42277d08-9827-4ee8-a2d2-9bac6fd1657d@f9941",
+      "__expectedType__": "cc.SpriteFrame"
+    },
+    "img_car": {
+      "__id__": 2
+    },
+    "lab_car_name": {
+      "__id__": 8
+    },
+    "lab_car_score": {
+      "__id__": 14
+    },
+    "suo_node": {
+      "__id__": 20
+    },
+    "lab_suo_score": {
+      "__id__": 27
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "9ecm7TOQVKnpo2BBUBYCpL"
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "c46/YsCPVOJYA4mWEpNYRx",
+    "instance": null,
+    "targetOverrides": null
+  }
+]

+ 13 - 0
assets/resources/ui/car_lib_list_item.prefab.meta

@@ -0,0 +1,13 @@
+{
+  "ver": "1.1.50",
+  "importer": "prefab",
+  "imported": true,
+  "uuid": "b85c48d6-b97b-4356-a409-607c29ea4b52",
+  "files": [
+    ".json"
+  ],
+  "subMetas": {},
+  "userData": {
+    "syncNodeName": "car_lib_list_item"
+  }
+}

+ 8 - 1
assets/script/GameManager.ts

@@ -1,7 +1,9 @@
-import { _decorator, Component, Node, sys } from 'cc';
+import { _decorator, Component, Node, SpriteFrame, sys } from 'cc';
 import { config } from './config';
 import { settingData } from './data';
 import { http } from './http';
+import { imageCacheManager } from './manager/imageCacheManager';
+import { userDataManager } from './manager/userDataManager';
 const { ccclass, property } = _decorator;
 
 @ccclass('GameManager')
@@ -9,6 +11,11 @@ export class GameManager extends Component {
     public static openId:string = 'asd'
 
 
+    public static getUserDefaultCarSf():SpriteFrame {
+        let sf = imageCacheManager.getHomeCarImageById(userDataManager.user_car_list.default_car_id)
+        return sf
+    }
+
     public static getSettingData():settingData {
         let str = sys.localStorage.getItem(config.SETTING_DATA)
         let data = new settingData

+ 10 - 0
assets/script/ui/car_lib/car_lib.ts

@@ -1,12 +1,16 @@
 import { _decorator, Component, Label, Node, Sprite } from 'cc';
 import { base_ui } from '../../fw/base_ui';
 import { car_lib_top } from './car_lib_top';
+import { car_lib_bottom } from './car_lib_bottom';
+import { car_lib_list_item } from './car_lib_list_item';
+import { userDataManager } from '../../manager/userDataManager';
 const { ccclass, property } = _decorator;
 
 @ccclass('car_lib')
 export class car_lib extends base_ui {
     @property(Node) btn_back:Node = null
     @property(Node) top_node:Node = null
+    @property(Node) bottom_node:Node = null
     
     start() {
         this.onButtonListen(this.btn_back, ()=>{
@@ -18,6 +22,12 @@ export class car_lib extends base_ui {
 
     initData() {
         this.top_node.getComponent(car_lib_top).init()
+        this.bottom_node.getComponent(car_lib_bottom).init(this.onClickListItem.bind(this))
+    }
+
+    private onClickListItem(item:car_lib_list_item) {
+        userDataManager.user_car_list.default_car_id = item.getData().id
+        this.top_node.getComponent(car_lib_top).reloadUserCar()
     }
 }
 

+ 65 - 9
assets/script/ui/car_lib/car_lib_bottom.ts

@@ -1,5 +1,8 @@
-import { _decorator, Component, Label, Node, Sprite, SpriteFrame } from 'cc';
+import { _decorator, Component, instantiate, Label, Layout, Node, Prefab, Sprite, SpriteFrame, UITransform } from 'cc';
 import { base_ui } from '../../fw/base_ui';
+import { tools } from '../../tools';
+import { car_lib_list_item } from './car_lib_list_item';
+import { userDataManager } from '../../manager/userDataManager';
 const { ccclass, property } = _decorator;
 
 @ccclass('car_lib_bottom')
@@ -11,24 +14,30 @@ export class car_lib_bottom extends base_ui {
     @property(Node) btn_jiesuo:Node = null
     @property(SpriteFrame) sf_yijiesuo:SpriteFrame = null
     @property(SpriteFrame) sf_weijiesuo:SpriteFrame = null
+    @property(Node) list:Node = null
+    @property(Node) list_content:Node = null
+    @property(Prefab) list_item:Prefab = null
 
     private is_jiesuo:boolean = false
-    private m_num_current_count:number = 1
-    private m_num_total_count:number = 10
+    private num_current_count:number = 1
+    private num_total_count:number = 1
+    private current_select_list_item:car_lib_list_item = null
+
+    private m_click_item_cb = null
 
     start() {
         this.onButtonListen(this.btn_num_left, ()=>{
-            if(this.m_num_current_count==1) { 
+            if(this.num_current_count==1) { 
                 return 
             }
-            this.m_num_current_count -=1
+            this.num_current_count -=1
             this.updateNumStatus()
         })
         this.onButtonListen(this.btn_num_right, ()=>{
-            if(this.m_num_current_count>=this.m_num_total_count) {
+            if(this.num_current_count>=this.num_total_count) {
                 return
             }
-            this.m_num_current_count +=1
+            this.num_current_count +=1
             this.updateNumStatus()
         })
         this.onButtonListen(this.btn_score_sort, ()=>{
@@ -37,10 +46,26 @@ export class car_lib_bottom extends base_ui {
         this.onButtonListen(this.btn_jiesuo, ()=>{
             this.is_jiesuo = !this.is_jiesuo
             this.updateJiesuoStatus()
-        })
+        })        
+    }
+
+    public init(click_item_cb) {
+        this.m_click_item_cb = click_item_cb
+        this.num_current_count = 1
+        this.num_total_count = 1
 
         this.updateJiesuoStatus()
         this.updateNumStatus()
+        this.initListContentData()
+
+        let list_content_size = this.list_content.getComponent(UITransform).contentSize
+        let item_contenteSize = instantiate(this.list_item).getComponent(UITransform).contentSize
+        let horizontal_padding = (list_content_size.width - item_contenteSize.width * 2) / 3
+        if(horizontal_padding > 0) {
+            this.list_content.getComponent(Layout).paddingLeft = horizontal_padding
+            this.list_content.getComponent(Layout).paddingRight = horizontal_padding
+            this.list_content.getComponent(Layout).spacingX = horizontal_padding
+        }
     }
 
     updateJiesuoStatus() {
@@ -52,7 +77,38 @@ export class car_lib_bottom extends base_ui {
     }
 
     updateNumStatus() {
-        this.lab_num.getComponent(Label).string = this.m_num_current_count + '/' + this.m_num_total_count
+        this.lab_num.getComponent(Label).string = this.num_current_count + '/' + this.num_total_count
+    }
+
+    initListContentData() {
+        this.list_content.removeAllChildren()
+        for (let index = 0; index < tools.all_car_list.length; index++) {
+            const element = tools.all_car_list[index];
+            let item = instantiate(this.list_item)
+            item.parent = this.list_content
+            let item_component = item.getComponent(car_lib_list_item)
+            item_component.initView(element, index, this.onClickListItem.bind(this))
+            if(userDataManager.user_car_list.default_car_id == element.id) {
+                this.current_select_list_item = item_component
+                item_component.setSelectedStatus()
+            } else {
+                item_component.setUnselectedStatus()
+            }
+        }
+    }
+
+    onClickListItem(item:car_lib_list_item) {
+        if(this.current_select_list_item.getData().id == item.getData().id) {
+            return
+        }
+
+        this.current_select_list_item.setUnselectedStatus()
+        item.setSelectedStatus()
+        this.current_select_list_item = item
+
+        if(this.m_click_item_cb!=null) {
+            this.m_click_item_cb(item)
+        }
     }
 
 }

+ 61 - 0
assets/script/ui/car_lib/car_lib_list_item.ts

@@ -0,0 +1,61 @@
+import { _decorator, Component, Label, Node, Sprite, SpriteFrame } from 'cc';
+import { car_item_data } from '../../data';
+import { uiManager } from '../../manager/uiManager';
+import { userDataManager } from '../../manager/userDataManager';
+import { imageCacheManager } from '../../manager/imageCacheManager';
+const { ccclass, property } = _decorator;
+
+@ccclass('car_lib_list_item')
+export class car_lib_list_item extends Component {
+    @property(SpriteFrame) sf_bg_select:SpriteFrame = null
+    @property(SpriteFrame) sf_bg_unselect:SpriteFrame = null
+    @property(Node) img_car:Node = null
+    @property(Node) lab_car_name:Node = null
+    @property(Node) lab_car_score:Node = null
+    @property(Node) suo_node:Node = null
+    @property(Node) lab_suo_score:Node = null
+    private m_data:car_item_data = null
+    private m_index:number = 0
+    private m_cb = null
+    private is_jiesuo:boolean = false
+    start() {
+        uiManager.Instance().onButtonListen(this.node, ()=>{
+            if(this.m_cb!=null) {
+                this.m_cb(this)
+            }
+        })
+    }
+
+    initView(data:car_item_data, index, cb) {
+        this.m_data = data
+        this.m_index = index
+        this.m_cb = cb
+        this.img_car.getComponent(Sprite).spriteFrame = imageCacheManager.getHomeCarImageById(data.id)
+        this.lab_car_name.getComponent(Label).string = data.name
+        this.lab_car_score.getComponent(Label).string = data.unlock_points + '分'
+        this.is_jiesuo = userDataManager.user_car_list.car_list.some(obj => obj === data.id)
+        this.suo_node.active = !this.is_jiesuo
+        this.lab_suo_score.getComponent(Label).string = data.unlock_points + '分'
+    }
+
+    public getData():car_item_data{
+        return this.m_data
+    }
+
+    public getIsJiesuo():boolean {
+        return this.is_jiesuo
+    }
+
+    public getIndex():number {
+        return this.m_index
+    }
+
+    public setSelectedStatus() {
+        this.node.getComponent(Sprite).spriteFrame = this.sf_bg_select
+    }
+
+    public setUnselectedStatus() {
+        this.node.getComponent(Sprite).spriteFrame = this.sf_bg_unselect
+    }
+}
+

+ 9 - 0
assets/script/ui/car_lib/car_lib_list_item.ts.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "4.0.23",
+  "importer": "typescript",
+  "imported": true,
+  "uuid": "9e6fd0b2-18ce-412c-b51b-7861068bfd0b",
+  "files": [],
+  "subMetas": {},
+  "userData": {}
+}

+ 7 - 0
assets/script/ui/car_lib/car_lib_top.ts

@@ -1,6 +1,7 @@
 import { _decorator, Component, Label, Node, Sprite } from 'cc';
 import { userDataManager } from '../../manager/userDataManager';
 import { tools } from '../../tools';
+import { GameManager } from '../../GameManager';
 const { ccclass, property } = _decorator;
 
 @ccclass('car_lib_top')
@@ -8,6 +9,7 @@ export class car_lib_top extends Component {
     @property(Node) img_avatar:Node = null
     @property(Node) lab_nickname:Node = null
     @property(Node) lab_car_pai:Node = null
+    @property(Node) img_car:Node = null
 
     init() {
         let user_data = userDataManager.user_data
@@ -16,6 +18,11 @@ export class car_lib_top extends Component {
         })
         this.lab_nickname.getComponent(Label).string = user_data.nickName
         this.lab_car_pai.getComponent(Label).string = user_data.license_code
+        this.reloadUserCar()
+    }
+
+    reloadUserCar() {
+        this.img_car.getComponent(Sprite).spriteFrame = GameManager.getUserDefaultCarSf()
     }
 }
 

+ 2 - 4
assets/script/ui/home/home_car.ts

@@ -1,14 +1,12 @@
 import { _decorator, Component, Node, Sprite } from 'cc';
-import { imageCacheManager } from '../../manager/imageCacheManager';
-import { userData } from '../../data';
-import { userDataManager } from '../../manager/userDataManager';
+import { GameManager } from '../../GameManager';
 const { ccclass, property } = _decorator;
 
 @ccclass('home_car')
 export class home_car extends Component {
     @property(Node) spr_car:Node = null
     updateCar(){
-        this.spr_car.getComponent(Sprite).spriteFrame = imageCacheManager.getHomeCarImageById(userDataManager.user_car_list.default_car_id)
+        this.spr_car.getComponent(Sprite).spriteFrame = GameManager.getUserDefaultCarSf()
     }
 }
 

BIN
assets/texture/ui/car_lib/car_lib_bg_suo.png


+ 134 - 0
assets/texture/ui/car_lib/car_lib_bg_suo.png.meta

@@ -0,0 +1,134 @@
+{
+  "ver": "1.0.26",
+  "importer": "image",
+  "imported": true,
+  "uuid": "8d5629f0-fbad-46c1-8c7d-7d398f5d1b72",
+  "files": [
+    ".json",
+    ".png"
+  ],
+  "subMetas": {
+    "6c48a": {
+      "importer": "texture",
+      "uuid": "8d5629f0-fbad-46c1-8c7d-7d398f5d1b72@6c48a",
+      "displayName": "car_lib_bg_suo",
+      "id": "6c48a",
+      "name": "texture",
+      "userData": {
+        "wrapModeS": "clamp-to-edge",
+        "wrapModeT": "clamp-to-edge",
+        "imageUuidOrDatabaseUri": "8d5629f0-fbad-46c1-8c7d-7d398f5d1b72",
+        "isUuid": true,
+        "visible": false,
+        "minfilter": "linear",
+        "magfilter": "linear",
+        "mipfilter": "none",
+        "anisotropy": 0
+      },
+      "ver": "1.0.22",
+      "imported": true,
+      "files": [
+        ".json"
+      ],
+      "subMetas": {}
+    },
+    "f9941": {
+      "importer": "sprite-frame",
+      "uuid": "8d5629f0-fbad-46c1-8c7d-7d398f5d1b72@f9941",
+      "displayName": "car_lib_bg_suo",
+      "id": "f9941",
+      "name": "spriteFrame",
+      "userData": {
+        "trimType": "auto",
+        "trimThreshold": 1,
+        "rotated": false,
+        "offsetX": 0,
+        "offsetY": 0,
+        "trimX": 0,
+        "trimY": 0,
+        "width": 502,
+        "height": 314,
+        "rawWidth": 502,
+        "rawHeight": 314,
+        "borderTop": 0,
+        "borderBottom": 0,
+        "borderLeft": 0,
+        "borderRight": 0,
+        "packable": true,
+        "pixelsToUnit": 100,
+        "pivotX": 0.5,
+        "pivotY": 0.5,
+        "meshType": 0,
+        "vertices": {
+          "rawPosition": [
+            -251,
+            -157,
+            0,
+            251,
+            -157,
+            0,
+            -251,
+            157,
+            0,
+            251,
+            157,
+            0
+          ],
+          "indexes": [
+            0,
+            1,
+            2,
+            2,
+            1,
+            3
+          ],
+          "uv": [
+            0,
+            314,
+            502,
+            314,
+            0,
+            0,
+            502,
+            0
+          ],
+          "nuv": [
+            0,
+            0,
+            1,
+            0,
+            0,
+            1,
+            1,
+            1
+          ],
+          "minPos": [
+            -251,
+            -157,
+            0
+          ],
+          "maxPos": [
+            251,
+            157,
+            0
+          ]
+        },
+        "isUuid": true,
+        "imageUuidOrDatabaseUri": "8d5629f0-fbad-46c1-8c7d-7d398f5d1b72@6c48a",
+        "atlasUuid": ""
+      },
+      "ver": "1.0.12",
+      "imported": true,
+      "files": [
+        ".json"
+      ],
+      "subMetas": {}
+    }
+  },
+  "userData": {
+    "type": "sprite-frame",
+    "hasAlpha": true,
+    "fixAlphaTransparencyArtifacts": false,
+    "redirect": "8d5629f0-fbad-46c1-8c7d-7d398f5d1b72@f9941"
+  }
+}

BIN
assets/texture/ui/car_lib/car_lib_list_bg_select.png


+ 134 - 0
assets/texture/ui/car_lib/car_lib_list_bg_select.png.meta

@@ -0,0 +1,134 @@
+{
+  "ver": "1.0.26",
+  "importer": "image",
+  "imported": true,
+  "uuid": "3a64131b-63dc-4fd3-88ec-2bd86ca51cf8",
+  "files": [
+    ".json",
+    ".png"
+  ],
+  "subMetas": {
+    "6c48a": {
+      "importer": "texture",
+      "uuid": "3a64131b-63dc-4fd3-88ec-2bd86ca51cf8@6c48a",
+      "displayName": "car_lib_list_bg_select",
+      "id": "6c48a",
+      "name": "texture",
+      "userData": {
+        "wrapModeS": "clamp-to-edge",
+        "wrapModeT": "clamp-to-edge",
+        "imageUuidOrDatabaseUri": "3a64131b-63dc-4fd3-88ec-2bd86ca51cf8",
+        "isUuid": true,
+        "visible": false,
+        "minfilter": "linear",
+        "magfilter": "linear",
+        "mipfilter": "none",
+        "anisotropy": 0
+      },
+      "ver": "1.0.22",
+      "imported": true,
+      "files": [
+        ".json"
+      ],
+      "subMetas": {}
+    },
+    "f9941": {
+      "importer": "sprite-frame",
+      "uuid": "3a64131b-63dc-4fd3-88ec-2bd86ca51cf8@f9941",
+      "displayName": "car_lib_list_bg_select",
+      "id": "f9941",
+      "name": "spriteFrame",
+      "userData": {
+        "trimType": "auto",
+        "trimThreshold": 1,
+        "rotated": false,
+        "offsetX": 0,
+        "offsetY": 0,
+        "trimX": 0,
+        "trimY": 0,
+        "width": 530,
+        "height": 369,
+        "rawWidth": 530,
+        "rawHeight": 369,
+        "borderTop": 0,
+        "borderBottom": 0,
+        "borderLeft": 0,
+        "borderRight": 0,
+        "packable": true,
+        "pixelsToUnit": 100,
+        "pivotX": 0.5,
+        "pivotY": 0.5,
+        "meshType": 0,
+        "vertices": {
+          "rawPosition": [
+            -265,
+            -184.5,
+            0,
+            265,
+            -184.5,
+            0,
+            -265,
+            184.5,
+            0,
+            265,
+            184.5,
+            0
+          ],
+          "indexes": [
+            0,
+            1,
+            2,
+            2,
+            1,
+            3
+          ],
+          "uv": [
+            0,
+            369,
+            530,
+            369,
+            0,
+            0,
+            530,
+            0
+          ],
+          "nuv": [
+            0,
+            0,
+            1,
+            0,
+            0,
+            1,
+            1,
+            1
+          ],
+          "minPos": [
+            -265,
+            -184.5,
+            0
+          ],
+          "maxPos": [
+            265,
+            184.5,
+            0
+          ]
+        },
+        "isUuid": true,
+        "imageUuidOrDatabaseUri": "3a64131b-63dc-4fd3-88ec-2bd86ca51cf8@6c48a",
+        "atlasUuid": ""
+      },
+      "ver": "1.0.12",
+      "imported": true,
+      "files": [
+        ".json"
+      ],
+      "subMetas": {}
+    }
+  },
+  "userData": {
+    "type": "sprite-frame",
+    "hasAlpha": true,
+    "fixAlphaTransparencyArtifacts": false,
+    "redirect": "3a64131b-63dc-4fd3-88ec-2bd86ca51cf8@f9941"
+  }
+}

BIN
assets/texture/ui/car_lib/car_lib_list_bg_unselect.png


+ 134 - 0
assets/texture/ui/car_lib/car_lib_list_bg_unselect.png.meta

@@ -0,0 +1,134 @@
+{
+  "ver": "1.0.26",
+  "importer": "image",
+  "imported": true,
+  "uuid": "42277d08-9827-4ee8-a2d2-9bac6fd1657d",
+  "files": [
+    ".json",
+    ".png"
+  ],
+  "subMetas": {
+    "6c48a": {
+      "importer": "texture",
+      "uuid": "42277d08-9827-4ee8-a2d2-9bac6fd1657d@6c48a",
+      "displayName": "car_lib_list_bg_unselect",
+      "id": "6c48a",
+      "name": "texture",
+      "userData": {
+        "wrapModeS": "clamp-to-edge",
+        "wrapModeT": "clamp-to-edge",
+        "imageUuidOrDatabaseUri": "42277d08-9827-4ee8-a2d2-9bac6fd1657d",
+        "isUuid": true,
+        "visible": false,
+        "minfilter": "linear",
+        "magfilter": "linear",
+        "mipfilter": "none",
+        "anisotropy": 0
+      },
+      "ver": "1.0.22",
+      "imported": true,
+      "files": [
+        ".json"
+      ],
+      "subMetas": {}
+    },
+    "f9941": {
+      "importer": "sprite-frame",
+      "uuid": "42277d08-9827-4ee8-a2d2-9bac6fd1657d@f9941",
+      "displayName": "car_lib_list_bg_unselect",
+      "id": "f9941",
+      "name": "spriteFrame",
+      "userData": {
+        "trimType": "custom",
+        "trimThreshold": 1,
+        "rotated": false,
+        "offsetX": 0,
+        "offsetY": 2.5,
+        "trimX": 0,
+        "trimY": 0,
+        "width": 530,
+        "height": 369,
+        "rawWidth": 530,
+        "rawHeight": 374,
+        "borderTop": 0,
+        "borderBottom": 0,
+        "borderLeft": 0,
+        "borderRight": 0,
+        "packable": true,
+        "pixelsToUnit": 100,
+        "pivotX": 0.5,
+        "pivotY": 0.5,
+        "meshType": 0,
+        "vertices": {
+          "rawPosition": [
+            -265,
+            -184.5,
+            0,
+            265,
+            -184.5,
+            0,
+            -265,
+            184.5,
+            0,
+            265,
+            184.5,
+            0
+          ],
+          "indexes": [
+            0,
+            1,
+            2,
+            2,
+            1,
+            3
+          ],
+          "uv": [
+            0,
+            374,
+            530,
+            374,
+            0,
+            5,
+            530,
+            5
+          ],
+          "nuv": [
+            0,
+            0.013368983957219251,
+            1,
+            0.013368983957219251,
+            0,
+            1,
+            1,
+            1
+          ],
+          "minPos": [
+            -265,
+            -184.5,
+            0
+          ],
+          "maxPos": [
+            265,
+            184.5,
+            0
+          ]
+        },
+        "isUuid": true,
+        "imageUuidOrDatabaseUri": "42277d08-9827-4ee8-a2d2-9bac6fd1657d@6c48a",
+        "atlasUuid": ""
+      },
+      "ver": "1.0.12",
+      "imported": true,
+      "files": [
+        ".json"
+      ],
+      "subMetas": {}
+    }
+  },
+  "userData": {
+    "type": "sprite-frame",
+    "hasAlpha": true,
+    "fixAlphaTransparencyArtifacts": false,
+    "redirect": "42277d08-9827-4ee8-a2d2-9bac6fd1657d@f9941"
+  }
+}

BIN
assets/texture/ui/car_lib/car_lib_suo.png


+ 134 - 0
assets/texture/ui/car_lib/car_lib_suo.png.meta

@@ -0,0 +1,134 @@
+{
+  "ver": "1.0.26",
+  "importer": "image",
+  "imported": true,
+  "uuid": "463c3fdd-c4a3-4aa7-83e4-fe0aac99ea42",
+  "files": [
+    ".json",
+    ".png"
+  ],
+  "subMetas": {
+    "6c48a": {
+      "importer": "texture",
+      "uuid": "463c3fdd-c4a3-4aa7-83e4-fe0aac99ea42@6c48a",
+      "displayName": "car_lib_suo",
+      "id": "6c48a",
+      "name": "texture",
+      "userData": {
+        "wrapModeS": "clamp-to-edge",
+        "wrapModeT": "clamp-to-edge",
+        "imageUuidOrDatabaseUri": "463c3fdd-c4a3-4aa7-83e4-fe0aac99ea42",
+        "isUuid": true,
+        "visible": false,
+        "minfilter": "linear",
+        "magfilter": "linear",
+        "mipfilter": "none",
+        "anisotropy": 0
+      },
+      "ver": "1.0.22",
+      "imported": true,
+      "files": [
+        ".json"
+      ],
+      "subMetas": {}
+    },
+    "f9941": {
+      "importer": "sprite-frame",
+      "uuid": "463c3fdd-c4a3-4aa7-83e4-fe0aac99ea42@f9941",
+      "displayName": "car_lib_suo",
+      "id": "f9941",
+      "name": "spriteFrame",
+      "userData": {
+        "trimType": "auto",
+        "trimThreshold": 1,
+        "rotated": false,
+        "offsetX": 0,
+        "offsetY": 0,
+        "trimX": 0,
+        "trimY": 0,
+        "width": 100,
+        "height": 124,
+        "rawWidth": 100,
+        "rawHeight": 124,
+        "borderTop": 0,
+        "borderBottom": 0,
+        "borderLeft": 0,
+        "borderRight": 0,
+        "packable": true,
+        "pixelsToUnit": 100,
+        "pivotX": 0.5,
+        "pivotY": 0.5,
+        "meshType": 0,
+        "vertices": {
+          "rawPosition": [
+            -50,
+            -62,
+            0,
+            50,
+            -62,
+            0,
+            -50,
+            62,
+            0,
+            50,
+            62,
+            0
+          ],
+          "indexes": [
+            0,
+            1,
+            2,
+            2,
+            1,
+            3
+          ],
+          "uv": [
+            0,
+            124,
+            100,
+            124,
+            0,
+            0,
+            100,
+            0
+          ],
+          "nuv": [
+            0,
+            0,
+            1,
+            0,
+            0,
+            1,
+            1,
+            1
+          ],
+          "minPos": [
+            -50,
+            -62,
+            0
+          ],
+          "maxPos": [
+            50,
+            62,
+            0
+          ]
+        },
+        "isUuid": true,
+        "imageUuidOrDatabaseUri": "463c3fdd-c4a3-4aa7-83e4-fe0aac99ea42@6c48a",
+        "atlasUuid": ""
+      },
+      "ver": "1.0.12",
+      "imported": true,
+      "files": [
+        ".json"
+      ],
+      "subMetas": {}
+    }
+  },
+  "userData": {
+    "type": "sprite-frame",
+    "hasAlpha": true,
+    "fixAlphaTransparencyArtifacts": false,
+    "redirect": "463c3fdd-c4a3-4aa7-83e4-fe0aac99ea42@f9941"
+  }
+}