hengyang_client/lua_probject/base_project/Game/View/Family/FamilyMyFamily.lua

92 lines
2.1 KiB
Lua

--region LOCAL
local FamilyMyFamily = {}
local root = {}
local rootLastIndex = 0
local function HideMainView()
rootLastIndex = root.familyType.selectedIndex
root.familyType.selectedIndex = 0
end
local function ShowMainView()
root.familyType.selectedIndex = rootLastIndex or 1
end
function FamilyMyFamily:TryShow(r)
if not self._view then
self:Init()
root = r
end
self:Show()
end
--endregion
function FamilyMyFamily:Show()
HideMainView()
BaseView.Show(self)
end
function FamilyMyFamily:Close()
BaseView.Close(self)
ShowMainView()
end
function FamilyMyFamily:Init()
setmetatable(FamilyMyFamily, { __index = BaseView })
self:InitView('ui://Family/com_myFamily')
self._view:GetChild("btn_close").onClick:Set(function()
self:Close()
end)
self.loader_icon = self._view:GetChild("loader_icon")
self.tex_fName = self._view:GetChild("tex_fName")
self.tex_wxId = self._view:GetChild("tex_wxId")
self.tex_fNumber = self._view:GetChild("tex_fNumber")
self.tex_cradNum = self._view:GetChild("tex_cradNum")
self.tex_nocice = self._view:GetChild("tex_nocice")
self.tex_playerName = self._view:GetChild("tex_playerName")
self.btn_quitFamily = self._view:GetChild("btn_quitFamily")
self.btn_playSet = self._view:GetChild("btn_playSet")
self.btn_invite = self._view:GetChild("btn_invite")
self.btn_czRecord = self._view:GetChild("btn_czRecord")
self.btn_applyMsg = self._view:GetChild("btn_applyMsg")
self.btn_buyCrad = self._view:GetChild("btn_buyCrad")
self.btn_checkNumber = self._view:GetChild("btn_checkNumber")
self.btn_playSet.onClick:Set(function()
self:Close()
root:PlayEdit()
end)
self.btn_invite.onClick:Set(function()
self:Close()
root:ShareWx()
end)
self.btn_buyCrad.onClick:Set(function()
self:Close()
root:ShowShop()
end)
self.btn_checkNumber.onClick:Set(function()
self:Close()
root:AllNumber()
end)
self.btn_applyMsg.onClick:Set(function()
self:Close()
root:AuditNumber()
end)
return self
end
return FamilyMyFamily