future 1 год назад
Родитель
Сommit
f76cdabfb9

+ 105 - 106
assets/resources/ui/home.prefab

@@ -3325,6 +3325,9 @@
     "_children": [
       {
         "__id__": 140
+      },
+      {
+        "__id__": 146
       }
     ],
     "_active": true,
@@ -3379,27 +3382,23 @@
     "_parent": {
       "__id__": 139
     },
-    "_children": [
-      {
-        "__id__": 141
-      }
-    ],
+    "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 147
+        "__id__": 141
       },
       {
-        "__id__": 149
+        "__id__": 143
       }
     ],
     "_prefab": {
-      "__id__": 151
+      "__id__": 145
     },
     "_lpos": {
       "__type__": "cc.Vec3",
-      "x": 0,
-      "y": -45,
+      "x": -1,
+      "y": -27.5,
       "z": 0
     },
     "_lrot": {
@@ -3425,31 +3424,117 @@
     },
     "_id": ""
   },
+  {
+    "__type__": "cc.UITransform",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 140
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 142
+    },
+    "_contentSize": {
+      "__type__": "cc.Size",
+      "width": 903,
+      "height": 99
+    },
+    "_anchorPoint": {
+      "__type__": "cc.Vec2",
+      "x": 0.5,
+      "y": 0.5
+    },
+    "_id": ""
+  },
+  {
+    "__type__": "cc.CompPrefabInfo",
+    "fileId": "6eDvgkJwRH3pBufh8JvsUR"
+  },
+  {
+    "__type__": "cc.Sprite",
+    "_name": "",
+    "_objFlags": 0,
+    "__editorExtras__": {},
+    "node": {
+      "__id__": 140
+    },
+    "_enabled": true,
+    "__prefab": {
+      "__id__": 144
+    },
+    "_customMaterial": null,
+    "_srcBlendFactor": 2,
+    "_dstBlendFactor": 4,
+    "_color": {
+      "__type__": "cc.Color",
+      "r": 255,
+      "g": 255,
+      "b": 255,
+      "a": 255
+    },
+    "_spriteFrame": {
+      "__uuid__": "04062ca5-8e94-4619-896c-ea14dd4298d8@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": "b4CyNbWT9PcJKmC/hPjAEI"
+  },
+  {
+    "__type__": "cc.PrefabInfo",
+    "root": {
+      "__id__": 1
+    },
+    "asset": {
+      "__id__": 0
+    },
+    "fileId": "berv92Oi1IOpZBwOPzAuea",
+    "instance": null,
+    "targetOverrides": null,
+    "nestedPrefabInstanceRoots": null
+  },
   {
     "__type__": "cc.Node",
     "_name": "lab_content",
     "_objFlags": 0,
     "__editorExtras__": {},
     "_parent": {
-      "__id__": 140
+      "__id__": 139
     },
     "_children": [],
     "_active": true,
     "_components": [
       {
-        "__id__": 142
+        "__id__": 147
       },
       {
-        "__id__": 144
+        "__id__": 149
       }
     ],
     "_prefab": {
-      "__id__": 146
+      "__id__": 151
     },
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 540,
-      "y": 0,
+      "y": -27,
       "z": 0
     },
     "_lrot": {
@@ -3481,11 +3566,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 141
+      "__id__": 146
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 143
+      "__id__": 148
     },
     "_contentSize": {
       "__type__": "cc.Size",
@@ -3509,11 +3594,11 @@
     "_objFlags": 0,
     "__editorExtras__": {},
     "node": {
-      "__id__": 141
+      "__id__": 146
     },
     "_enabled": true,
     "__prefab": {
-      "__id__": 145
+      "__id__": 150
     },
     "_customMaterial": null,
     "_srcBlendFactor": 2,
@@ -3584,92 +3669,6 @@
     "targetOverrides": null,
     "nestedPrefabInstanceRoots": null
   },
-  {
-    "__type__": "cc.UITransform",
-    "_name": "",
-    "_objFlags": 0,
-    "__editorExtras__": {},
-    "node": {
-      "__id__": 140
-    },
-    "_enabled": true,
-    "__prefab": {
-      "__id__": 148
-    },
-    "_contentSize": {
-      "__type__": "cc.Size",
-      "width": 1079,
-      "height": 58
-    },
-    "_anchorPoint": {
-      "__type__": "cc.Vec2",
-      "x": 0.5,
-      "y": 0.5
-    },
-    "_id": ""
-  },
-  {
-    "__type__": "cc.CompPrefabInfo",
-    "fileId": "6eDvgkJwRH3pBufh8JvsUR"
-  },
-  {
-    "__type__": "cc.Sprite",
-    "_name": "",
-    "_objFlags": 0,
-    "__editorExtras__": {},
-    "node": {
-      "__id__": 140
-    },
-    "_enabled": true,
-    "__prefab": {
-      "__id__": 150
-    },
-    "_customMaterial": null,
-    "_srcBlendFactor": 2,
-    "_dstBlendFactor": 4,
-    "_color": {
-      "__type__": "cc.Color",
-      "r": 255,
-      "g": 255,
-      "b": 255,
-      "a": 255
-    },
-    "_spriteFrame": {
-      "__uuid__": "04062ca5-8e94-4619-896c-ea14dd4298d8@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": "b4CyNbWT9PcJKmC/hPjAEI"
-  },
-  {
-    "__type__": "cc.PrefabInfo",
-    "root": {
-      "__id__": 1
-    },
-    "asset": {
-      "__id__": 0
-    },
-    "fileId": "berv92Oi1IOpZBwOPzAuea",
-    "instance": null,
-    "targetOverrides": null,
-    "nestedPrefabInstanceRoots": null
-  },
   {
     "__type__": "cc.UITransform",
     "_name": "",
@@ -3747,7 +3746,7 @@
       "__id__": 157
     },
     "lab_content": {
-      "__id__": 141
+      "__id__": 146
     },
     "_id": ""
   },

+ 2 - 2
assets/script/ui/home/home_guangbo.ts

@@ -29,7 +29,7 @@ export class home_guangbo extends Component {
         // console.log('cur_content_width=',cur_content_width)
         let cur_content_height = this.lab_content.getComponent(UITransform).contentSize.height
         this.lab_content.getComponent(UITransform).setContentSize(new Size(cur_content_width,cur_content_height))
-        this.lab_content.setPosition(this.screen_width/2+this.left_padding,0,0)
+        this.lab_content.setPosition(this.screen_width/2+this.left_padding,this.lab_content.getPosition().y,0)
         this.runContent(cur_content_width)
     }
 
@@ -39,7 +39,7 @@ export class home_guangbo extends Component {
         this.schedule(()=>{
             run_pos_x -= this.speed
             // console.log('cur_lab_content_postion_x=',cur_lab_content_postion_x)
-            this.lab_content.setPosition(run_pos_x,0,0)
+            this.lab_content.setPosition(run_pos_x,this.lab_content.getPosition().y,0)
             if(run_pos_x<=-(content_width+this.screen_width/2)) {
                 run_pos_x = this.screen_width/2+this.left_padding
                 this.unscheduleAllCallbacks()

BIN
assets/texture/ui/home/img_gong_gao.png


+ 21 - 21
assets/texture/ui/home/img_gong_gao.png.meta

@@ -39,17 +39,17 @@
       "id": "f9941",
       "name": "spriteFrame",
       "userData": {
-        "trimType": "auto",
+        "trimType": "custom",
         "trimThreshold": 1,
         "rotated": false,
         "offsetX": 0,
         "offsetY": 0,
         "trimX": 0,
         "trimY": 0,
-        "width": 1079,
-        "height": 58,
-        "rawWidth": 1079,
-        "rawHeight": 58,
+        "width": 903,
+        "height": 99,
+        "rawWidth": 903,
+        "rawHeight": 99,
         "borderTop": 0,
         "borderBottom": 0,
         "borderLeft": 0,
@@ -61,17 +61,17 @@
         "meshType": 0,
         "vertices": {
           "rawPosition": [
-            -539.5,
-            -29,
+            -451.5,
+            -49.5,
             0,
-            539.5,
-            -29,
+            451.5,
+            -49.5,
             0,
-            -539.5,
-            29,
+            -451.5,
+            49.5,
             0,
-            539.5,
-            29,
+            451.5,
+            49.5,
             0
           ],
           "indexes": [
@@ -84,12 +84,12 @@
           ],
           "uv": [
             0,
-            58,
-            1079,
-            58,
+            99,
+            903,
+            99,
             0,
             0,
-            1079,
+            903,
             0
           ],
           "nuv": [
@@ -103,13 +103,13 @@
             1
           ],
           "minPos": [
-            -539.5,
-            -29,
+            -451.5,
+            -49.5,
             0
           ],
           "maxPos": [
-            539.5,
-            29,
+            451.5,
+            49.5,
             0
           ]
         },