47 lines
1.0 KiB
Lua
47 lines
1.0 KiB
Lua
require 'FairyGUI'
|
|
|
|
local FamilyChatRoom = {}
|
|
|
|
--[[
|
|
function FamilyChatRoom.New()
|
|
--转移进family界面
|
|
--setmetatable(FamilyChatRoom, { __index = BaseWindow })
|
|
--local inst = setmetatable({}, { __index = FamilyChatRoom})
|
|
|
|
inst:Init(com)
|
|
|
|
return inst
|
|
end
|
|
]]
|
|
|
|
function FamilyChatRoom:Init(com, root)
|
|
--转移进family界面
|
|
--self._full = true
|
|
--self._full_offset = false
|
|
--self._animation = false
|
|
--BaseWindow.init(self, "ui://Family/com_chatRoom")
|
|
|
|
self.root = root
|
|
self._view = com
|
|
|
|
self.list_chat = self._view:GetChild("list_chat")
|
|
self.btn_quit = self._view:GetChild("btn_quit")
|
|
|
|
self.btn_quit.onClick:Set(function()
|
|
self:Close()
|
|
end)
|
|
|
|
return self
|
|
end
|
|
|
|
function FamilyChatRoom:Close()
|
|
local cChatRoom = self.root._view:GetController("cIsChatRoom")
|
|
cChatRoom.selectedIndex = 0
|
|
end
|
|
|
|
function FamilyChatRoom:Show()
|
|
local cChatRoom = self.root._view:GetController("cIsChatRoom")
|
|
cChatRoom.selectedIndex = 1
|
|
end
|
|
|
|
return FamilyChatRoom |