hengyang_client/lua_probject/extend_project/extend/poker2/suoha/ExPlayerSelfPokerInfoView.lua

65 lines
1.4 KiB
Lua
Raw Normal View History

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')
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 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