Exemplo n.º 1
0
    public TestItemIcon CreateTestItemIcon(out IItemIconConstArg arg)
    {
        IItemIconConstArg thisArg = Substitute.For <IItemIconConstArg>();
        IUIManager        uim     = Substitute.For <IUIManager>();

        thisArg.uim.Returns(uim);
        IItemIconUIAdaptor iiUIA = Substitute.For <IItemIconUIAdaptor>();

        thisArg.uia.Returns(iiUIA);
        IItemIconImage itemIconImage = Substitute.For <IItemIconImage>();

        thisArg.image.Returns(itemIconImage);
        IItemIconTransactionManager iiTAM = Substitute.For <IItemIconTransactionManager>();

        thisArg.iiTAM.Returns(iiTAM);
        IUIItem item = Substitute.For <IUIItem>();

        thisArg.item.Returns(item);
        IItemIconTransactionStateEngine iiTAStateEngine = Substitute.For <IItemIconTransactionStateEngine>();

        thisArg.iiTAStateEngine.Returns(iiTAStateEngine);
        IItemIconEmptinessStateEngine emptinessStateEngine = Substitute.For <IItemIconEmptinessStateEngine>();

        thisArg.emptinessStateEngine.Returns(emptinessStateEngine);
        ITransferabilityHandlerImplementor transferabilityHandlerImplementor = Substitute.For <ITransferabilityHandlerImplementor>();

        thisArg.transferabilityHandlerImplementor.Returns(transferabilityHandlerImplementor);

        TestItemIcon testItemIcon = new TestItemIcon(thisArg);

        arg = thisArg;
        return(testItemIcon);
    }
Exemplo n.º 2
0
        public IQuantityRoller CreateItemIconQuantityRoller(IItemIconUIAdaptor itemIconUIAdaptor)
        {
            // Rect itemIconRect = itemIconUIAdaptor.GetRect();
            // int maxQuantity = 99;
            // Vector2 panelDimension = new Vector2(itemIconRect.width * .15f, itemIconRect.height * .2f);
            // Vector2 padding = new Vector2(itemIconRect.width * .05f, itemIconRect.height * .05f);
            // Vector2 normalizedPos = new Vector2(1f, 1f);
            // IQuantityRollerAdaptorInitializationData uiaInitData = new QuantityRollerAdaptorInitializationData(maxQuantity, panelDimension, padding, normalizedPos);
            // IQuantityRollerAdaptor quantityRollerAdaptor = this.CreateInstatiableUIA<QuantityRollerAdaptor>(uiaInitData);
            // quantityRollerAdaptor.GetTransform().SetParent(itemIconUIAdaptor.GetTransform());
            // IUIAActivationData activationData = itemIconUIAdaptor.GetDomainActivationData();

            // quantityRollerAdaptor.GetReadyForActivation(activationData);
            // IQuantityRoller quantityRoller = (IQuantityRoller)quantityRollerAdaptor.GetUIElement();
            // return quantityRoller;
            return(null);
        }
Exemplo n.º 3
0
 public ItemIconConstArg(IUIManager uim, IPickUpSystemProcessFactory pickUpSystemProcessFactory, IPickUpSystemUIElementFactory pickUpSystemUIElementFactory, IItemIconUIAdaptor iiUIA, IItemIconImage itemIconImage, IUITool tool, IDragImageImplementor dragImageImplementor, IVisualPickednessStateEngine visualPickednessStateEngine, IItemIconTransactionManager iiTAM, IUIItem item, IItemIconTransactionStateEngine iiTAStateEngine, IItemIconPickUpImplementor pickUpImplementor, IItemIconEmptinessStateEngine emptinessStateEngine, ITransferabilityHandlerImplementor transferabilityHandlerImplementor, IQuantityRoller quantityRoller) : base(uim, pickUpSystemProcessFactory, pickUpSystemUIElementFactory, iiUIA, itemIconImage, tool, dragImageImplementor, visualPickednessStateEngine)
 {
     thisIITAM                = iiTAM;
     thisItem                 = item;
     thisIITAStateEngine      = iiTAStateEngine;
     thisIIPickUpImplementor  = iiPickUpImplementor;
     thisEmptinessStateEngine = emptinessStateEngine;
     thisQuantityRoller       = quantityRoller;
 }