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 @@ + + + + + + - +