Esempio n. 1
0
    //--------------------------------------------------------------------------------------------
    public Rect OnLayout(float fx, float fy, float fw, float fh)
    {
        Rect rct = new Rect(fx, fy + 5, fw, fh);

        GUI.Box(rct, mGame);

        float hw = fw * 0.5f;

        fy += OnBaseUIItems(fx, fy + 5, fw) + 5;
        rct = mPthCtrl.OnLayout(fx, fy, hw, fh - 30);
        mScnCtrl.OnLayout(fx + hw + 10, fy, hw - 10, fh - 30);

        return(rct);
    }
Esempio n. 2
0
    //--------------------------------------------------------------------------------------------
    // 界面布局
    void OnGUI()
    {
        //mTgtLyr.OnLayout(new Vector2(0, 5));
        Rect rct = mTgtCtrl.OnLayout(0, 5);

        rct = mGameLst.OnLayout(rct.xMax + 10, 5, 300, 200);        // 游戏列表
        Rect rct2 = mPubLst.OnLayout(rct.xMax + 10, 5, 200, 200);   // 公共资源

        if (mpSelGM != null)                                        // 选中游戏信息
        {
            mpSelGM.OnLayout(0, rct.yMax + 10, Screen.width, Screen.height - rct.yMax);
        }

        float tx = rct2.xMax + 10;

        OnBuildSelGame(new Rect(tx + 10, 5, 70, 20));   // 制作选中游戏, 包括: 启动程序/资源包/场景包
        OnBuildGameTest(new Rect(tx + 80, 5, 70, 20));  // 发布测试版游戏
    }