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); }
//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; }
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); } }
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); }
public void SetPopUpManager(IPopUpManager manager) { thisPopUpManager = manager; }