diff --git a/lua_probject/extend_project/extend/majiang/lichuan/EXWitnessView.lua b/lua_probject/extend_project/extend/majiang/lichuan/EXWitnessView.lua index 682c51a5..4e42639f 100644 --- a/lua_probject/extend_project/extend/majiang/lichuan/EXWitnessView.lua +++ b/lua_probject/extend_project/extend/majiang/lichuan/EXWitnessView.lua @@ -84,10 +84,11 @@ function M:InitView(url) for i = 1, #room.player_list do local p = room.player_list[i] local index = self:GetPos(p.seat) + print("lingmeng index", index) local info = self._player_info[index] local tem = self._view:GetChild("player_card_info" .. index) + _player_card_info[index] = self:NewMJPlayerCardInfoView(tem, index) local cardInfo = _player_card_info[index] - cardInfo = self:NewMJPlayerCardInfoView(tem, index) cardInfo:SetPlayer(p) cardInfo:UpdateHandCardWitness(false) cardInfo:UpdateOutCardList(nil, nil, self._cursor) @@ -166,14 +167,21 @@ function M:EventInit() local _gcm_outcard_url = "ui://Main_Majiang/Gcm_OutCard" _gamectr:AddEventListener(TX_GameEvent.OutCard, function(...) + print("lingmeng witness OutCard") self._left_time = 0 local arg = { ... } local p = arg[1] local card = arg[2] local seat = p.seat local info = self._player_card_info[self:GetPos(seat)] + print("lingmeng witness OutCard1", self:GetPos(seat), info) + self:RemoveCursor() + print("lingmeng witness OutCard1-2") + info:UpdateHandCardWitness(false) + print("lingmeng witness OutCard2") + info:UpdateOutCardList(nil, nil, self._cursor) print("ling 2zhihouq") self:PlaySound("LiChuan_MJ", p.self_user.sex, tostring(card)) diff --git a/lua_probject/main_project/main/majiang/MJMainView.lua b/lua_probject/main_project/main/majiang/MJMainView.lua index 5af169f2..9d4cb269 100644 --- a/lua_probject/main_project/main/majiang/MJMainView.lua +++ b/lua_probject/main_project/main/majiang/MJMainView.lua @@ -509,9 +509,9 @@ function M:NewMJPlayerCardInfoView(view, index) end function M:RemoveCursor() - if self._cursor.parent then - self._cursor.parent:GetController("color").selectedIndex = 0 - end + -- if self._cursor.parent then + -- self._cursor.parent:GetController("color").selectedIndex = 0 + -- end self._cursor:RemoveFromParent() end diff --git a/lua_probject/main_project/main/majiang/MJPlayerCardInfoView.lua b/lua_probject/main_project/main/majiang/MJPlayerCardInfoView.lua index 5addd5a5..0854e0cc 100644 --- a/lua_probject/main_project/main/majiang/MJPlayerCardInfoView.lua +++ b/lua_probject/main_project/main/majiang/MJPlayerCardInfoView.lua @@ -135,11 +135,13 @@ function M:UpdateHandCard(getcard, mp) end function M:UpdateHandCardWitness(getcard, isSelf) + print("lingmeng UpdateHandCardWitness") getcard = getcard or false isSelf = isSelf or false self._view_handCardList:RemoveChildren() self._view_getCard:RemoveChildren() + print("lingmeng UpdateHandCardWitness1") for i = 0, self._player.hand_left_count - 1 do local btn_card @@ -152,8 +154,12 @@ function M:UpdateHandCardWitness(getcard, isSelf) self:FillWitnessCard(btn_card) end end + print("lingmeng UpdateHandCardWitness2") + self._view_handCardList.touchable = false self._view_getCard.touchable = false + print("lingmeng UpdateHandCardWitness3") + self._ctr_getCard.selectedIndex = getcard and 1 or 0 end