找回密码
 立即注册
查看: 4146|回复: 91

[插件] ezgui如何控制clone的 scrolllist中text的属性

  [复制链接]
发表于 2012-10-7 22:46 | 显示全部楼层 |阅读模式
资源信息 Tutorial Information
教程名称: ezgui如何控制clone的 scrolllist中text的属性(发帖教程)
适用引擎:   (适用引擎,为空默认为Unity)
教程语种: English
教程等级: 1
教程格式: 图文(请用IE9以上浏览器访问本版块)
教程作者: 多米诺 (如有问题请短消息联系作者或发表回复)
下载地址: (兑换积分)
点击查看原图
美丽分割线
直接上图
  1. public class ScrollController : MonoBehaviour {
  2. public UIScrollList list;
  3. public GameObject itemObject;
  4. public GameObject testitemObject;
  5. public int roomCount;

  6. private string url="[url=http://*****/nn.aspx]http://*****/nn.aspx[/url]";
  7. private string txt_Name="";
  8. private string txt_Score="10000";
  9. private string txt_Message="nnn";
  10. string abc="";
  11. //public GameObject temp;
  12. // Use this for initialization
  13. void Start () {
  14.   
  15.   StartCoroutine(InsertMethod());
  16.   
  17. }

  18. // Update is called once per frame
  19. void Update () {

  20. }
  21. IEnumerator InsertMethod()
  22. {
  23.   //txt_Name=txtfield.Text;
  24.   //print (txt_Name);
  25.   WWWForm form=new WWWForm();
  26.   form.AddField("post_name",txt_Name);
  27.   form.AddField("post_score",txt_Score);
  28.   form.AddField("post_message",txt_Message);
  29.   WWW w=new WWW(url,form);
  30.          yield return w;
  31.   print (w.text);
  32.   abc=w.text;
  33.   //str.Substring(0,str.IndexOf("字符")+1);
  34.   for(int i=0;i<1;i++)
  35.   {
  36.    UIListItem item=(UIListItem)list.CreateItem(itemObject,abc);//i*1+"\n"+w.text);//.Substring(0,w.text.IndexOf("<%@ P")+1));
  37.    item.data=(i+1)*10;
  38.   }
  39.   list.SetSelectedItem(0);
  40.   
  41.   print (w.text);
  42.   //return null;
  43.   
  44. }
  45. }
复制代码

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×

评分

参与人数 2鲜花 +2 收起 理由
1287537617aa + 1
aa1287537617 + 1

查看全部评分

发表于 2012-10-13 12:52 | 显示全部楼层
我只是路过打酱油的。{:5_399:}{:5_399:}{:5_399:}
发表于 2017-2-24 18:45 | 显示全部楼层
很不错
发表于 2017-2-24 19:07 | 显示全部楼层
顶顶多好
发表于 2017-2-24 18:34 | 显示全部楼层
难得一见的好帖
发表于 2017-2-24 19:17 | 显示全部楼层
说的非常好
发表于 2017-2-24 18:43 | 显示全部楼层
LZ真是人才
发表于 2017-3-25 11:38 | 显示全部楼层
很不错
发表于 2017-3-25 12:13 | 显示全部楼层
好帖就是要顶
发表于 2017-3-25 11:32 | 显示全部楼层
真心顶
懒得打字嘛,点击右侧快捷回复 【右侧内容,后台自定义】
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Unity开发者联盟 ( 粤ICP备20003399号 )

GMT+8, 2024-4-24 09:29 , Processed in 0.102962 second(s), 32 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表