コード例 #1
0
    public override void LayOut()
    {
        base.LayOut();
        screenDisplayWordWidth  = Common.ScreenToWorldWidth(mainCam, deviceInfoNow.width);
        screenDisplayWordHeight = Common.ScreenToWorldHeight(mainCam, deviceInfoNow.height);


        // {
        //     SpriteRenderer spRender = objSpriteBg.GetComponent<SpriteRenderer>();
        //     float scalex = screenDisplayWordWidth / spRender.size.x;
        //     float scaley = screenDisplayWordHeight / spRender.size.y;
        //     float scale = Mathf.Max(scalex, scaley);
        //     Debug.Log("spRender.size=" + spRender.size);
        //     objSpriteBg.transform.localScale = new Vector3(scalex, scaley, 1f);

        // }
        ShotItemInfo info = screenShotConfig.GetPage(deviceInfoNow, indexScreenShot);

        if (info != null)
        {
            if (info.controller != null)
            {
                info.controller.LayOutView();
            }
        }
    }
コード例 #2
0
    void OnGotoScrenShot(int idx)
    {
        if (!deviceInfoNow.isMain)
        {
            return;
        }
        // if (shotBase != null)
        // {
        //     shotBase.ShowPage(idx);
        // }
        shotItemInfo = screenShotConfig.GetPage(deviceInfoNow, idx);

        NaviViewController navi = this.controller as NaviViewController;

        if (navi != null)
        {
            navi.Pop();
            navi.Push(shotItemInfo.controller);
        }

        if (shotItemInfo.controller != null)
        {
            shotItemInfo.controller.callbackUIFinish = OnUIDidFinishCallBack;
        }
    }