local UITownHomePlayerHeadInteractionView = UIViewClass() function UITownHomePlayerHeadInteractionView:OnOpened(context) self:RegistSystemEvent(EventID.UI_Refresh_SingleInteract, self.UpdateInfo) self:UpdateInfo(context) self:SetPushStyle(LuaConst.PushStyleEnum.CLOSENOTRECOVER) end function UITownHomePlayerHeadInteractionView:UpdateInfo(context) self.acId = context.roleInfo.accid CTL.Character.SetPortraitAndFrame(self.UIHeroHead190, context.roleInfo.portraitId, context.roleInfo.frameId, context.roleInfo.level) end function UITownHomePlayerHeadInteractionView:OnFocusChanged(isFocus) if isFocus == false then CTL.PlayerInteract.CloseSingleInteract() end end function UITownHomePlayerHeadInteractionView:OnButtonClicked(comp) if comp == self.btn_PlayerInteraction then CTL.PlayerInteract.OpenFriendInteractView(self.acId) end end return UITownHomePlayerHeadInteractionView