future 1 éve
szülő
commit
132ed6ff9a

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

@@ -3478,7 +3478,7 @@
         "__id__": 144
       }
     ],
-    "_active": true,
+    "_active": false,
     "_components": [
       {
         "__id__": 150
@@ -3622,10 +3622,10 @@
     "_string": "",
     "_horizontalAlign": 1,
     "_verticalAlign": 1,
-    "_actualFontSize": 23,
-    "_fontSize": 23,
+    "_actualFontSize": 27,
+    "_fontSize": 27,
     "_fontFamily": "Arial",
-    "_lineHeight": 30,
+    "_lineHeight": 27,
     "_overflow": 1,
     "_enableWrapText": true,
     "_font": null,
@@ -4987,7 +4987,7 @@
         "__id__": 208
       }
     ],
-    "_active": true,
+    "_active": false,
     "_components": [
       {
         "__id__": 214
@@ -6496,7 +6496,7 @@
         "__id__": 272
       }
     ],
-    "_active": true,
+    "_active": false,
     "_components": [
       {
         "__id__": 278
@@ -7772,7 +7772,7 @@
     "_contentSize": {
       "__type__": "cc.Size",
       "width": 1000,
-      "height": 20
+      "height": 30
     },
     "_anchorPoint": {
       "__type__": "cc.Vec2",
@@ -7843,7 +7843,7 @@
     "_startAxis": 0,
     "_paddingLeft": 0,
     "_paddingRight": 0,
-    "_paddingTop": 0,
+    "_paddingTop": 10,
     "_paddingBottom": 0,
     "_spacingX": 0,
     "_spacingY": -20,
@@ -10348,12 +10348,12 @@
     "_string": "",
     "_horizontalAlign": 0,
     "_verticalAlign": 1,
-    "_actualFontSize": 41,
+    "_actualFontSize": 40,
     "_fontSize": 40,
     "_fontFamily": "Arial",
     "_lineHeight": 40,
-    "_overflow": 2,
-    "_enableWrapText": true,
+    "_overflow": 1,
+    "_enableWrapText": false,
     "_font": null,
     "_isSystemFontUsed": true,
     "_spacingX": 0,

+ 3 - 0
assets/resources/ui/rank_list_item.prefab

@@ -1798,6 +1798,9 @@
     "img_car": {
       "__id__": 64
     },
+    "region_bg": {
+      "__id__": 14
+    },
     "lab_region": {
       "__id__": 15
     },

+ 3 - 3
assets/script/tools.ts

@@ -83,11 +83,11 @@ export class tools  {
             string = string.substring(0,4)
         }
         if(string.length==2) {
-            lab_component.lineHeight = 60
+            lab_component.lineHeight = 55
         } else if(string.length==3) {
-            lab_component.lineHeight = 38
+            lab_component.lineHeight = 35
         } else {
-            lab_component.lineHeight = 30
+            lab_component.lineHeight = 27
         }
         lab_component.string = string
     }

+ 3 - 3
assets/script/ui/rank/rank.ts

@@ -55,7 +55,7 @@ export class rank extends Component {
                 }
             }
             this.reloadListTop(d_content, type)
-            this.reloadListContent(d_content)
+            this.reloadListContent(d_content, type)
             this.reloadMyInfo(type)
         })
     }
@@ -64,7 +64,7 @@ export class rank extends Component {
         this.list_top.getComponent(rank_list_top).initView(data_list, type)
     }
 
-    reloadListContent(data_list) {
+    reloadListContent(data_list, type:number) {
         this.list_content.removeAllChildren()
         if(data_list.length < 3) {
             return
@@ -73,7 +73,7 @@ export class rank extends Component {
             const element = data_list[index]
             let item = instantiate(this.rank_list_item)
             item.parent = this.list_content;
-            item.getComponent(rank_list_item).initView(element,index)
+            item.getComponent(rank_list_item).initView(element,index,type)
         }
         this.list.getComponent(ScrollView).scrollToTop()
     }

+ 4 - 1
assets/script/ui/rank/rank_list_item.ts

@@ -15,6 +15,7 @@ export class rank_list_item extends base_ui {
     @property(Node) lab_nickname:Node = null;
     @property(Node) lab_score:Node = null;
     @property(Node) img_car:Node = null;
+    @property(Node) region_bg:Node = null;
     @property(Node) lab_region:Node = null;
     private m_data:rankData = null
 
@@ -26,12 +27,14 @@ export class rank_list_item extends base_ui {
         })
     }
 
-    initView(data:rankData, index) {
+    initView(data:rankData, index, type:number) {
         this.m_data = data
         this.lab_number.getComponent(Label).string = index+1 + ''
         tools.loadRemoteImg(data.avatarUrl, (r)=>{
             this.img_avatar.getComponent(Sprite).spriteFrame = r.sf
         })
+        if(type==3) { this.region_bg.active = false } 
+        else { this.region_bg.active = true }
         tools.substringRankRegionName(this.lab_region, data.city_name)
         tools.labelCutString(this.lab_nickname,data.nickName,8,false) //this.lab_nickname.getComponent(Label).string = data.nickName
         this.lab_score.getComponent(Label).string = data.score + ' 分'

+ 1 - 1
assets/script/ui/rank/rank_my_info.ts

@@ -53,7 +53,7 @@ export class rank_my_info extends Component {
             this.img_avatar.getComponent(Sprite).spriteFrame = r.sf
         })
         tools.substringRankRegionName(this.lab_region, data.city_name)
-        this.lab_nickname.getComponent(Label).string = data.nickName
+        tools.labelCutString(this.lab_nickname,data.nickName,6,false)
         this.lab_score.getComponent(Label).string = data.score + ' 分'
         this.img_car.getComponent(Sprite).spriteFrame = GameManager.getUserDefaultRankCarSf()
     }