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 )