Ejemplo n.º 1
0
    void Start()
    {
        _wm        = LSingleton.getInstance("LWindowManager") as LWindowManager;
        _teddyAnim = GameObject.Find("Teddy").GetComponent <Animator>();

        btn_msg.onClick.AddListener(() =>
        {
            _wm.runWindow("MsgBox", WindowHierarchy.Normal);
        });

        btn_trans.onClick.AddListener(() =>
        {
            SceneManager.LoadScene("first");
        });

        btn_anim.onClick.AddListener(() =>
        {
            _teddyAnim.SetBool("run_idle", false);
            _teddyAnim.SetBool("idle_run", true);
        });

        btn_clean.onClick.AddListener(() =>
        {
            _teddyAnim.SetBool("idle_run", false);
            _teddyAnim.SetBool("run_idle", true);
        });
    }
Ejemplo n.º 2
0
    void Start() {

        wm = LSingleton.getInstance("LWindowManager") as LWindowManager;
        teddyAnim = GameObject.Find("Teddy").GetComponent<Animator>();

        btn_msg.onClick.AddListener(() =>
        {
            wm.runWindow("MsgBox", typeof(MsgBox), WindowHierarchy.Normal);
        });

        btn_trans.onClick.AddListener(() =>
        {
            Application.LoadLevel("first");
        });

        btn_anim.onClick.AddListener(() =>
        {
            teddyAnim.SetBool("run_idle", false);
            teddyAnim.SetBool("idle_run", true);
        });

        btn_clean.onClick.AddListener(() =>
        {
            teddyAnim.SetBool("idle_run", false);
            teddyAnim.SetBool("run_idle", true);
        });
	}
Ejemplo n.º 3
0
 static public int runWindow(IntPtr l)
 {
     try {
         LWindowManager self = (LWindowManager)checkSelf(l);
         System.String  a1;
         checkType(l, 2, out a1);
         WindowHierarchy a2;
         checkEnum(l, 3, out a2);
         System.Collections.ArrayList a3;
         checkType(l, 4, out a3);
         self.runWindow(a1, a2, a3);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Ejemplo n.º 4
0
    void Start()
    {
        _wm        = LWindowManager.GetInstance();
        _teddyAnim = GameObject.Find("Teddy").GetComponent <Animator>();

        btn_msg.onClick.AddListener(() =>
        {
            LLoadBundle.GetInstance().LoadAllBundles(new string[] {
                "prefabs-msgbox_prefab.ab",
                "atlas-face_png.ab"
            }, () =>
            {
                _wm.runWindow("Prefabs/MsgBox.prefab", WindowHierarchy.Normal);
            });
        });

        btn_trans.onClick.AddListener(() =>
        {
            LLoadBundle.GetInstance().LoadAllBundles(new string[] {
                "atlas-face_png.ab"
            }, () =>
            {
                _wm.LoadScene("first");
            });
        });

        btn_anim.onClick.AddListener(() =>
        {
            _teddyAnim.SetBool("run_idle", false);
            _teddyAnim.SetBool("idle_run", true);
        });

        btn_clean.onClick.AddListener(() =>
        {
            _teddyAnim.SetBool("idle_run", false);
            _teddyAnim.SetBool("run_idle", true);
        });

        touch_view.onClickHandler2D = (GameObject obj) => {
            Debug.Log(obj.name);
        };
    }
Ejemplo n.º 5
0
    void Start()
    {
        wm = LSingleton.getInstance("LWindowManager") as LWindowManager;

        btn_grid.onClick.AddListener(() =>
        {
            ArrayList list = new ArrayList();
            list.Add(123);
            list.Add("测试内容");
            wm.runWindow("WindowGridView", WindowHierarchy.Normal, list);
        });

        btn_trans.onClick.AddListener(() =>
        {
            SceneManager.LoadScene("second");
        });

        btn_guide.onClick.AddListener(() =>
        {
            guideLayer.gameObject.SetActive(!guideLayer.gameObject.activeInHierarchy);
        });

        ctrlView.onControlHandler = (float ox, float oy) =>
        {
            Debug.Log(string.Format("offsetX={0} offsetY={1}", ox, oy));
        };

        scrolView.onMoveCompleteHandler = () =>
        {
            Debug.Log(" scrolView.onMoveCompleteHandler ");
        };

        tblView.cellsSize         = new Vector2(150, 40);
        tblView.cellTemplate.node = Resources.Load("Prefabs/tbl_cell") as GameObject;
        tblView.GetComponent <RectTransform>().sizeDelta = new Vector2(150, 40 * 5);
        tblView.cellsCount = 100;
        tblView.onDataSourceAdapterHandler = (LTableViewCell cell, int idx) =>
        {
            if (cell == null)
            {
                cell      = new LTableViewCell();
                cell.node = (GameObject)Instantiate(tblView.cellTemplate.node);
            }
            cell.node.GetComponent <Text>().text = idx.ToString();
            return(cell);
        };
        tblView.reloadData();

        rtfView.insertElement("hello world!!", Color.blue, 25, true, false, Color.blue, "数据");
        rtfView.insertElement("测试文本内容!!", Color.red, 15, false, true, Color.blue, "");
        rtfView.insertElement("Image/face01", 5f, "");
        rtfView.insertElement("The article comes from the point of the examination", Color.green, 15, true, false, Color.blue, "");
        rtfView.insertElement("Image/face02/1", "");
        rtfView.insertElement(1);
        rtfView.insertElement("outline and newline", Color.yellow, 20, false, true, Color.blue, "");
        rtfView.onClickHandler = (string data) =>
        {
            Debug.Log("data " + data);
        };
        rtfView.reloadData();

        pageView.cellsSize                  = new Vector2(150, 100);
        pageView.cellTemplate.node          = Resources.Load("Prefabs/page_cell") as GameObject;
        pageView.cellsCount                 = 14;
        pageView.onDataSourceAdapterHandler = (LTableViewCell cell, int idx) =>
        {
            if (cell == null)
            {
                cell      = new LTableViewCell();
                cell.node = (GameObject)Instantiate(pageView.cellTemplate.node, Vector3.zero, pageView.cellTemplate.node.transform.rotation);
            }
            cell.node.transform.FindChild("Text").GetComponent <Text>().text = idx.ToString();
            return(cell);
        };
        pageView.onPageChangedHandler = (int pageIdx) =>
        {
            Debug.Log("page " + pageIdx);
        };
        pageView.reloadData();

        RectTransform rtran = listView.GetComponent <RectTransform>();

        listView.bounceBox = new Rect(listView.transform.position.x,
                                      listView.transform.position.y,
                                      rtran.rect.width,
                                      rtran.rect.height);

        listView.itemTemplate = Resources.Load("Prefabs/list_cell") as GameObject;
        listView.limitNum     = 10; //not must to set limitNum
        for (int i = 0; i < 30; i++)
        {
            GameObject item = listView.dequeueItem();
            item.GetComponent <RectTransform>().sizeDelta = new Vector2(100, 40 + Random.Range(0, 40));
            item.GetComponent <Text>().text = i.ToString();
            listView.insertNodeAtLast(item);
        }
        listView.reloadData();

        gridView.cellsSize         = new Vector2(100, 100);
        gridView.cellTemplate.node = Resources.Load("Prefabs/grid_cell") as GameObject;
        gridView.cols       = 4;
        gridView.cellsCount = 100;
        gridView.onDataSourceAdapterHandler = (LGridViewCell cell, int idx) =>
        {
            if (cell == null)
            {
                cell      = new LGridViewCell();
                cell.node = (GameObject)Instantiate(gridView.cellTemplate.node);
            }
            cell.node.GetComponent <Text>().text = idx.ToString();
            return(cell);
        };
        gridView.reloadData();
    }
Ejemplo n.º 6
0
    void Start()
    {
        _wm = LWindowManager.GetInstance();

        btn_grid.onClick.AddListener(() =>
        {
            object[] list = new object[] { 123, "测试内容" };
            _wm.runWindow("Prefabs/WindowGridView.prefab", WindowHierarchy.Normal, list);
        });

        btn_trans.onClick.AddListener(() =>
        {
            _wm.LoadSceneAsync("second", (float p) =>
            {
                Debug.Log("进度 " + p);
            });
        });

        btn_guide.onClick.AddListener(() =>
        {
            bool isBlock = panel_root.GetComponent <CanvasGroup>().blocksRaycasts;
            panel_root.GetComponent <CanvasGroup>().blocksRaycasts = !isBlock;
            Text textComp = btn_guide.transform.FindChild("Text").gameObject.GetComponent <Text>();
            textComp.text = isBlock ? "关闭遮罩" : "开启遮罩";
        });

        ctrlView.onControlHandler = (float ox, float oy, bool isFinish) =>
        {
            //Debug.Log(string.Format("offsetX={0} offsetY={1}", ox, oy));
        };

        scrolView.onMoveCompleteHandler = () =>
        {
            Debug.Log(" scrolView.onMoveCompleteHandler ");
        };

        tblView.cellsSize = new Vector2(150, 40);
        tblView.GetComponent <RectTransform>().sizeDelta = new Vector2(150, 40 * 5);
        tblView.cellsCount = 100;
        tblView.SetCellHandle((int idx, GameObject obj) =>
        {
            obj.GetComponent <Text>().text = idx.ToString();
        });
        tblView.reloadData();

        //rtfView.insertElement("hello world!!", Color.blue, 25, true, false, Color.blue, "数据");
        //rtfView.insertElement("测试文本内容!!", Color.red, 15, false, true, Color.blue, "");
        //rtfView.insertElement("Atlas/face/01", 5f, "");
        //rtfView.insertElement("The article comes from the point of the examination", Color.green, 15, true, false, Color.blue, "");
        //		rtfView.insertElement("Atlas/face/0201.png", "");
        //rtfView.insertElement(1);
        //rtfView.insertElement("outline and newline", Color.yellow, 20, false, true, Color.blue, "");
        rtfView.parseRichDefaultString(
            "<lab txt=\"hello world!!\" color=#ffff00 data=数据 />" +
            "<lab txt=\"测试文本内容\" isUnderLine=true size=40/><anim path=Atlas/face/01 fps=5.0/>" +
            "<newline /><img path=Atlas/face/0201/>" +
            "<lab txt=\"The article comes from the point of the \" color=#ff0000 />" +
            "<lab txt=\"Examination\" color=#ff0000 isOutLine=true/>");
        rtfView.onClickHandler = (string data) =>
        {
            Debug.Log("data " + data);
        };
        //rtfView.reloadData();

        pageView.cellsSize  = new Vector2(150, 100);
        pageView.cellsCount = 14;
        pageView.SetCellHandle((int idx, GameObject obj) =>
        {
            obj.transform.FindChild("Text").GetComponent <Text>().text = idx.ToString();
        });
        pageView.onPageChangedHandler = (int pageIdx) =>
        {
            Debug.Log("page " + pageIdx);
        };
        pageView.reloadData();

        listView.limitNum = 10; //not must to set limitNum
        for (int i = 0; i < 30; i++)
        {
            GameObject item = listView.dequeueItem(1);
            item.GetComponent <RectTransform>().sizeDelta = new Vector2(100, 40 + Random.Range(0, 40));
            item.GetComponent <Text>().text = i.ToString();
            listView.insertNodeAtLast(item);
        }
        listView.reloadData();

        expandView.nodeNum     = 20;
        expandView.nodeItemNum = 1;
        expandView.prepare();
        expandView.expand(0);
        expandView.expand(1);
        expandView.reloadData();

        gridView.cellsSize  = new Vector2(100, 100);
        gridView.cols       = 4;
        gridView.cellsCount = 100;
        gridView.SetCellHandle((int idx, GameObject obj) =>
        {
            obj.GetComponent <Text>().text = idx.ToString();
        });
        gridView.reloadData();

        progView.setValue(10);
        progView.startProgress(80, 1.0f);

        tbl_drag.onPickBeginHandler = (GameObject obj) => {
            dragSelect.SetActive(true);
            dragSelect.transform.position = obj.transform.position;
            dragSelect.transform.Find("sprite").GetComponent <Image>().sprite = obj.GetComponent <Image>().sprite;
        };

        tbl_drag.onPickIngHandler = (Vector3 position) => {
            dragSelect.transform.position = position;
        };

        tbl_drag.onPickEndHandler = (GameObject obj) =>
        {
            dragSelect.SetActive(false);
            GameObject dragTarget = null;
            for (int i = 0; i < 3; i++)
            {
                GameObject drag = GameObject.Find("drag" + (i + 1));
                if (Vector2.Distance(drag.transform.position, dragSelect.transform.position) < 50)
                {
                    dragTarget = drag;
                    break;
                }
            }
            if (dragTarget != null)
            {
                Sprite oldSprite = obj.GetComponent <Image>().sprite;
                obj.GetComponent <Image>().sprite = dragTarget.transform.Find("sprite").GetComponent <Image>().sprite;
                dragTarget.transform.Find("sprite").GetComponent <Image>().sprite = oldSprite;
            }
        };

        tbl_drag.SetCellHandle((int idx, GameObject obj) =>
        {
        });
        tbl_drag.reloadData();
    }
Ejemplo n.º 7
0
    void Start()
    {
        wm = LSingleton.getInstance("LWindowManager") as LWindowManager;

        btn_grid.onClick.AddListener(() =>
        {
            ArrayList list = new ArrayList();
            list.Add(123);
            list.Add("测试内容");
            wm.runWindow("WindowGridView", WindowHierarchy.Normal, list);
        });

        btn_trans.onClick.AddListener(() =>
        {
            SceneManager.LoadScene("second");
        });

        btn_guide.onClick.AddListener(() =>
        {
            guideLayer.gameObject.SetActive(!guideLayer.gameObject.activeInHierarchy);
        });

        ctrlView.onControlHandler = (float ox, float oy) =>
        {
            Debug.Log(string.Format("offsetX={0} offsetY={1}", ox, oy));
        };

        scrolView.onMoveCompleteHandler = () =>
        {
            Debug.Log(" scrolView.onMoveCompleteHandler ");
        };

        tblView.cellsSize = new Vector2(150, 40);
        tblView.cellTemplate.node = Resources.Load("Prefabs/tbl_cell") as GameObject;
        tblView.GetComponent<RectTransform>().sizeDelta = new Vector2(150, 40 * 5);
        tblView.cellsCount = 100;
        tblView.onDataSourceAdapterHandler = (LTableViewCell cell, int idx) =>
        {
            if (cell == null)
            {
                cell = new LTableViewCell();
                cell.node = (GameObject)Instantiate(tblView.cellTemplate.node);
            }
            cell.node.GetComponent<Text>().text = idx.ToString();
            return cell;
        };
        tblView.reloadData();

        rtfView.insertElement("hello world!!", Color.blue, 25, true, false, Color.blue, "数据");
        rtfView.insertElement("测试文本内容!!", Color.red, 15, false, true, Color.blue, "");
        rtfView.insertElement("Image/face01", 5f, "");
        rtfView.insertElement("The article comes from the point of the examination", Color.green, 15, true, false, Color.blue, "");
        rtfView.insertElement("Image/face02/1", "");
        rtfView.insertElement(1);
        rtfView.insertElement("outline and newline", Color.yellow, 20, false, true, Color.blue, "");
        rtfView.onClickHandler = (string data) =>
        {
            Debug.Log("data " + data);
        };
        rtfView.reloadData();

        pageView.cellsSize = new Vector2(150, 100);
        pageView.cellTemplate.node = Resources.Load("Prefabs/page_cell") as GameObject;
        pageView.cellsCount = 14;
        pageView.onDataSourceAdapterHandler = (LTableViewCell cell, int idx) =>
        {
            if (cell == null)
            {
                cell = new LTableViewCell();
                cell.node = (GameObject)Instantiate(pageView.cellTemplate.node, Vector3.zero, pageView.cellTemplate.node.transform.rotation);
            }
            cell.node.transform.FindChild("Text").GetComponent<Text>().text = idx.ToString();
            return cell;
        };
        pageView.onPageChangedHandler = (int pageIdx) =>
        {
            Debug.Log("page " + pageIdx);
        };
        pageView.reloadData();

        RectTransform rtran = listView.GetComponent<RectTransform>();
        listView.bounceBox = new Rect(listView.transform.position.x,
                             listView.transform.position.y,
                             rtran.rect.width,
                             rtran.rect.height);

        listView.itemTemplate = Resources.Load("Prefabs/list_cell") as GameObject;
        listView.limitNum = 10; //not must to set limitNum
        for (int i = 0; i < 30; i++)
        {
            GameObject item = listView.dequeueItem();
            item.GetComponent<RectTransform>().sizeDelta = new Vector2(100, 40 + Random.Range(0, 40));
            item.GetComponent<Text>().text = i.ToString();
            listView.insertNodeAtLast(item);
        }
        listView.reloadData();

        gridView.cellsSize = new Vector2(100, 100);
        gridView.cellTemplate.node = Resources.Load("Prefabs/grid_cell") as GameObject;
        gridView.cols = 4;
        gridView.cellsCount = 100;
        gridView.onDataSourceAdapterHandler = (LGridViewCell cell, int idx) =>
        {
            if (cell == null)
            {
                cell = new LGridViewCell();
                cell.node = (GameObject)Instantiate(gridView.cellTemplate.node);
            }
            cell.node.GetComponent<Text>().text = idx.ToString();
            return cell;
        };
        gridView.reloadData();
    }
Ejemplo n.º 8
0
    void Start()
    {
        _wm = LWindowManager.GetInstance();

        btn_grid.onClick.AddListener(() =>
        {
            ArrayList list = new ArrayList();
            list.Add(123);
            list.Add("测试内容");
            _wm.runWindow("WindowGridView", WindowHierarchy.Normal, list);
        });

        btn_trans.onClick.AddListener(() =>
        {
            _wm.LoadSceneAsync("second",(float p)=>
            {
                Debug.Log("进度 " + p);
            });
        });

        btn_guide.onClick.AddListener(() =>
        {
            bool isBlock = panel_root.GetComponent<CanvasGroup>().blocksRaycasts;
            panel_root.GetComponent<CanvasGroup>().blocksRaycasts = !isBlock;
            Text textComp = btn_guide.transform.FindChild("Text").gameObject.GetComponent<Text>();
            textComp.text = isBlock ? "关闭遮罩" : "开启遮罩";
        });

        ctrlView.onControlHandler = (float ox, float oy,bool isFinish) =>
        {
            //Debug.Log(string.Format("offsetX={0} offsetY={1}", ox, oy));
        };

        scrolView.onMoveCompleteHandler = () =>
        {
            Debug.Log(" scrolView.onMoveCompleteHandler ");
        };

        tblView.cellsSize = new Vector2(150, 40);
        tblView.cellTemplate.node = Resources.Load("Prefabs/tbl_cell") as GameObject;
        tblView.GetComponent<RectTransform>().sizeDelta = new Vector2(150, 40 * 5);
        tblView.cellsCount = 100;
        tblView.onDataSourceAdapterHandler = (LTableViewCell cell, int idx) =>
        {
            if (cell == null)
            {
                cell = new LTableViewCell();
                cell.node = (GameObject)Instantiate(tblView.cellTemplate.node);
            }
            cell.node.GetComponent<Text>().text = idx.ToString();
            return cell;
        };
        tblView.reloadData();

        //rtfView.insertElement("hello world!!", Color.blue, 25, true, false, Color.blue, "数据");
        //rtfView.insertElement("测试文本内容!!", Color.red, 15, false, true, Color.blue, "");
        //rtfView.insertElement("face01", 5f, "");
        //rtfView.insertElement("The article comes from the point of the examination", Color.green, 15, true, false, Color.blue, "");
        //rtfView.insertElement("face02/1", "");
        //rtfView.insertElement(1);
        //rtfView.insertElement("outline and newline", Color.yellow, 20, false, true, Color.blue, "");
        rtfView.parseRichDefaultString("<lab txt=\"hello world!!\" color=#ffff00 data=数据 /><lab txt=\"测试文本内容\" isUnderLine=true size=40/><anim path=face01 fps=5.0/><newline /><img path=face02/1/><lab txt=\"The article comes from the point of the examination\" color=#ff0000 />");
        rtfView.onClickHandler = (string data) =>
        {
            Debug.Log("data " + data);
        };
        //rtfView.reloadData();

        pageView.cellsSize = new Vector2(150, 100);
        pageView.cellTemplate.node = Resources.Load("Prefabs/page_cell") as GameObject;
        pageView.cellsCount = 14;
        pageView.onDataSourceAdapterHandler = (LTableViewCell cell, int idx) =>
        {
            if (cell == null)
            {
                cell = new LTableViewCell();
                cell.node = (GameObject)Instantiate(pageView.cellTemplate.node, Vector3.zero, pageView.cellTemplate.node.transform.rotation);
            }
            cell.node.transform.FindChild("Text").GetComponent<Text>().text = idx.ToString();
            return cell;
        };
        pageView.onPageChangedHandler = (int pageIdx) =>
        {
            Debug.Log("page " + pageIdx);
        };
        pageView.reloadData();

        listView.itemTemplate = Resources.Load("Prefabs/list_cell") as GameObject;
        listView.limitNum = 10; //not must to set limitNum
        for (int i = 0; i < 30; i++)
        {
            GameObject item = listView.dequeueItem();
            item.GetComponent<RectTransform>().sizeDelta = new Vector2(100, 40 + Random.Range(0, 40));
            item.GetComponent<Text>().text = i.ToString();
            listView.insertNodeAtLast(item);
        }
        listView.reloadData();

        gridView.cellsSize = new Vector2(100, 100);
        gridView.cellTemplate.node = Resources.Load("Prefabs/grid_cell") as GameObject;
        gridView.cols = 4;
        gridView.cellsCount = 100;
        gridView.onDataSourceAdapterHandler = (LGridViewCell cell, int idx) =>
        {
            if (cell == null)
            {
                cell = new LGridViewCell();
                cell.node = (GameObject)Instantiate(gridView.cellTemplate.node);
            }
            cell.node.GetComponent<Text>().text = idx.ToString();
            return cell;
        };
        gridView.reloadData();
    }
Ejemplo n.º 9
0
    void Start()
    {
        _wm = LWindowManager.GetInstance();

        btn_grid.onClick.AddListener(() =>
        {
            ArrayList list = new ArrayList();
            list.Add(123);
            list.Add("测试内容");
            _wm.runWindow("WindowGridView", WindowHierarchy.Normal, list);
        });

        btn_trans.onClick.AddListener(() =>
        {
            _wm.LoadSceneAsync("second", (float p) =>
            {
                Debug.Log("进度 " + p);
            });
        });

        btn_guide.onClick.AddListener(() =>
        {
            bool isBlock = panel_root.GetComponent <CanvasGroup>().blocksRaycasts;
            panel_root.GetComponent <CanvasGroup>().blocksRaycasts = !isBlock;
            Text textComp = btn_guide.transform.FindChild("Text").gameObject.GetComponent <Text>();
            textComp.text = isBlock ? "关闭遮罩" : "开启遮罩";
        });

        ctrlView.onControlHandler = (float ox, float oy, bool isFinish) =>
        {
            //Debug.Log(string.Format("offsetX={0} offsetY={1}", ox, oy));
        };

        scrolView.onMoveCompleteHandler = () =>
        {
            Debug.Log(" scrolView.onMoveCompleteHandler ");
        };

        tblView.cellsSize         = new Vector2(150, 40);
        tblView.cellTemplate.node = Resources.Load("Prefabs/tbl_cell") as GameObject;
        tblView.GetComponent <RectTransform>().sizeDelta = new Vector2(150, 40 * 5);
        tblView.cellsCount = 100;
        tblView.onDataSourceAdapterHandler = (LTableViewCell cell, int idx) =>
        {
            if (cell == null)
            {
                cell      = new LTableViewCell();
                cell.node = (GameObject)Instantiate(tblView.cellTemplate.node);
            }
            cell.node.GetComponent <Text>().text = idx.ToString();
            return(cell);
        };
        tblView.reloadData();

        //rtfView.insertElement("hello world!!", Color.blue, 25, true, false, Color.blue, "数据");
        //rtfView.insertElement("测试文本内容!!", Color.red, 15, false, true, Color.blue, "");
        //rtfView.insertElement("face01", 5f, "");
        //rtfView.insertElement("The article comes from the point of the examination", Color.green, 15, true, false, Color.blue, "");
        //rtfView.insertElement("face02/1", "");
        //rtfView.insertElement(1);
        //rtfView.insertElement("outline and newline", Color.yellow, 20, false, true, Color.blue, "");
        rtfView.parseRichDefaultString("<lab txt=\"hello world!!\" color=#ffff00 data=数据 /><lab txt=\"测试文本内容\" isUnderLine=true size=40/><anim path=face01 fps=5.0/><newline /><img path=face02/1.png/><lab txt=\"The article comes from the point of the examination\" color=#ff0000 />");
        rtfView.onClickHandler = (string data) =>
        {
            Debug.Log("data " + data);
        };
        //rtfView.reloadData();

        pageView.cellsSize                  = new Vector2(150, 100);
        pageView.cellTemplate.node          = Resources.Load("Prefabs/page_cell") as GameObject;
        pageView.cellsCount                 = 14;
        pageView.onDataSourceAdapterHandler = (LTableViewCell cell, int idx) =>
        {
            if (cell == null)
            {
                cell      = new LTableViewCell();
                cell.node = (GameObject)Instantiate(pageView.cellTemplate.node, Vector3.zero, pageView.cellTemplate.node.transform.rotation);
            }
            cell.node.transform.FindChild("Text").GetComponent <Text>().text = idx.ToString();
            return(cell);
        };
        pageView.onPageChangedHandler = (int pageIdx) =>
        {
            Debug.Log("page " + pageIdx);
        };
        pageView.reloadData();

        listView.itemTemplate = Resources.Load("Prefabs/list_cell") as GameObject;
        listView.limitNum     = 10; //not must to set limitNum
        for (int i = 0; i < 30; i++)
        {
            GameObject item = listView.dequeueItem();
            item.GetComponent <RectTransform>().sizeDelta = new Vector2(100, 40 + Random.Range(0, 40));
            item.GetComponent <Text>().text = i.ToString();
            listView.insertNodeAtLast(item);
        }
        listView.reloadData();

        gridView.cellsSize         = new Vector2(100, 100);
        gridView.cellTemplate.node = Resources.Load("Prefabs/grid_cell") as GameObject;
        gridView.cols       = 4;
        gridView.cellsCount = 100;
        gridView.onDataSourceAdapterHandler = (LGridViewCell cell, int idx) =>
        {
            if (cell == null)
            {
                cell      = new LGridViewCell();
                cell.node = (GameObject)Instantiate(gridView.cellTemplate.node);
            }
            cell.node.GetComponent <Text>().text = idx.ToString();
            return(cell);
        };
        gridView.reloadData();
    }