跑得快结算界面完成

master
罗家炜 2025-04-29 15:48:04 +08:00
parent 1de46b2350
commit fadf1b10da
5 changed files with 80 additions and 20 deletions

View File

@ -189,7 +189,7 @@ function M:LoadConfigToDetail(data)
local returnString = string.format("人数%s人", configData.maxPlayers) local returnString = string.format("人数%s人", configData.maxPlayers)
if configData.jiangma then if configData.jiangma then
returnString = string.format("%s,%s马", returnString, returnString = string.format("%s,%s马", returnString,
configData.jiangma == 0 and "不奖" or string.format("奖%s", configData.jiangma)) configData.jiangma == 0 and "不奖" or string.format("奖%s", configData.jiangma * 2))
end end
if configData.zimo then if configData.zimo then
returnString = string.format("%s,%s", returnString, configData.zimo == 0 and "可点炮,可自摸" or "必须自摸") returnString = string.format("%s,%s", returnString, configData.zimo == 0 and "可点炮,可自摸" or "必须自摸")

View File

@ -189,7 +189,7 @@ function M:LoadConfigToDetail(data)
local returnString = string.format("人数%s人", configData.maxPlayers) local returnString = string.format("人数%s人", configData.maxPlayers)
if configData.jiangma then if configData.jiangma then
returnString = string.format("%s,%s马", returnString, returnString = string.format("%s,%s马", returnString,
configData.jiangma == 0 and "不奖" or string.format("奖%s", configData.jiangma)) configData.jiangma == 0 and "不奖" or string.format("奖%s", configData.jiangma * 2))
end end
if configData.zimo then if configData.zimo then
returnString = string.format("%s,%s", returnString, configData.zimo == 0 and "可点炮,可自摸" or "必须自摸") returnString = string.format("%s,%s", returnString, configData.zimo == 0 and "可点炮,可自摸" or "必须自摸")

View File

@ -188,7 +188,8 @@ end
function M:LoadConfigToDetail(data) function M:LoadConfigToDetail(data)
local configData = json.decode(data) local configData = json.decode(data)
local returnString = string.format("人数%s人,%s马%s%s%s%s%s%s,%s", configData.maxPlayers, local returnString = string.format("人数%s人,%s马%s%s%s%s%s%s,%s", configData.maxPlayers,
configData.jiangma and string.format("奖%d", configData.jiangma) or "不奖", configData.shaozhuang and ",有烧庄" or "", configData.jiangma and string.format("奖%d", configData.jiangma * 2) or "不奖",
configData.shaozhuang and ",有烧庄" or "",
configData.zuoma and ",庄家坐马" or "", configData.zuoma and ",庄家坐马" or "",
configData.zimo and ",只能自摸" or ",自摸可点炮", configData.zimo and ",只能自摸" or ",自摸可点炮",
configData.tuoguan and string.format(",%d秒后自动托管", configData.tuoguan_active_time) or ",不能托管", configData.tuoguan and string.format(",%d秒后自动托管", configData.tuoguan_active_time) or ",不能托管",

View File

@ -18,6 +18,7 @@ function RunFast_ResultView.new(blur_view, data, roomid, over, win_seat, dissolv
--self._blur_view = blur_view --self._blur_view = blur_view
self._gamectr = ControllerManager.GetController(GameController) self._gamectr = ControllerManager.GetController(GameController)
self:init("ui://Extend_Poker_RunFastNew/clearing_new", data, roomid, over, win_seat, dissolve, remaincards) self:init("ui://Extend_Poker_RunFastNew/clearing_new", data, roomid, over, win_seat, dissolve, remaincards)
print("=======================lingmengresult", data, roomid, over, win_seat, dissolve, remaincards)
return self return self
end end
@ -25,30 +26,88 @@ function M:init(url, data, roomid, over, win_seat, dissolve, remaincards)
ResultView.init(self, url, true) ResultView.init(self, url, true)
local room = DataManager.CurrenRoom local room = DataManager.CurrenRoom
self._view:GetController('over').selectedIndex = over self._view:GetController('over').selectedIndex = 0
--按钮功能全部未开放
self._view:GetChild('btn_shareRecord').onClick:Set(function()
ViewUtil.ErrorMsg(self._view, "", "该功能还未开放")
end)
self._view:GetChild('btn_copyRecord').onClick:Set(function()
ViewUtil.ErrorMsg(self._view, "", "该功能还未开放")
end)
------------------
--只有一人直接退,有两人才进正常结算
if not over and #data == 1 then
ViewManager.ChangeView(ViewManager.View_Family)
end
if over == 0 then
self._view:GetChild('btn_nextRound').onClick:Set(function() self._view:GetChild('btn_nextRound').onClick:Set(function()
self:Destroy() self:Destroy()
local _gamectr = ControllerManager.GetController(GameController) local _gamectr = ControllerManager.GetController(GameController)
_gamectr:ConformToNextGame() _gamectr:ConformToNextGame()
end) end)
end
self._view:GetChild('btn_closeRound').onClick:Set(function() self._view:GetChild('btn_closeRound').onClick:Set(function()
ViewManager.ChangeView(ViewManager.View_Family) ViewManager.ChangeView(ViewManager.View_Family)
end) end)
-- self._view:GetController('win').selectedIndex = win_seat == room.self_player.seat self._view:GetController('win').selectedIndex = win_seat == room.self_player.seat and 1 or 0
-- local over0List = self._view:GetChild('list_over0') local over0List = self._view:GetChild('list_over0')
-- over0List:SetVirtual() over0List:SetVirtual()
-- over0List.itemRenderer = function(index, obj) over0List.itemRenderer = function(index, obj)
-- local info = data[index + 1] local info = data[index + 1]
-- local playerInfo = room:GetPlayerBySeat(info.seat) local playerInfo = room:GetPlayerBySeat(info.seat)
-- obj:GetChild('name').text = playerInfo.nick_name obj:GetChild('name').text = playerInfo.self_user.nick_name
-- obj:GetChild('residue').text = #info.handCards obj:GetChild('residue').text = #info.handCards
-- obj:GetChild('bomb').text = playerInfo.nick_name obj:GetChild('bomb').text = info.thisboomnum
-- obj:GetChild('name').text = playerInfo.nick_name obj:GetChild('score').text = info.winscore > 0 and string.format("+%d", info.winscore) or info.winscore
-- end end
over0List.numItems = #data
if over == 1 or (not over and #data == 2) then
self._view:GetChild('text_roomID').text = room.room_id
self._view:GetChild('text_time').text = os.date('%m-%d %H:%M', os.time())
self._view:GetChild('text_groupID').text = room.group_id or 0
for i = 1, #data do
local info = data[i]
local playerInfo = room:GetPlayerBySeat(info.seat)
self:FillPlayerInfoEnd(self._view:GetChild(string.format("comp_playerInfo%d_over1", i)), info, playerInfo)
end
coroutine.start(function()
coroutine.wait(2)
self._view:GetController('over').selectedIndex = 1
end)
end
end
function M:FillPlayerInfoEnd(view, info, playerInfo)
local room = DataManager.CurrenRoom
self:FillPlayerHead(view:GetChild('comp_playerInfo'), playerInfo)
local detailList = view:GetChild('list_detail')
self:FillDetailChild(detailList:AddItemFromPool(), "单局最高得分", info.settle_log.maxscore)
self:FillDetailChild(detailList:AddItemFromPool(), "打出炸弹数", info.settle_log.boomnum)
self:FillDetailChild(detailList:AddItemFromPool(), "胜负局数",
string.format("%d赢%d输", info.settle_log.winnum, room.room_config.Times - info.settle_log.winnum))
self:FillDetailChild(detailList:AddItemFromPool(), "总积分", info.total_score)
end
function M:FillPlayerHead(view, playerInfo)
ImageLoad.Load(playerInfo.self_user.head_url, view:GetChild('btn_head')._iconObject)
view:GetChild('text_name').text = playerInfo.self_user.nick_name
view:GetChild('text|_ID').text = playerInfo.self_user.account_id
end
function M:FillDetailChild(view, title, value)
view:GetChild('text_title').text = title
view:GetChild('text_value').text = value
end end
return M return M