Beispiel #1
0
 public void setData(ConfChatItem partdata)
 {
     if (partdata == null)
     {
         return;
     }
     m_partdata = partdata;
     if (m_partdata.icon.Contains("${player_icon}"))
     {
         //if (!GlobalInfo.MY_PLAYER_INFO.PlayerIcon.Contains("http") && !GlobalInfo.MY_PLAYER_INFO.PlayerIcon.Contains("https"))
         //    m_icon_tex.TextureName = CommonData.GetBigPortrait(GlobalInfo.MY_PLAYER_INFO.PlayerIcon);
         //else
         //    m_icon_tex.TextureName = "image_player_size4_1.png";
         m_icon_tex.SpineName = CommonData.GetSpineHead(GlobalInfo.MY_PLAYER_INFO.PlayerIcon);
         m_isSpine            = true;
         //this.m_icon_tex.Visible = true;
         //m_icon_texture.Visible = false;
     }
     else
     {
         if (m_partdata.icon.Contains(".png"))
         {
             m_icon_texture.TextureName = m_partdata.icon;
             m_isSpine = false;
             //m_icon_texture.Visible = true;
             //this.m_icon_tex.Visible = false;
         }
         else
         {
             m_icon_tex.SpineName = m_partdata.icon.Trim();
             m_isSpine            = true;
             //m_icon_tex.Visible = true;
             //this.m_icon_texture.Visible = false;
         }
     }
     //m_icon_tex.PlayAnimation(string.Empty,true);
     setPartType(m_partdata.jumptype);
     m_curType = m_partdata.jumptype;
     if (m_partdata.jumptype == 0)
     {
         //文字
         string temp = LocalizeModule.Instance.GetString(m_partdata.content);
         TalkContent = temp;
         //m_noContent_lab.Text = temp;
         int   line         = GetLineForText(temp);
         float fonts_height = (line + 2) * fontSize;
         m_textRoot_obj.Widget.sizeDelta = new Vector2(m_textRoot_obj.Widget.sizeDelta.x, fonts_height);
     }
     else
     {
         m_chooseContent_lab.Text = LocalizeModule.Instance.GetString(m_partdata.content);
         if (m_partdata.jumptype == 2)
         {
             setTextChoose();
         }
         else if (m_partdata.jumptype == 1)
         {
             setImgChoose();
         }
     }
 }