Пример #1
0
        public PopUpConstArg(
            IUIManager uim,
            IUISystemProcessFactory processFactory,
            IUIElementFactory uiElementFactory,
            IPopUpAdaptor popUpAdaptor,
            IUIImage image,
            ActivationMode activationMode,

            IPopUpManager popUpManager,
            bool hidesOnTappingOthers,
            PopUpMode popUpMode

            ) : base(
                uim,
                processFactory,
                uiElementFactory,
                popUpAdaptor,
                image,
                activationMode
                )
        {
            thisPopUpManager         = popUpManager;
            thisHidesOnTappingOthers = hidesOnTappingOthers;
            thisPopUpMode            = popUpMode;
        }
        public override void SetUpReference()
        {
            base.SetUpReference();
            IPopUpManager popUpManager = CollectPopUpManager();

            thisUIManager.SetPopUpManager(popUpManager);
        }
Пример #3
0
        //protected IReset iReset;

        public GameScreenBase(Game game)
        {
            //iReset = game.Services.GetService(typeof(IReset)) as IReset;
            iHUD = game.Services.GetService(typeof(IHUD)) as IHUD;
            iPopUp = game.Services.GetService(typeof(IPopUpManager)) as IPopUpManager;
            World = new World(new Vector2(0, 30));
            iSoundEffect = game.Services.GetService(typeof(ISoundEffect)) as ISoundEffect;
            iScrollingBackground = game.Services.GetService(typeof(IScrollingBackground)) as IScrollingBackground;
            iVisualiser = game.Services.GetService(typeof(IVisualiser)) as IVisualiser;

        }
 public PopUpStateEngineConstArg(
     IUISystemProcessFactory processFactory,
     IPopUp popUp,
     IPopUpManager popUpManager,
     PopUpMode popUpMode
     )
 {
     thisProcessFactory = processFactory;
     thisPopUp          = popUp;
     thisPopUpManager   = popUpManager;
     thisPopUpMode      = popUpMode;
 }
Пример #5
0
    public void OnTap_IsActivated_IsDisabledForPopUp_CallsPopUpManagerHideActivePopUp()
    {
        ITestUIElementConstArg arg     = CreateMockArg();
        TestUIElement          testUIE = new TestUIElement(arg);

        testUIE.SetIsActivated_Test(true);
        testUIE.SetIsDisabledForPopUp_Test(true);
        IPopUpManager popUpManager = arg.popUpManager;

        testUIE.OnTap(1);


        popUpManager.Received(1).CheckAndHideActivePopUp();
    }
        public override void SetUpReference()
        {
            base.SetUpReference();
            IPopUpManager manager = CreatePopUpMnager();

            thisPopUp.SetPopUpManager(manager);

            IPopUp parentPopUp = FindProximateParentTypedUIElement <IPopUp>();

            thisPopUp.SetParentPopUp(parentPopUp);
            if (parentPopUp != null)
            {
                parentPopUp.AddChildPopUp(thisPopUp);
            }
        }
Пример #7
0
    public ITestUIElementConstArg CreateMockArg()
    {
        ITestUIElementConstArg arg          = Substitute.For <ITestUIElementConstArg>();
        IUIManager             uim          = Substitute.For <IUIManager>();
        IPopUpManager          popUpManager = Substitute.For <IPopUpManager>();

        uim.GetPopUpManager().Returns(popUpManager);
        arg.uim.Returns(uim);
        arg.processFactory.Returns(Substitute.For <IUISystemProcessFactory>());
        arg.uiElementFactory.Returns(Substitute.For <IUIElementFactory>());
        arg.uia.Returns(Substitute.For <IUIAdaptor>());
        arg.activationMode.Returns(ActivationMode.None);
        arg.activationStateEngine.Returns(Substitute.For <IUIEActivationStateEngine>());
        arg.popUpManager.Returns(popUpManager);

        return(arg);
    }
Пример #8
0
 public void SetPopUpManager(IPopUpManager manager)
 {
     thisPopUpManager = manager;
 }