Ejemplo n.º 1
0
 static public int popWindow(IntPtr l)
 {
     try {
         int argc = LuaDLL.lua_gettop(l);
         if (matchType(l, argc, 2, typeof(LWindowBase)))
         {
             LWindowManager self = (LWindowManager)checkSelf(l);
             LWindowBase    a1;
             checkType(l, 2, out a1);
             self.popWindow(a1);
             pushValue(l, true);
             return(1);
         }
         else if (matchType(l, argc, 2, typeof(string)))
         {
             LWindowManager self = (LWindowManager)checkSelf(l);
             System.String  a1;
             checkType(l, 2, out a1);
             self.popWindow(a1);
             pushValue(l, true);
             return(1);
         }
         pushValue(l, false);
         LuaDLL.lua_pushstring(l, "No matched override function to call");
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Ejemplo n.º 2
0
    void Start()
    {
        btn_close.onClick.AddListener(() =>
        {
            LWindowManager wm = LWindowManager.GetInstance();
            wm.popWindow(this);
        });

        gridPageView.cellsSize         = new Vector2(400, 400);
        gridPageView.cellTemplate.node = Resources.Load("Prefabs/grid_cell") as GameObject;
        gridPageView.cols           = 4;
        gridPageView.rows           = 4;
        gridPageView.gridCellsCount = 100;
        gridPageView.gridCellsSize  = new Vector2(100, 100);
        gridPageView.onGridDataSourceAdapterHandler = (LGridPageViewCell cell, int idx) =>
        {
            if (cell == null)
            {
                cell      = new LGridPageViewCell();
                cell.node = (GameObject)Instantiate(gridPageView.cellTemplate.node, Vector3.zero, gridPageView.cellTemplate.node.transform.rotation);
            }
            cell.node.GetComponent <Text>().text = idx.ToString();
            cell.node.SetActive(idx != LScrollView.INVALID_INDEX);
            return(cell);
        };
        gridPageView.reloadData();
    }
Ejemplo n.º 3
0
    void Awake()
    {
        wm = LSingleton.getInstance("LWindowManager") as LWindowManager;

        btn_close.onClick.AddListener(() =>
        {
            wm.popWindow(this);
        });
    }
Ejemplo n.º 4
0
    void Awake()
    {
        wm = LWindowManager.GetInstance();

        btn_close.onClick.AddListener(() =>
        {
            wm.popWindow(this);
        });
    }
Ejemplo n.º 5
0
    void Awake()
    {
        wm = LWindowManager.GetInstance() ;

        btn_close.onClick.AddListener(() =>
        {
            wm.popWindow(this);
        });
    }
Ejemplo n.º 6
0
	void Awake () {

        wm = LSingleton.getInstance("LWindowManager") as LWindowManager;

        btn_close.onClick.AddListener(() =>
        {
            wm.popWindow(this);
        });

	}
Ejemplo n.º 7
0
    void Start()
    {
        btn_close.onClick.AddListener(() =>
        {
            LWindowManager wm = LWindowManager.GetInstance();
            wm.popWindow(this);
        });

        gridPageView.cellsSize      = new Vector2(400, 400);
        gridPageView.cols           = 4;
        gridPageView.rows           = 4;
        gridPageView.gridCellsCount = 100;
        gridPageView.gridCellsSize  = new Vector2(100, 100);
        gridPageView.SetCellHandle((int idx, GameObject obj) =>
        {
            obj.GetComponent <Text>().text = idx.ToString();
        });
        gridPageView.reloadData();
    }