protected override IUIElement CreateUIElement(IUIImage image) { IUIElementGroupScrollerConstArg arg = new UIElementGroupScrollerConstArg( initiallyCursoredElementIndex, cursorSize, startSearchSpeed, activatesCursoredElementsOnly, relativeCursorPosition, scrollerAxis, rubberBandLimitMultiplier, isEnabledInertia, swipeToSnapNext, locksInputAboveThisVelocity, thisDomainInitializationData.uim, thisDomainInitializationData.processFactory, thisDomainInitializationData.uiElementFactory, this, image, activationMode ); return(new UIElementGroupScroller(arg)); }
public ScrollerConstArg( ScrollerAxis scrollerAxis, Vector2 relativeCursorPosition, Vector2 rubberBandLimitMultiplier, bool isEnabledInertia, float newScrollSpeedThreshold, IUIManager uim, IUISystemProcessFactory processFactory, IUIElementFactory uieFactory, IScrollerAdaptor uia, IUIImage uiImage, ActivationMode activationMode ) : base( uim, processFactory, uieFactory, uia, uiImage, activationMode ) { thisScrollerAxis = scrollerAxis; thisRelativeCursorPos = relativeCursorPosition; thisRubberBandLimitMultiplier = rubberBandLimitMultiplier; thisIsEnabledInertia = isEnabledInertia; thisNewScrollSpeedThreshold = newScrollSpeedThreshold; }
protected override IUIElement CreateUIElement(IUIImage image) { IQuantityRollerConstArg arg = new QuantityRollerConstArg(thisDomainInitializationData.uim, thisDomainInitializationData.processFactory, thisDomainInitializationData.uiElementFactory, this, image, thisMaxQuantity, thisPanelDim, thisPadding, thisRollerNormalizedPos); QuantityRoller quantityRoller = new QuantityRoller(arg); return(quantityRoller); }
/// <inheritdoc /> protected override void Load(ContainerBuilder builder) { //TODO: Automate discovery of adapter types IUIText uiText = Mock.Of <IUIText>(); IUIImage uiImage = Mock.Of <IUIImage>(); IUIButton uiButton = Mock.Of <IUIButton>(); IUIFillableImage fillableImage = Mock.Of <IUIFillableImage>(); foreach (UnityUIRegisterationKey key in Enum.GetValues(typeof(UnityUIRegisterationKey))) { builder.RegisterInstance(uiText) .Keyed <IUIText>(key); builder.RegisterInstance(uiImage) .Keyed <IUIImage>(key); builder.RegisterInstance(uiButton) .Keyed <IUIButton>(key); builder.RegisterInstance(fillableImage) .Keyed <IUIFillableImage>(key); } }
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 void CopyPosition(IUIImage other) { Transform otherTrans = other.GetTransform(); Vector2 otherLocalPosition = otherTrans.localPosition; thisImageTrans.localPosition = otherLocalPosition; }
public IconGroupConstArg( IUIManager uim, IPickUpSystemProcessFactory pickUpSystemProcessFactory, IPickUpSystemUIElementFactory pickUpSystemUIElementFactory, IPickUpSystemUIA pickUpSyatemUIA, IUIImage image, IUITool tool, IItemIconTransactionManager iiTAM, int minSize, int maxSize, IHoverPadsManager hoverPadsManager, List <IItemIcon> iis ) : base( uim, pickUpSystemProcessFactory, pickUpSystemUIElementFactory, image, pickUpSyatemUIA, ActivationMode.None ) { thisIITAM = iiTAM; thisMinSize = minSize; thisMaxSize = maxSize; thisHoverPadsManager = hoverPadsManager; thisIIs = iis; }
public QuantityRollerConstArg( IUIManager uim, IUISystemProcessFactory processFactory, IUIElementFactory uiElementFactory, IQuantityRollerAdaptor quaRolAdaptor, IUIImage image, int maxQuantity, Vector2 panelDim, Vector2 padding, Vector2 rollerNormalizedPos ) : base( uim, processFactory, uiElementFactory, quaRolAdaptor, image, ActivationMode.None ) { thisMaxQuantity = maxQuantity; thisUIEFactory = uieFactory; thisPanelDim = panelDim; thisPadding = padding; thisRollerNormalizedPos = rollerNormalizedPos; }
public GenericSingleElementScrollerConstArg( Vector2 relativeCursorLength, ScrollerAxis scrollerAxis, Vector2 rubberBandLimitMultiplier, Vector2 relativeCursorPosition, bool isEnabledInertia, float newScrollSpeedThreshold, IUIManager uim, IUISystemProcessFactory processFactory, IUIElementFactory uieFactory, IGenericSingleElementScrollerAdaptor uia, IUIImage image, ActivationMode activationMode ) : base( scrollerAxis, relativeCursorPosition, rubberBandLimitMultiplier, isEnabledInertia, newScrollSpeedThreshold, uim, processFactory, uieFactory, uia, image, activationMode ) { thisRelativeCursorLength = relativeCursorLength; }
protected override IUIElement CreateUIElement(IUIImage image) { IDigitPanelSetConstArg arg = new DigitPanelSetConstArg(thisDomainInitializationData.uim, thisDomainInitializationData.processFactory, thisDomainInitializationData.uiElementFactory, this, image, thisDigitPlace, thisPanelDim, thisPadding); DigitPanelSet digitPanelSet = new DigitPanelSet(arg); return(digitPanelSet); }
public UIElementGroupConstArg( int columnCountConstraint, int rowCountConstraint, bool topToBottom, bool leftToRight, bool rowToColumn, IUIManager uim, IUISystemProcessFactory processFactory, IUIElementFactory uieFactory, IUIElementGroupAdaptor uia, IUIImage image, ActivationMode activationMode ) : base( uim, processFactory, uieFactory, uia, image, activationMode ) { thisColumnCountConstraint = columnCountConstraint; thisRowCountConstraint = rowCountConstraint; thisTopToBottom = topToBottom; thisLeftToRight = leftToRight; thisRowToColumn = rowToColumn; }
public SelectabilityStateEngine(IUIImage uiImage, IUIManager uim) { selectableState = new SelectableState(uiImage, uim); unselectableState = new UnselectableState(uiImage, uim); selectedState = new SelectedState(uiImage, uim); MakeSureStatesAreSet(); this.SetToInitialState(); }
TestSelectabilityStateEngine CreateTestSelectabilityStateEngine(out TestSelStateEngineConstArg arg) { IUIImage image = Substitute.For <IUIImage>(); IUIManager uim = Substitute.For <IUIManager>(); TestSelectabilityStateEngine engine = new TestSelectabilityStateEngine(image, uim); TestSelStateEngineConstArg thisArg = new TestSelStateEngineConstArg(); arg = thisArg; return(engine); }
public IImageColorTurnProcess CreateFalshColorProcess(IUIImage uiImage, Color targetColor) { IImageColorTurnProcessConstArg arg = new ImageColorTurnProcessConstArg( thisProcessManager, thisProcessManager.GetImageColorTurnProcessExpireTime(), uiImage, targetColor, true ); return(new GenericImageColorTurnProcess(arg)); }
protected virtual IUIElement CreateUIElement(IUIImage image) { IUIElementConstArg arg = new UIElementConstArg( thisDomainInitializationData.uim, thisDomainInitializationData.processFactory, thisDomainInitializationData.uiElementFactory, this, image, activationMode ); return(new UIElement(arg)); }
IItemIcon CreateLeftoverII(int pickedQuantity) { IItemIcon leftoverII = thisPickUpSystemUIElementFactory.CreateItemIcon(thisItem); IUIImage leftoverIIImage = leftoverII.GetUIImage(); leftoverII.SetParentUIE(thisItemIcon.GetParentUIE(), true); leftoverIIImage.CopyPosition(thisImage); thisIG.ReplaceAndUpdateII(thisItemIcon.GetSlotID(), leftoverII); leftoverII.DisemptifyInstantly(thisItem); leftoverII.DecreaseBy(pickedQuantity, doesIncrement: true, removesEmpty: false); return(leftoverII); }
protected override IUIElement CreateUIElement(IUIImage image) { IUIElementConstArg arg = new UIElementConstArg( thisDomainInitializationData.uim, thisDomainInitializationData.processFactory, thisDomainInitializationData.uiElementFactory, this, image, ActivationMode.Alpha ); IEquipToolUIE uie = new EquipToolUIE(arg); return(uie); }
public IImageColorTurnProcess CreateFalshColorProcess( IUIImage uiImage, Color targetColor, float time //.1 ) { GenericImageColorTurnProcess.IConstArg arg = new GenericImageColorTurnProcess.ConstArg( thisProcessManager, time, uiImage, targetColor, true ); return(new GenericImageColorTurnProcess(arg)); }
IIconGroupConstArg CreateStubIconGroupConstArg(int minSize, int maxSize) { IIconGroupConstArg thisArg = Substitute.For <IIconGroupConstArg>(); IUIManager uim = Substitute.For <IUIManager>(); IUIAdaptor uia = Substitute.For <IUIAdaptor>(); IUIImage image = Substitute.For <IUIImage>(); thisArg.uim.Returns(uim); thisArg.uia.Returns(uia); thisArg.image.Returns(image); thisArg.minSize.Returns(minSize); thisArg.maxSize.Returns(maxSize); return(thisArg); }
public virtual void SetUpReference() { // Debug.Log(GetName() + DKUtility.DebugHelper.StringInColor(" SetUpRef", Color.green)); IUIImage uiImage = CreateUIImage(); thisUIElement.SetUIImage(uiImage); IScroller proximateParentScroller = FindProximateParentTypedUIElement <IScroller>(); thisUIElement.SetProximateParentScroller(proximateParentScroller); thisInputStateEngine = CreateUIAdaptorInputStateEngine(); thisSetUpRefIsDone = true; }
protected override IUIElement CreateUIElement(IUIImage image) { IColorChangeButtonConstArg arg = new ColorChangeButtonConstArg( thisDomainInitializationData.uim, thisDomainInitializationData.processFactory, thisDomainInitializationData.uiElementFactory, this, image, targetUIElementAdaptor, targetColor, targetText ); ColorChangeButton button = new ColorChangeButton(arg); return(button); }
/* */ public EquipToolEquippedItemsPanel CreateEqpToolEqpItemsPanel(out IEquipToolPanelConstArg arg) { IUIManager uim = Substitute.For <IUIManager>(); IPickUpSystemProcessFactory pickUpSystemProcessFactory = Substitute.For <IPickUpSystemProcessFactory>(); IEquipToolUIEFactory equipToolUIEFactory = Substitute.For <IEquipToolUIEFactory>(); IUIAdaptor uia = Substitute.For <IUIAdaptor>(); IUIImage image = Substitute.For <IUIImage>(); IEquippableIITAManager eqpIITAM = Substitute.For <IEquippableIITAManager>(); IEquipTool eqpTool = Substitute.For <IEquipTool>(); IPanelTransactionStateEngine engine = Substitute.For <IPanelTransactionStateEngine>(); IEquipToolPanelConstArg thisArg = new EquipToolPanelConstArg(uim, pickUpSystemProcessFactory, equipToolUIEFactory, uia, image, eqpTool, eqpIITAM, engine); EquipToolEquippedItemsPanel eqpItemsPanel = new EquipToolEquippedItemsPanel(thisArg); arg = thisArg; return(eqpItemsPanel); }
protected override GalleryItemPropertySet GetGalleryItem(IUISimplePropertySet newItem, string label, uint categoryID) { if (_ribbonControl is RibbonComboBox) { return(base.GetGalleryItem(newItem, label, categoryID)); } PropVariant propVariant = PropVariant.Empty; newItem.GetValue(ref RibbonProperties.ItemImage, out propVariant); IUIImage itemImage = (IUIImage)propVariant.Value; return(new GalleryItemPropertySet() { Label = label, ItemImage = itemImage, CategoryID = categoryID }); }
protected override IUIElement CreateUIElement(IUIImage image) { IEquipToolActivationData data = (IEquipToolActivationData)thisDomainInitializationData; IDragImageImplementorConstArg dragImageImplementorConstArg = new DragImageImplementorConstArg(1f, 1f, data.pickUpSystemProcessFactory, data.pickUpManager); IDragImageImplementor dragImageImplementor = new DragImageImplementor(dragImageImplementorConstArg); IVisualPickednessStateEngine visualPickednessStateEngine = new VisualPickednessStateEngine(data.pickUpSystemProcessFactory); IEqpIITransactionStateEngine eqpIITAStateEngine = new EqpIITransactionStateEngine(thisEqpIITAM, thisEqpTool); IItemIconPickUpImplementor itemIconPickUpImplementor = new ItemIconPickUpImplementor(thisEqpIITAM, data.pickUpSystemUIElementFactory); IItemIconEmptinessStateEngine emptinessStateEngine = new ItemIconEmptinessStateEngine(data.pickUpSystemProcessFactory); IEqpIITransferabilityHandlerImplementor eqpIITransferabilityHandlerImplementor = new EqpIITransferabilityHandlerImplementor(thisEqpIITAM); IItemIconImage itemIconImage = image as IItemIconImage; IQuantityRoller quantityRoller = thisEqpToolUIEFactory.CreateItemIconQuantityRoller(this); IEquippableItemIconConstArg arg = new EquippableItemIconConstArg(data.uim, data.pickUpSystemProcessFactory, data.eqpToolUIEFactory, this, itemIconImage, thisEqpTool, dragImageImplementor, visualPickednessStateEngine, thisEqpIITAM, thisEqpItem, eqpIITAStateEngine, itemIconPickUpImplementor, emptinessStateEngine, eqpIITransferabilityHandlerImplementor, quantityRoller); return(new EquippableItemIcon(arg)); }
public UIElementConstArg( IUIManager uim, IUISystemProcessFactory processFactory, IUIElementFactory uiElementFactory, IUIAdaptor uia, IUIImage image, ActivationMode activationMode ) { thisUIM = uim; thisProcessFactory = processFactory; thisUIElementFactory = uiElementFactory; thisUIA = uia; thisImage = image; thisActivationMode = activationMode; }
protected override IUIElement CreateUIElement(IUIImage image) { IPopUpConstArg arg = new PopUpConstArg( thisDomainInitializationData.uim, thisDomainInitializationData.processFactory, thisDomainInitializationData.uiElementFactory, this, image, activationMode, thisDomainInitializationData.uim.GetPopUpManager(), hidesOnTappingOthers, popUpMode ); return(new PopUp(arg)); }
public ImageColorTurnProcessConstArg( IProcessManager processManager, float expireTime, IUIImage uiImage, Color targetColor, bool flashes ) : base( processManager, ProcessConstraint.ExpireTime, expireTime, false ) { thisUIImage = uiImage; thisTargetColor = targetColor; thisFlashes = flashes; }
public TestIG CreateTestIG(int minSize, int maxSize, out IIconGroupConstArg arg) { IUIManager uim = Substitute.For <IUIManager>(); IPickUpSystemProcessFactory pickUpSystemProcessFactory = Substitute.For <IPickUpSystemProcessFactory>(); IPickUpSystemUIElementFactory pickUpSystemUIElementFactory = Substitute.For <IPickUpSystemUIElementFactory>(); IPickUpSystemUIA pickUpSystemUIA = Substitute.For <IPickUpSystemUIA>(); IUIImage image = Substitute.For <IUIImage>(); IUITool tool = Substitute.For <IUITool>(); IItemIconTransactionManager iiTAM = Substitute.For <IItemIconTransactionManager>(); IHoverPadsManager hoverPadsManager = Substitute.For <IHoverPadsManager>(); List <IItemIcon> iis = new List <IItemIcon>(); IIconGroupConstArg thisArg = new IconGroupConstArg(uim, pickUpSystemProcessFactory, pickUpSystemUIElementFactory, pickUpSystemUIA, image, tool, iiTAM, minSize, maxSize, hoverPadsManager, iis); TestIG testIG = new TestIG(thisArg); arg = thisArg; return(testIG); }
protected override IUIElement CreateUIElement(IUIImage image) { IUIElementGroupConstArg arg = new UIElementGroupConstArg( columnCountConstraint, rowCountConstraint, topToBottom, leftToRight, rowToColumn, thisDomainInitializationData.uim, thisDomainInitializationData.processFactory, thisDomainInitializationData.uiElementFactory, this, image, activationMode ); return(new GenericUIElementGroup(arg)); }
public CyclableUIElementGroupScrollerConstArg( bool[] isCycleEnabled, int initiallyCursoredElementIndex, int[] cursorSize, float startSearchSpeed, bool activatesCursoredElementsOnly, Vector2 relativeCursorPosition, ScrollerAxis scrollerAxis, Vector2 rubberBandLimitMultiplier, bool isEnabledInertia, bool swipeToSnapNext, float newScrollSpeedThreshold, IUIManager uim, IUISystemProcessFactory processFactory, IUIElementFactory uieFactory, IUIElementGroupScrollerAdaptor uia, IUIImage image, ActivationMode activationMode ) : base( initiallyCursoredElementIndex, cursorSize, startSearchSpeed, activatesCursoredElementsOnly, relativeCursorPosition, scrollerAxis, rubberBandLimitMultiplier, isEnabledInertia, swipeToSnapNext, newScrollSpeedThreshold, uim, processFactory, uieFactory, uia, image, activationMode ) { thisIsCycleEnabled = isCycleEnabled; }
public GalleryNodeStylePropertySet(NodeStyle style, RibbonLib.Ribbon ribbon) { this.style = style; this.itemImage = ribbon.ConvertToUIImage(style.Image); }
public GalleryIconPropertySet(ModelIcon icon, RibbonLib.Ribbon ribbon) { this.icon = icon; this.itemImage = ribbon.ConvertToUIImage(icon.Bitmap); }