2025-05-07 10:29:37 +08:00
|
|
|
---
|
|
|
|
|
--- Created by 谌建军.
|
|
|
|
|
--- DateTime: 2017/12/13 17:04
|
|
|
|
|
---
|
2025-05-15 16:49:18 +08:00
|
|
|
|
|
|
|
|
local TipType = {
|
|
|
|
|
guo = 0,
|
|
|
|
|
qi = 1,
|
|
|
|
|
xia = 4
|
|
|
|
|
}
|
|
|
|
|
|
2025-05-14 10:59:30 +08:00
|
|
|
local EXPlayerPokerInfoView = import('.EXPlayerPokerInfoView')
|
|
|
|
|
local EXCardType = import('.EXCardType')
|
|
|
|
|
local EXCardCheck = import(".CardCheck")
|
2025-05-07 10:29:37 +08:00
|
|
|
|
2025-05-14 10:59:30 +08:00
|
|
|
local EXPlayerSelfPokerInfoView = {
|
2025-05-07 10:29:37 +08:00
|
|
|
_view = nil,
|
|
|
|
|
_mainView = nil,
|
|
|
|
|
_mask_liangpai = nil
|
|
|
|
|
}
|
|
|
|
|
|
2025-05-14 10:59:30 +08:00
|
|
|
local M = EXPlayerSelfPokerInfoView
|
2025-05-07 10:29:37 +08:00
|
|
|
|
|
|
|
|
function M.new(view, mainView)
|
2025-05-14 10:59:30 +08:00
|
|
|
setmetatable(M, { __index = EXPlayerPokerInfoView })
|
2025-05-07 10:29:37 +08:00
|
|
|
local self = setmetatable({}, { __index = M })
|
|
|
|
|
self._view = view
|
|
|
|
|
self._mainView = mainView
|
|
|
|
|
self.gameCtr = ControllerManager.GetController(GameController)
|
|
|
|
|
self:init()
|
|
|
|
|
return self
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function M:init()
|
2025-05-15 16:49:18 +08:00
|
|
|
local view = self._view
|
2025-05-14 10:59:30 +08:00
|
|
|
EXPlayerPokerInfoView.init(self)
|
2025-05-15 16:49:18 +08:00
|
|
|
|
|
|
|
|
self._view_tipsList = view:GetChild('list_tips')
|
2025-05-15 17:01:19 +08:00
|
|
|
self._view_tipsList.onClickItem:Set(function(context)
|
|
|
|
|
self:OnClickTips(context)
|
|
|
|
|
end)
|
2025-05-15 16:49:18 +08:00
|
|
|
|
|
|
|
|
self._ctr_out = view:GetController('out')
|
2025-05-07 10:29:37 +08:00
|
|
|
end
|
|
|
|
|
|
2025-05-15 16:49:18 +08:00
|
|
|
function M:ShowTips(type)
|
|
|
|
|
self._ctr_out.selectedIndex = 1
|
|
|
|
|
if type == 1 then
|
|
|
|
|
self._view_tipsList:RemoveChildren()
|
|
|
|
|
local obj = self._view_tipsList:AddItemFromPool()
|
|
|
|
|
self.SetTipData(obj, TipType.qi)
|
|
|
|
|
local obj = self._view_tipsList:AddItemFromPool()
|
|
|
|
|
self.SetTipData(obj, TipType.xia)
|
|
|
|
|
end
|
|
|
|
|
end
|
2025-05-07 10:29:37 +08:00
|
|
|
|
2025-05-15 17:01:19 +08:00
|
|
|
function M:OnClickTips(context)
|
|
|
|
|
local type = context.data.data.type
|
|
|
|
|
if type == TipType.guo then
|
|
|
|
|
elseif type == TipType.qi then
|
|
|
|
|
self:ClickTipQi()
|
|
|
|
|
elseif type == TipType.xia then
|
|
|
|
|
self:ClickTipXia()
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function M:ClickTipQi()
|
|
|
|
|
self._gameCtr:SendTipQi()
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function M:ClickTipXia()
|
|
|
|
|
self._gameCtr:SendTipXia()
|
|
|
|
|
end
|
|
|
|
|
|
2025-05-15 16:49:18 +08:00
|
|
|
function M.SetTipData(obj, type)
|
|
|
|
|
obj.data = {}
|
|
|
|
|
obj.data.type = type
|
|
|
|
|
obj:GetController('type').selectedIndex = type
|
2025-05-07 10:29:37 +08:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function M:Clear()
|
2025-05-14 10:59:30 +08:00
|
|
|
EXPlayerPokerInfoView.Clear(self)
|
2025-05-07 10:29:37 +08:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
return M
|