Exemple #1
0
    public void CreateBaseUI()
    {
        GameObject b = mUI.CreateElement(mUI.Canvas, "uiBase");

        b.transform.SetAsFirstSibling();
        mUI.SetRectFillParent(b);
        mUI.AddImage(b, mUI.PrimaryBackground);

        GameObject vl = mUI.CreateElement(b, "vertLayout");

        mUI.SetRectFillParent(vl);
        mUI.AddVerticalLayout(vl);

        GameObject sp1 = mUI.CreateElement(vl, "spacer");

        mUI.AddLayout(sp1, -1, 10, 1.0f, -1);

        mGlobalTabs = mUI.CreateTabView(vl);

        mPrimaryContent = mUI.CreateElement(vl, "primaryWindow");
        mUI.AddLayout(mPrimaryContent, -1, -1, 1.0f, 1.0f);
        mUI.AddImage(mPrimaryContent, mUI.WindowBackground);
        mUI.AddVerticalLayout(mPrimaryContent);
        mPrimaryContent.GetComponent <VerticalLayoutGroup>().padding = new RectOffset(4, 4, 4, 4);
        mPrimaryContent.GetComponent <VerticalLayoutGroup>().spacing = 4;
    }