From 121e8a3716ddd5bd7749e3b9e12e88208ca18d48 Mon Sep 17 00:00:00 2001 From: "DESKTOP-7R8JEQQ\\k" <1076390229@qq.com> Date: Wed, 9 Jul 2025 21:32:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8D=A2=E6=B8=B8=E6=88=8F=E5=BA=95=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Game/View/Family/FamilAllRank.lua | 5 ++++ .../base_project/Game/View/FamilyView.lua | 1 + .../base_project/Game/View/ViewUtil.lua | 7 +++++ .../CreateAndJoin/com_createAndJoin.xml | 6 ++-- .../Family/Main/Component/btn_familyName.xml | 2 +- wb_new_ui/assets/Family/Rank/comp_rank.xml | 8 ++++- .../ART/base/Family/ui/Family_fui.bytes | Bin 116490 -> 116689 bytes .../ui/Extend_MJ_LiChuan_atlas0_1.png.meta | 2 +- .../Extend_Poker_ChunTian_atlas0_1.png.meta | 2 +- .../Extend_Poker_RunFastNew_atlas0_1.png.meta | 2 +- wb_unity_pro/Assets/Scripts/Game/Utils.cs | 10 +++++++ .../Assets/StreamingAssets/init1_1.json | 28 +++++++++--------- 12 files changed, 51 insertions(+), 22 deletions(-) diff --git a/lua_probject/base_project/Game/View/Family/FamilAllRank.lua b/lua_probject/base_project/Game/View/Family/FamilAllRank.lua index 2d20c442..938b85d8 100644 --- a/lua_probject/base_project/Game/View/Family/FamilAllRank.lua +++ b/lua_probject/base_project/Game/View/Family/FamilAllRank.lua @@ -16,9 +16,14 @@ function M:init() root.familyType.selectedIndex = 0 local comp_rank = UIPackage.CreateObjectFromURL("ui://Family/Comp_Rank") root._view:AddChild(comp_rank) + --[[ comp_rank.width = root._view.width comp_rank.height = root._view.height comp_rank:Center() + ]] + local scaleY = GRoot.inst.height / comp_rank.height + local scaleX = GRoot.inst.width / comp_rank.width + comp_rank:SetScale(scaleX, scaleY) self._view = comp_rank local viewBox_leftTime = comp_rank:GetChild('left_time') diff --git a/lua_probject/base_project/Game/View/FamilyView.lua b/lua_probject/base_project/Game/View/FamilyView.lua index ee84f5b2..290defbe 100644 --- a/lua_probject/base_project/Game/View/FamilyView.lua +++ b/lua_probject/base_project/Game/View/FamilyView.lua @@ -552,6 +552,7 @@ function M:ConnetFamily(index, groups, isCreate) list_family.itemRenderer = function(i, obj) local j = i + 1 obj:GetChild("title").emojies = EmojiDitc.EmojiesDitc + --obj.text = ViewUtil.TextOmit(groups[j].name) obj.text = groups[j].name obj.onClick:Add(function() diff --git a/lua_probject/base_project/Game/View/ViewUtil.lua b/lua_probject/base_project/Game/View/ViewUtil.lua index b1d50826..a72b7c10 100644 --- a/lua_probject/base_project/Game/View/ViewUtil.lua +++ b/lua_probject/base_project/Game/View/ViewUtil.lua @@ -361,3 +361,10 @@ function ViewUtil.ShowOneInput(showText, callback) GRoot.inst:RemoveChild(pop_oneInput) end) end + +function ViewUtil.TextOmit(str) + if utf8.len(str) > 6 then + return string.sub(str, 1, utf8.offset(s, 6)) .. "..." + end + return str +end diff --git a/wb_new_ui/assets/Family/CreateAndJoin/com_createAndJoin.xml b/wb_new_ui/assets/Family/CreateAndJoin/com_createAndJoin.xml index 0cfa51e5..4a37c259 100644 --- a/wb_new_ui/assets/Family/CreateAndJoin/com_createAndJoin.xml +++ b/wb_new_ui/assets/Family/CreateAndJoin/com_createAndJoin.xml @@ -1,6 +1,6 @@ - + @@ -59,8 +59,8 @@ - - + + diff --git a/wb_new_ui/assets/Family/Main/Component/btn_familyName.xml b/wb_new_ui/assets/Family/Main/Component/btn_familyName.xml index 685f4610..e4d4d93b 100644 --- a/wb_new_ui/assets/Family/Main/Component/btn_familyName.xml +++ b/wb_new_ui/assets/Family/Main/Component/btn_familyName.xml @@ -8,7 +8,7 @@ - + diff --git a/wb_new_ui/assets/Family/Rank/comp_rank.xml b/wb_new_ui/assets/Family/Rank/comp_rank.xml index c82a7eea..9e46ee57 100644 --- a/wb_new_ui/assets/Family/Rank/comp_rank.xml +++ b/wb_new_ui/assets/Family/Rank/comp_rank.xml @@ -2,11 +2,17 @@ + + + + + + - +