future 1 年之前
父節點
當前提交
1e96499255

+ 8 - 8
assets/resources/ui/home.prefab

@@ -143,7 +143,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 1919.9999999999998
+      "height": 1920
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -290,7 +290,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": 463.9999999999999,
+      "y": 464,
       "z": 0
     },
     "_lrot": {
@@ -3723,7 +3723,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": -959.9999999999999,
+      "y": -960,
       "z": 0
     },
     "_lrot": {
@@ -4353,7 +4353,7 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 145,
+      "width": 135,
       "height": 30
     },
     "_anchorPoint": {
@@ -5119,7 +5119,7 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 160,
+      "width": 145,
       "height": 30
     },
     "_anchorPoint": {
@@ -5162,7 +5162,7 @@
     "_fontSize": 25,
     "_fontFamily": "Arial",
     "_lineHeight": 30,
-    "_overflow": 2,
+    "_overflow": 1,
     "_enableWrapText": false,
     "_font": null,
     "_isSystemFontUsed": true,
@@ -5885,7 +5885,7 @@
     },
     "_contentSize": {
       "__type__": "cc.Size",
-      "width": 145,
+      "width": 135,
       "height": 30
     },
     "_anchorPoint": {
@@ -9021,7 +9021,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 1919.9999999999998
+      "height": 1920
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",

+ 10 - 10
assets/resources/ui/rank.prefab

@@ -109,7 +109,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": 864.9999999999999,
+      "y": 865,
       "z": 0
     },
     "_lrot": {
@@ -469,7 +469,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": 699.9999999999999,
+      "y": 700,
       "z": 0
     },
     "_lrot": {
@@ -1169,7 +1169,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": -10.000000000000114,
+      "y": -10,
       "z": 0
     },
     "_lrot": {
@@ -1235,7 +1235,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": 319.9999999999998,
+      "y": 320,
       "z": 0
     },
     "_lrot": {
@@ -5613,7 +5613,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": 324.9999999999998,
+      "y": 325,
       "z": 0
     },
     "_lrot": {
@@ -5654,7 +5654,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1000,
-      "height": 649.9999999999995
+      "height": 650
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -5927,7 +5927,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 649.9999999999995
+      "height": 650
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -6046,7 +6046,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 1299.9999999999995
+      "height": 1300
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -6184,7 +6184,7 @@
     "_lpos": {
       "__type__": "cc.Vec3",
       "x": 0,
-      "y": -829.9999999999999,
+      "y": -830,
       "z": 0
     },
     "_lrot": {
@@ -8302,7 +8302,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 1919.9999999999998
+      "height": 1920
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",

+ 2 - 2
assets/resources/ui/user_info_view.prefab

@@ -140,7 +140,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 1919.9999999999998
+      "height": 1920
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -2473,7 +2473,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1080,
-      "height": 1919.9999999999998
+      "height": 1920
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",

+ 8 - 1
assets/script/ui/home/home_bottom_rank_item.ts

@@ -23,7 +23,14 @@ export class home_bottom_rank_item extends Component {
         this.m_data = data
         this.m_cb = cb
         this.img_car.getComponent(Sprite).spriteFrame = imageCacheManager.getRankCarImageById(data.car_id)
-        this.lab_nickname.getComponent(Label).string = data.nickName
+        let lab_component = this.lab_nickname.getComponent(Label)
+        if(data.nickName.length>5) {
+            lab_component.string = data.nickName.substring(0,5) + '...'
+            lab_component.horizontalAlign = Label.HorizontalAlign.LEFT
+        } else {
+            lab_component.horizontalAlign = Label.HorizontalAlign.CENTER
+            lab_component.string = data.nickName
+        }
         this.lab_score.getComponent(Label).string = data.score + '分'
     }