You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
1.0 KiB

  1. local ChatViewBase=require("luaScript.Views.Room.ChatView")
  2. local CoinChatView = class("CoinChatView", ChatViewBase)
  3. function CoinChatView:ctor(messageList, headInfos, showBtn, isShowVoice)
  4. CoinChatView.super.ctor(self, messageList, headInfos, showBtn, isShowVoice);
  5. end
  6. function CoinChatView:onEnter()
  7. CoinChatView.super.onEnter(self)
  8. self:setBtnVoiceVisible(false)
  9. end
  10. function CoinChatView:onClickPlayerHead(idx, szHead)
  11. playBtnEffect()
  12. local nUserId = app.room:getUserIdByViewId(idx)
  13. local userInfo = app.room:getUserInfo(nUserId)
  14. if nUserId and userInfo then
  15. local headPos = self.headInfos[idx].headPos
  16. local recordTime = 0
  17. if self.playerVoice[idx] then
  18. recordTime = self.playerVoice[idx].recordTime or 0
  19. end
  20. local recordCallback = function(uid) self:replayRecord(uid) end
  21. local view = import("luaScript.Views.CoinRoom.CoinRoomPlayerInfoView"):new(nUserId, userInfo, headPos, szHead, recordTime, recordCallback)
  22. view:setAnchorPoint(cc.p(0.5, 0.5))
  23. app:showWaitDialog(view, 0, true)
  24. end
  25. end
  26. return CoinChatView;