解决冲突

master
罗家炜 2025-06-19 14:40:41 +08:00
commit 92d6f22322
10 changed files with 157 additions and 33 deletions

View File

@ -86,15 +86,16 @@ function FamilyJoinAndCreate:KeyBoardInit()
end
function FamilyJoinAndCreate:NumTexInput(num)
if #self.tex_num.text > 6 then
if #self.tex_num.text >= 6 then
self.tex_num.text = string.sub(self.tex_num.text, 1, 6)
end
if #self.tex_num.text == 6 then
return
end
self.tex_num.text = self.tex_num.text .. num
if #self.tex_num.text == 6 then
self:JoinRoom(self.tex_num.text)
end
end
function FamilyJoinAndCreate:BackNumTex()

View File

@ -13,32 +13,50 @@ local function ShowMainView()
root.familyType.selectedIndex = rootLastIndex or 1
end
function FamilyMyFamily:TryShow(r)
if not self._view then
self:Init()
root = r
end
--endregion
function FamilyMyFamily:TryShow(r)
self:Init()
root = r
self:Show()
end
--endregion
function FamilyMyFamily:Show()
local family = root._group
pt(family)
if not family then
-- 跳转创建家族界面
root:CreateFamily()
return
end
self.tex_fName.text = family.name
self.tex_playerName.text = "亲友圈号:" .. family.id
self.tex_fNumber.text = family.member_num
self.tex_cradNum.text = family.diamo
self.tex_nocice.text = family.notice
ImageLoad.Load(family.o_portrait, self.loader_icon)
self.cStyle.selectedIndex = family.lev -1
HideMainView()
BaseView.Show(self)
BaseWindow.Show(self)
end
function FamilyMyFamily:Close()
BaseView.Close(self)
BaseWindow.Close(self)
ShowMainView()
end
function FamilyMyFamily:Init()
setmetatable(FamilyMyFamily, { __index = BaseView })
self:InitView('ui://Family/com_myFamily')
setmetatable(FamilyMyFamily, { __index = BaseWindow })
BaseWindow.init(self, 'ui://Family/com_myFamily')
-- 设置成组件的形式
self._close_destroy = true
self._full = true
self._animation = false
self._root_view:GetChild("win_mode").visible = false
self._view:GetChild("btn_close").onClick:Set(function()
self:Close()
@ -60,6 +78,7 @@ function FamilyMyFamily:Init()
self.btn_buyCrad = self._view:GetChild("btn_buyCrad")
self.btn_checkNumber = self._view:GetChild("btn_checkNumber")
self.cStyle = self._view:GetController("cStyle")
self.btn_playSet.onClick:Set(function()
self:Close()
@ -86,6 +105,14 @@ function FamilyMyFamily:Init()
root:AuditNumber()
end)
self.btn_quitFamily.onClick:Set(function()
local fgCtr = ControllerManager.GetController(NewGroupController)
print("发送了退出协议 familyid = ",root._group.id)
fgCtr:FG_ExitGroup(root._group.id, function(res)
pt(res)
end)
end)
return self
end

View File

@ -0,0 +1,60 @@
local data = {
{num = 50,colorIndex = 0},
{num = 200,colorIndex = 1},
{num = 1000,colorIndex = 2},
}
--#region
local FamilyRoomCard ={}
local function charge(num)
print('充值',num)
end
--#endregion
function FamilyRoomCard:TryShow()
local Instance = self.New()
Instance:Show()
end
function FamilyRoomCard.New()
setmetatable(FamilyRoomCard, {__index = BaseWindow})
local Instance = setmetatable({}, {__index = FamilyRoomCard})
BaseWindow.init(Instance, "ui://Family/com_roomCard")
Instance._close_destroy = true
Instance.list_bayCrad = Instance._view:GetChild("list_bayCrad")
Instance.tex_curCard = Instance._view:GetChild('tex_curCard')
Instance.tex_famliyCard = Instance._view:GetChild("tex_famliyCard")
Instance.list_bayCrad.itemRenderer = function(index, obj)
local _idx = index +1
local num = data[_idx].num
obj:GetChild("tex_cardNum").text = num
obj:GetController("cColor").selectedIndex = data[_idx].colorIndex
obj.onClick:Set(function()
charge(num)
print('房卡',num)
end)
end
Instance.list_bayCrad.numItems = #data
return Instance
end
function FamilyRoomCard:Show()
self.tex_curCard.text = "当前帐号房卡:" .. DataManager.SelfUser.diamo
--self.tex_famliyCard.text = "亲友圈房卡:" ..
BaseWindow.Show(self)
end
return FamilyRoomCard

View File

@ -13,6 +13,7 @@ local FamilyEventView = import(".Family.FamilyEventView")
local FamilyBanDesk = import(".Family.FamilyBanDesk")
local FamilyMyFamily = import(".Family.FamilyMyFamily")
local FamilyRecord = import(".Family.FamilyRecord")
local FamilyRoomCard = import(".Family.FamilyRoomCard")
---
FamilyView = {}
@ -126,8 +127,10 @@ function M:AuditNumber()
end
function M:ShowShop()
self._child_familyLobbyShopView = LobbyShopView.new(self, self._group.id)
self._child_familyLobbyShopView:Show()
--self._child_familyLobbyShopView = LobbyShopView.new(self, self._group.id)
--self._child_familyLobbyShopView:Show()
FamilyRoomCard:TryShow()
end
function M:ShowAllRank()

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="2532,1170" opaque="false">
<controller name="cStyle" pages="0,,1," selected="1">
<controller name="cStyle" pages="0,,1," selected="0">
<remark page="0" value="加入"/>
<remark page="1" value="创建"/>
</controller>
@ -14,7 +14,7 @@
<image id="n10_n74n" name="n10" src="86ct7cvp" fileName="CreateAndJoin/Image/image 43.png" xy="879,705" group="n15_n74n"/>
<image id="n5_n74n" name="n5" src="n74n7d15" fileName="CreateAndJoin/Image/Group 141.png" xy="789,435" group="n15_n74n"/>
<text id="n6_n74n" name="n6" xy="800,318" size="674,86" group="n15_n74n" font="ui://27vd145bh35o7ill" fontSize="66" color="#9e3635" align="center" vAlign="middle" autoSize="none" text="请输入俱乐部号"/>
<text id="n8_n74n" name="text_FamilyId" xy="821,458" size="664,76" group="n15_n74n" font="ui://27vd145bh35o7ikb" fontSize="54" color="#ffffff" vAlign="middle" letterSpacing="76" autoSize="none" text="999999"/>
<text id="n8_n74n" name="text_FamilyId" xy="821,458" size="664,76" group="n15_n74n" font="ui://27vd145bh35o7iju" fontSize="54" color="#ffffff" vAlign="middle" letterSpacing="76" autoSize="none" text="999999"/>
<text id="n9_n74n" name="n9" xy="816,582" size="642,98" group="n15_n74n" font="ui://27vd145bh35o7ill" fontSize="36" color="#9e3635" autoSize="none" text="小提示:您可以根据朋友分享的俱乐部口令加入他的亲友圈"/>
<list id="n14_n74n" name="list_keyBoard" xy="1527,325" size="678,700" group="n15_n74n" layout="flow_hz" overflow="scroll" lineGap="18" colGap="24" defaultItem="ui://htcn7v3r86ct7cw6">
<relation target="" sidePair="width-width,height-height"/>

View File

@ -1,13 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="2532,1170">
<controller name="cStyle" pages="0,,1,,2," selected="0">
<remark page="0" value="普通"/>
<remark page="1" value="助理"/>
<remark page="2" value="群主"/>
</controller>
<displayList>
<image id="n0_ieus" name="n0" src="mc627d05" fileName="Main/Image/Rectangle 91.png" xy="228,165" size="2076,993"/>
<image id="n1_ieus" name="n1" src="ieus7d1e" fileName="Main/Image/Rectangle 121.png" xy="246,183" size="2040,957"/>
<image id="n2_ieus" name="n2" src="ieus7d1o" fileName="Main/Image/Rectangle 283.png" xy="810,219" size="1440,885">
<relation target="" sidePair=""/>
</image>
<image id="n29_ieus" name="n29" src="ieus7d1z" fileName="MyFamily/Image/Group 327(1).png" xy="969,24"/>
<loader id="n3_ieus" name="loader_icon" xy="378,288" size="300,300"/>
<image id="n29_ieus" name="n29" src="ieus7d1z" fileName="MyFamily/Image/Group 327(1).png" xy="969,24">
<relation target="" sidePair="top-top"/>
</image>
<loader id="n3_ieus" name="loader_icon" xy="378,288" size="300,300" url="ui://27vd145bnlvy7iaa" align="center" vAlign="middle" fill="scaleMatchHeight"/>
<image id="n4_ieus" name="n4" src="ieus7d1p" fileName="MyFamily/Image/Rectangle 267.png" xy="1212,249" size="1008,84"/>
<image id="n5_ieus" name="n5" src="ieus7d1p" fileName="MyFamily/Image/Rectangle 267.png" xy="1212,357" size="1008,84"/>
<image id="n7_ieus" name="n7" src="ieus7d1p" fileName="MyFamily/Image/Rectangle 267.png" xy="1212,465" size="378,84"/>
@ -25,14 +32,29 @@
<text id="n20_ieus" name="tex_nocice" xy="1233,688" size="987,362" font="ui://27vd145bh35o7il2" fontSize="54" color="#111111" autoSize="ellipsis" text="文本文本文本文本文本文本文本"/>
<text id="n22_ieus" name="tex_playerName" xy="334,219" size="388,64" font="ui://27vd145bg2mo7ij0" fontSize="48" color="#8e0305" align="center" vAlign="middle" autoSize="none" text="玩家玩家玩家玩家"/>
<component id="n23_ieus" name="btn_quitFamily" src="ieus7d1v" fileName="MyFamily/Component/btn_quitFamily.xml" xy="363,943"/>
<component id="n24_ieus" name="btn_playSet" src="ieus7d1w" fileName="MyFamily/Component/btn_playSet.xml" xy="363,721"/>
<component id="n25_ieus" name="btn_invite" src="ieus7d1x" fileName="MyFamily/Component/btn_invite.xml" xy="363,832"/>
<component id="n26_ieus" name="btn_czRecord" src="ieus7d1u" fileName="MyFamily/Component/btn_czRecord.xml" xy="363,610"/>
<image id="n27_ieus" name="n27" src="ieus7d1y" fileName="MyFamily/Image/hall_club_btn_bj.png" xy="2142,970"/>
<component id="n28_ieus" name="btn_close" src="in3i7cu9" fileName="Main/Component/btn_close.xml" xy="54,6"/>
<component id="n30_ieus" name="btn_hideNumber" src="ieus7d27" fileName="MyFamily/Component/btn_hideNumber.xml" xy="1632,468"/>
<component id="n31_ieus" name="btn_checkNumber" src="ieus7d24" fileName="MyFamily/Component/btn_checkNumber.xml" xy="1944,465"/>
<component id="n32_ieus" name="btn_buyCrad" src="ieus7d25" fileName="MyFamily/Component/btn_buyCard.xml" xy="1944,573"/>
<component id="n33_ieus" name="btn_applyMsg" src="ieus7d26" fileName="MyFamily/Component/btn_applyMsg.xml" xy="1929,24"/>
<component id="n28_ieus" name="btn_close" src="in3i7cu9" fileName="Main/Component/btn_close.xml" xy="54,6">
<relation target="" sidePair="top-top"/>
</component>
<component id="n24_ieus" name="btn_playSet" src="ieus7d1w" fileName="MyFamily/Component/btn_playSet.xml" xy="363,721">
<gearDisplay controller="cStyle" pages="1,2"/>
</component>
<component id="n26_ieus" name="btn_czRecord" src="ieus7d1u" fileName="MyFamily/Component/btn_czRecord.xml" xy="363,610">
<gearDisplay controller="cStyle" pages="1,2"/>
</component>
<component id="n30_ieus" name="btn_hideNumber" src="ieus7d27" fileName="MyFamily/Component/btn_hideNumber.xml" xy="1632,468">
<gearDisplay controller="cStyle" pages="1,2"/>
</component>
<component id="n31_ieus" name="btn_checkNumber" src="ieus7d24" fileName="MyFamily/Component/btn_checkNumber.xml" xy="1944,465">
<gearDisplay controller="cStyle" pages="1,2"/>
</component>
<component id="n32_ieus" name="btn_buyCrad" src="ieus7d25" fileName="MyFamily/Component/btn_buyCard.xml" xy="1944,573">
<gearDisplay controller="cStyle" pages="1,2"/>
</component>
<component id="n33_ieus" name="btn_applyMsg" src="ieus7d26" fileName="MyFamily/Component/btn_applyMsg.xml" xy="1929,24">
<gearDisplay controller="cStyle" pages="1,2"/>
<relation target="" sidePair="top-top"/>
</component>
</displayList>
</component>

View File

@ -1,11 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<component size="294,84" extention="Button">
<controller name="button" pages="0,up,1,down,2,over,3,selectedOver" selected="0"/>
<controller name="isAssistant" pages="0,,1," selected="0"/>
<controller name="isAssistant" pages="0,,1," selected="0">
<remark page="0" value="不是"/>
<remark page="1" value="是"/>
</controller>
<displayList>
<image id="n3_qz7i" name="n3" src="c8pn7cz9" fileName="NumberDetail/Image/hall_club_button_addassi.png" xy="0,0" size="294,84">
<gearDisplay controller="isAssistant" pages="0"/>
<relation target="" sidePair="width-width,height-height"/>
</image>
<image id="n4_o2rw" name="n4" src="o2rw7d3e" fileName="NumberDetail/Image/hall_club_button_aremovassi.png" xy="0,0" size="294,84">
<gearDisplay controller="isAssistant" pages="1"/>
</image>
</displayList>
<Button downEffect="dark" downEffectValue="0.8"/>
</component>

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

View File

@ -7,7 +7,7 @@
<text id="n3_c8pn" name="n3" xy="371,6" size="530,116" font="Alibaba PuHuiTi 3.0" fontSize="90" color="#ffffff" align="center" vAlign="middle" autoSize="none" bold="true" text="充值房卡"/>
<text id="n4_c8pn" name="tex_curCard" xy="159,174" size="401,56" font="Alibaba PuHuiTi 3.0" fontSize="42" color="#666666" align="center" vAlign="middle" autoSize="none" bold="true" text="当前帐号房卡20"/>
<text id="n6_c8pn" name="tex_famliyCard" xy="708,174" size="401,56" font="Alibaba PuHuiTi 3.0" fontSize="42" color="#666666" align="center" vAlign="middle" autoSize="none" bold="true" text="亲友圈房卡191"/>
<list id="n8_c8pn" name="list_bayCrad" xy="90,260" size="1092,493" layout="row" overflow="scroll" colGap="33" defaultItem="ui://htcn7v3rc8pn7czy" align="center">
<list id="n8_c8pn" name="list_bayCrad" xy="90,260" size="1092,493" layout="row" overflow="hidden" colGap="33" defaultItem="ui://htcn7v3rc8pn7czy" align="center" autoClearItems="true">
<item/>
<item/>
<item/>

View File

@ -158,7 +158,7 @@
<image id="c8pn7czr" name="Group 1731.png" path="/NumberRecord/Image/"/>
<image id="c8pn7czs" name="Group 173.png" path="/NumberRecord/Image/"/>
<image id="c8pn7czt" name="Rectangle 42.png" path="/RoomCrad/Image/"/>
<component id="c8pn7czu" name="RoomCard.xml" path="/" exported="true"/>
<component id="c8pn7czu" name="com_roomCard.xml" path="/" exported="true"/>
<image id="c8pn7czv" name="Rectangle 41.png" path="/RoomCrad/Image/"/>
<image id="c8pn7czw" name="title_top.png" path="/RoomCrad/Image/"/>
<component id="c8pn7czy" name="com_roomCrad.xml" path="/RoomCrad/Component/" exported="true"/>
@ -267,6 +267,7 @@
<component id="slrk7d3b" name="Item_familyRecord.xml" path="/Record/Component/"/>
<component id="slrk7d3c" name="Item_familyPlayer.xml" path="/Record/Component/"/>
<image id="o2rw7d3d" name="zhuangrang 1.png" path="/Main/Image/"/>
<<<<<<< HEAD
<component id="jydr7d3e" name="comp_rank.xml" path="/Rank/" exported="true"/>
<image id="jydr7d3f" name="2_12.png" path="/Rank/Image/"/>
<image id="jydr7d3g" name="2_14.png" path="/Rank/Image/"/>
@ -291,6 +292,9 @@
<image id="jydr7d40" name="1_04.png" path="/Rank/Image/"/>
<image id="jydr7d42" name="Group 363.png" path="/Rank/Image/"/>
<component id="jydr7d43" name="comp_listChild.xml" path="/Rank/Component/"/>
=======
<image id="o2rw7d3e" name="hall_club_button_aremovassi.png" path="/NumberDetail/Image/"/>
>>>>>>> 9ea9f829c9c9bd426e2b76a19fce5658be8b474f
</resources>
<publish name="Family" path="..\wb_unity_pro\Assets\ART\base\Family\ui" packageCount="2"/>
</packageDescription>