From 62c85471b91c1a917089110ffb21155c458793f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BD=97=E5=AE=B6=E7=82=9C?= <2029049582@qq.com> Date: Wed, 7 May 2025 15:50:59 +0800 Subject: [PATCH] =?UTF-8?q?=E9=BB=98=E8=AE=A4=E5=88=AB=E4=BA=BA=E5=87=BA?= =?UTF-8?q?=E7=89=8C=E5=85=B3=E9=97=AD=E5=87=BA=E7=89=8C=EF=BC=8C=E7=AD=89?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E5=87=BA=E7=89=8C=E6=88=96=E8=80=85=E5=BC=B9?= =?UTF-8?q?=E8=B5=B7=E7=9A=84=E7=89=8C=E7=AC=A6=E5=90=88=E7=89=8C=E5=9E=8B?= =?UTF-8?q?=E5=BC=80=E5=90=AF=E5=87=BA=E7=89=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../runfast/RunFast_PlayerSelfPokerInfoView.lua | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/lua_probject/extend_project/extend/poker/runfast/RunFast_PlayerSelfPokerInfoView.lua b/lua_probject/extend_project/extend/poker/runfast/RunFast_PlayerSelfPokerInfoView.lua index 507ce4f3..aeb15352 100644 --- a/lua_probject/extend_project/extend/poker/runfast/RunFast_PlayerSelfPokerInfoView.lua +++ b/lua_probject/extend_project/extend/poker/runfast/RunFast_PlayerSelfPokerInfoView.lua @@ -746,7 +746,6 @@ function M:TouchMoveEnd(context) table.sort(send_card, tableSortNumber) send_card = #xuan_card > 0 and xuan_card or send_card self._cardCheck:initCards(send_card, #xuan_card > 0, #send_card == self._view_handCard.numItems) - print("lingmengthis?") self._ctr_canSendCard.selectedIndex = self._cardCheck:CheckCards() and 1 or 0 else self._ctr_canSendCard.selectedIndex = 0 @@ -796,9 +795,10 @@ function M:ShowOutCardOption(ctr_select, type, number, length, mustPutMaxCard, p self.tips_click_count = 0 self.send_card = {} self.tips_card_list = self:GetCardTips(type, number, length, mustPutMaxCard) + self._ctr_canSendCard.selectedIndex = 0 if #self.tips_card_list >= 1 then - -- body + -- body --在这个方法里添加判断抬起牌是否符合出牌类型(少跑一次手牌循环) self:UpdateHandCardsColor() end -- @@ -1032,10 +1032,21 @@ end -- function M:UpdateHandCardsColor() + local send_card = {} for i = 1, #self.card_list do local card_view = self.card_list[i] local num = card_view.btn_card.touchable == true and 0 or 1 self:SetBtnCardColor(card_view, num) + if card_view.btn_card.selected and card_view.btn_card.touchable then + table.insert(send_card, card_view) + end + end + if #send_card > 0 then + table.sort(send_card, tableSortNumber) + self._cardCheck:initCards(send_card, false, #send_card == self._view_handCard.numItems) + self._ctr_canSendCard.selectedIndex = self._cardCheck:CheckCards() and 1 or 0 + else + self._ctr_canSendCard.selectedIndex = 0 end end @@ -1069,7 +1080,6 @@ function M:BtnEvent() self:ErrorTip('请选择要出的牌') else self.gameCtr:SendCard(send_card, currentCard) - self._ctr_canSendCard.selectedIndex = 0 end end )