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));
        }
예제 #2
0
        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;
        }
예제 #3
0
        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);
        }
예제 #4
0
            /// <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);
                }
            }
예제 #5
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;
        }
예제 #6
0
        public void CopyPosition(IUIImage other)
        {
            Transform otherTrans         = other.GetTransform();
            Vector2   otherLocalPosition = otherTrans.localPosition;

            thisImageTrans.localPosition = otherLocalPosition;
        }
예제 #7
0
 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;
 }
예제 #8
0
        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;
        }
예제 #9
0
        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);
        }
예제 #11
0
        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();
        }
예제 #13
0
    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));
        }
예제 #15
0
        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);
        }
예제 #17
0
        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));
 }
예제 #19
0
    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);
    }
예제 #20
0
        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;
        }
예제 #21
0
        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);
    }
예제 #23
0
        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
            });
        }
예제 #24
0
        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));
        }
예제 #25
0
        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;
        }
예제 #26
0
        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;
        }
예제 #28
0
    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);
    }
예제 #29
0
        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;
        }
예제 #31
0
 public GalleryNodeStylePropertySet(NodeStyle style, RibbonLib.Ribbon ribbon)
 {
     this.style = style;
     this.itemImage = ribbon.ConvertToUIImage(style.Image);
 }
예제 #32
0
 public GalleryIconPropertySet(ModelIcon icon, RibbonLib.Ribbon ribbon)
 {
     this.icon = icon;
     this.itemImage = ribbon.ConvertToUIImage(icon.Bitmap);
 }