Exemplo n.º 1
0
    internal void OnSetFirstPosition()
    {
        Vector3 POS = ScrollPanel.GetComponent <RectTransform> ().localPosition;

        POS.x = MainPanel.GetComponent <RectTransform> ().rect.width / 2;
        ScrollPanel.GetComponent <RectTransform> ().localPosition = POS;
    }
Exemplo n.º 2
0
    void Start()
    {
//		JSONObject data = new JSONObject ();
//		data.AddField ("2", "5");
//		data.AddField ("3", "1");
//		data.AddField ("4", "2");
//		JSONObject jdata = new JSONObject ();
//		jdata.AddField ("data", data);
//		OnInventoryListResponse (jdata);

        float GridSize = (MainPanel.GetComponent <RectTransform> ().rect.height / 2) - 10;

        ScrollPanel.GetComponent <GridLayoutGroup> ().cellSize = new Vector2(GridSize, GridSize);
    }
Exemplo n.º 3
0
    void Start()
    {
        float GridSize = (MainPanel.GetComponent <RectTransform> ().rect.height) - 5;

        ScrollPanel.GetComponent <GridLayoutGroup> ().cellSize = new Vector2(GridSize, GridSize);
    }