46 lines
1.6 KiB
Lua
46 lines
1.6 KiB
Lua
|
|
local TableBG = import('Game.Data.TableBG')
|
|||
|
|
local MainRightPanelView = import('Game.View.MainRightPanelView')
|
|||
|
|
|
|||
|
|
---
|
|||
|
|
local M = {}
|
|||
|
|
|
|||
|
|
setmetatable(M, {__index = MainView})
|
|||
|
|
|
|||
|
|
local pk_default_bg = 1
|
|||
|
|
local pk_bg_config = {
|
|||
|
|
{id = 1, url = 'base/main_poker/bg/bg3', thumb = 'ui://Main_Poker/bg3'},
|
|||
|
|
{id = 2, url = 'base/main_poker/bg/bg2', thumb = 'ui://Main_Poker/bg2'},
|
|||
|
|
{id = 3, url = 'base/main_poker/bg/bg1', thumb = 'ui://Main_Poker/bg1'}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
-- settingViewType:1跑得快:显示换牌,隐藏返回和解散 2超级拼十:隐藏解散和换牌 3其他:隐藏换牌,根据是否观战显示解散和返回
|
|||
|
|
-- ex_defaultbg 自定义默认背景编号
|
|||
|
|
-- ex_bgconfig 自定义的背景
|
|||
|
|
function M:InitView(url, isHideIpAdds, settingViewType, ex_defaultbg, ex_bgconfig, isHideJiesan,settingUrl)
|
|||
|
|
printlog("11111111111111111111")
|
|||
|
|
UIPackage.AddPackage('base/main_poker/ui/Main_Poker')
|
|||
|
|
MainView.InitView(self, url, isHideIpAdds)
|
|||
|
|
local _view = self._view
|
|||
|
|
local default_bg = ex_defaultbg or pk_default_bg
|
|||
|
|
local bg_config = ex_bgconfig or pk_bg_config
|
|||
|
|
TableBG.LoadTableBG(default_bg, self._room.game_id, self._root_view, bg_config)
|
|||
|
|
local rightpanel = self._view:GetChild('right_panel')
|
|||
|
|
if rightpanel then
|
|||
|
|
self._rightPanelView = MainRightPanelView.new(self, rightpanel)
|
|||
|
|
end
|
|||
|
|
end
|
|||
|
|
|
|||
|
|
-- 设置界面的换牌回调,需要换牌的玩法settingViewType传1,重写这个方法
|
|||
|
|
function M:UpdateCard(index)
|
|||
|
|
end
|
|||
|
|
|
|||
|
|
function M:UpdateCardSize(index)
|
|||
|
|
end
|
|||
|
|
|
|||
|
|
function M:Destroy()
|
|||
|
|
UIPackage.RemovePackage('base/main_poker/ui/Main_Poker')
|
|||
|
|
MainView.Destroy(self)
|
|||
|
|
end
|
|||
|
|
|
|||
|
|
return M
|