Example #1
0
    private void InitInputBlocker()
    {
        Camera camera      = CameraUtils.FindFirstByLayer(base.gameObject.layer);
        float  worldOffset = this.m_Bones.m_InputBlocker.position.z - base.transform.position.z;

        this.m_inputBlocker = CameraUtils.CreateInputBlocker(camera, "QuickChatInputBlocker", this, worldOffset).AddComponent <PegUIElement>();
        this.m_inputBlocker.AddEventListener(UIEventType.RELEASE, new UIEvent.Handler(this.OnInputBlockerReleased));
    }
Example #2
0
    private void InitInputBlocker()
    {
        GameObject obj2 = CameraUtils.CreateInputBlocker(CameraUtils.FindFirstByLayer(base.gameObject.layer), "RecruitAFriendInputBlocker", this);

        obj2.transform.position = this.m_Bones.m_InputBlocker.position;
        this.m_inputBlocker     = obj2.AddComponent <PegUIElement>();
        this.m_inputBlocker.AddEventListener(UIEventType.RELEASE, new UIEvent.Handler(this.OnInputBlockerReleased));
    }
    private void InitInputBlocker()
    {
        GameObject obj2 = CameraUtils.CreateInputBlocker(CameraUtils.FindFirstByLayer(base.gameObject.layer), "AddFriendInputBlocker");

        obj2.transform.parent = base.transform.parent;
        this.m_inputBlocker   = obj2.AddComponent <PegUIElement>();
        this.m_inputBlocker.AddEventListener(UIEventType.RELEASE, new UIEvent.Handler(this.OnInputBlockerReleased));
        TransformUtil.SetPosZ(this.m_inputBlocker, base.transform.position.z + 1f);
    }
    protected virtual void Awake()
    {
        GameObject obj2 = (GameObject)GameUtils.InstantiateGameObject(this.m_menuDefPrefab, null, false);

        this.m_menu = obj2.GetComponent <ButtonListMenuDef>();
        OverlayUI.Get().AddGameObject(base.gameObject, CanvasAnchor.CENTER, false, CanvasScaleMode.HEIGHT);
        this.SetTransform();
        this.m_blocker = CameraUtils.CreateInputBlocker(CameraUtils.FindFirstByLayer(obj2.layer), "GameMenuInputBlocker", this, obj2.transform, 10f).AddComponent <PegUIElement>();
        FatalErrorMgr.Get().AddErrorListener(new FatalErrorMgr.ErrorCallback(this.OnFatalError));
        this.m_blocker.AddEventListener(UIEventType.RELEASE, new UIEvent.Handler(this.OnBlockerRelease));
    }