Ejemplo n.º 1
0
        public void SwitchBuyButton(ListItemSelectedEvent e, BuyableMarketItemNode item, [JoinByParentGroup] ICollection <UserItemNode> parentUserItem, [JoinAll] ScreenNode screen)
        {
            CheckMarketItemRestrictionsEvent eventInstance = new CheckMarketItemRestrictionsEvent();

            base.ScheduleEvent(eventInstance, item);
            if (eventInstance.RestrictedByRank || eventInstance.RestrictedByUpgradeLevel)
            {
                this.HideBuyButton(screen);
                this.HideXBuyButton(screen);
            }
            else
            {
                if (item.priceItem.IsBuyable)
                {
                    this.ShowBuyButton(item.priceItem, screen);
                }
                else
                {
                    this.HideBuyButton(screen);
                }
                if (item.xPriceItem.IsBuyable)
                {
                    this.ShowXBuyButton(item.xPriceItem, screen);
                }
                else
                {
                    this.HideXBuyButton(screen);
                }
            }
        }
 //! private method for raising ListItemSelectedEvent
 private void OnListItemSelected(System.Int32 nIndex)
 {
     if (null != ListItemSelectedEvent)
     {
         //! raising event
         ListItemSelectedEvent.Invoke(nIndex, m_Args);
     }
 }
        public void ShowUserRankRestrictionDescription(ListItemSelectedEvent e, UserRankRestrictionNode userRankRestriction, [JoinAll] SelfUserNode user, [JoinAll] ScreenNode screen, [JoinAll] SingleNode <RanksNamesComponent> ranksNames)
        {
            CheckMarketItemRestrictionsEvent eventInstance = new CheckMarketItemRestrictionsEvent();

            base.ScheduleEvent(eventInstance, userRankRestriction);
            if (eventInstance.RestrictedByRank)
            {
                this.ShowUserRankRestrictionDescription(screen, userRankRestriction.purchaseUserRankRestriction, ranksNames.component);
            }
        }
 public void InitLocaleItem(ListItemSelectedEvent e, LocaleItemNode node, [JoinByScreen] SelectedLocaleNode selected, LocaleItemNode nodeA, [JoinByScreen] SingleNode <SelectLocaleScreenComponent> screen)
 {
     selected.selectedLocale.Code = node.locale.Code;
     if (node.locale.Code == LocaleUtils.GetSavedLocaleCode())
     {
         screen.component.DisableButtons();
     }
     else
     {
         screen.component.EnableButtons();
     }
 }
        public void UpdateHeader(ListItemSelectedEvent e, GarageListContainerSimpleItemNode listItemNode, [JoinAll] SingleNode <TopPanelComponent> topPanel)
        {
            Entity entity = Flow.Current.EntityRegistry.GetEntity(listItemNode.simpleContainerContentItem.MarketItemId);

            if (!entity.HasComponent <PaintItemComponent>())
            {
                topPanel.component.CurrentHeader = entity.GetComponent <DescriptionItemComponent>().Name;
            }
            else if (!string.IsNullOrEmpty(listItemNode.simpleContainerContentItem.NameLokalizationKey))
            {
                topPanel.component.CurrentHeader = listItemNode.descriptionBundleItem.Names[listItemNode.simpleContainerContentItem.NameLokalizationKey];
            }
        }
        public void ShowUpgradeLevelRestrictionDescription(ListItemSelectedEvent e, UpgradeLevelRestrictionNode upgradeLevelRestriction, [JoinAll] ScreenNode screen)
        {
            CheckMarketItemRestrictionsEvent eventInstance = new CheckMarketItemRestrictionsEvent();

            base.ScheduleEvent(eventInstance, upgradeLevelRestriction);
            if (eventInstance.RestrictedByUpgradeLevel)
            {
                if ((upgradeLevelRestriction.purchaseUpgradeLevelRestriction.RestrictionValue == 0) && eventInstance.MountWillBeRestrictedByUpgradeLevel)
                {
                    this.ShowUpgradeLevelRestrictionDescription(screen, upgradeLevelRestriction.mountUpgradeLevelRestriction.RestrictionValue);
                }
                else
                {
                    this.ShowUpgradeLevelRestrictionDescription(screen, upgradeLevelRestriction.purchaseUpgradeLevelRestriction.RestrictionValue);
                }
            }
        }
 public void ItemSelected(ListItemSelectedEvent e, ContainerContentItemNotPreviewNode containerContantItem)
 {
     this.PreviewContainerContentItem(containerContantItem.Entity);
 }
 public void ShowUserRankRestrictionDescription(ListItemSelectedEvent e, UserRankRestrictionNode userRankRestriction, [JoinByMarketItem] SingleNode <MountUserRankRestrictionComponent> marketItem, [JoinAll] ScreenNode screen, [JoinAll] SingleNode <RanksNamesComponent> ranksNames)
 {
     this.ShowUserRankRestrictionDescription(screen, marketItem.component, ranksNames.component);
 }
 public void HideButton(ListItemSelectedEvent e, GameplayChestNode container, [JoinAll] ScreenNode screenNode)
 {
     screenNode.containersScreen.ContentButtonActivity = false;
 }
 public void SetDescriptionItem(ListItemSelectedEvent e, GarageItemNode item, [JoinAll] ItemDescriptionNode descriptionNode)
 {
     descriptionNode.displayDescriptionItem.SetDescription(item.descriptionItem.Description);
 }
Ejemplo n.º 11
0
 public void ClearBuyButtons(ListItemSelectedEvent e, GarageItemNode item, [JoinAll] ScreenNode screen)
 {
     screen.buyItemPacksButtons.SetBuyButtonsInactive();
 }
Ejemplo n.º 12
0
 public void HideBuyButton(ListItemSelectedEvent e, UserItemNode item, [JoinAll] ScreenNode screen)
 {
     this.HideBuyButton(screen);
     this.HideXBuyButton(screen);
 }
 public void ShowOnlyInContainerUI(ListItemSelectedEvent e, InContainerMarketItemNode item, [JoinAll] ScreenNode screenNode)
 {
     screenNode.garageItemsScreen.OnlyInContainerLabelVisibility = (item.priceItem.Price == 0) && (item.xPriceItem.Price == 0);
     screenNode.garageItemsScreen.InContainerButtonVisibility    = true;
 }
 public void HideOnlyInContainerUI(ListItemSelectedEvent e, NotInContainerMarketItemNode item, [JoinAll] ScreenNode screenNode)
 {
     screenNode.garageItemsScreen.OnlyInContainerUIVisibility = false;
 }
 public void HideOnlyInContainerUI(ListItemSelectedEvent e, SingleNode <UserItemComponent> item, [JoinAll] ScreenNode screenNode)
 {
     screenNode.garageItemsScreen.OnlyInContainerUIVisibility = false;
 }
Ejemplo n.º 16
0
 public void HideButton(ListItemSelectedEvent e, SingleNode <MarketItemComponent> container, [JoinAll] ScreenNode screenNode)
 {
     screenNode.containersScreen.SetOpenButtonsActive(false, false);
 }
Ejemplo n.º 17
0
 public void ShowButton(ListItemSelectedEvent e, ContainerNode container, [JoinAll] ScreenNode screenNode)
 {
     screenNode.containersScreen.SetOpenButtonsActive(container.userItemCounter.Count > 0L, false);
 }
Ejemplo n.º 18
0
 public void MarkListItemSelected(ListItemSelectedEvent e, NotSelectedListItemNode item)
 {
     item.Entity.AddComponent <SelectedListItemComponent>();
 }
 public void UpdateHeader(ListItemSelectedEvent e, GarageListContainerBundleItemNode listItemNode, [JoinAll] SingleNode <TopPanelComponent> topPanel)
 {
     topPanel.component.CurrentHeader = listItemNode.descriptionBundleItem.Names[listItemNode.bundleContainerContentItem.NameLokalizationKey];
 }
Ejemplo n.º 20
0
 public void HideMountButton(ListItemSelectedEvent e, BuyableMarketItemNode item, [JoinAll] ScreenNode screenNode)
 {
     this.HideMountButton(screenNode);
 }
 public void UpdateHeader(ListItemSelectedEvent e, GarageListNotChildItemNode item, [JoinAll] SingleNode <TopPanelComponent> topPanel)
 {
     topPanel.component.CurrentHeader = item.descriptionItem.Name;
 }
Ejemplo n.º 22
0
 public void HideMountButton(ListItemSelectedEvent e, NotMountedSkinUserItemWithRestrictionNode item, [JoinAll] ScreenNode screenNode)
 {
     this.ShowMountButtonForSkinItem(screenNode, true);
 }
 public void HideDescriptions(ListItemSelectedEvent e, Node any, [JoinAll] ScreenNode screen)
 {
     screen.garageItemsScreen.UserRankRestrictionDescription.gameObject.SetActive(false);
     screen.garageItemsScreen.UpgradeLevelRestrictionDescription.gameObject.SetActive(false);
 }
Ejemplo n.º 24
0
 public void ShowEquippedButton(ListItemSelectedEvent e, MountedUserItemNode item, [JoinAll] ScreenNode screenNode)
 {
     this.ShowMountButton(screenNode, false);
 }
Ejemplo n.º 25
0
 public void ShowMountButton(ListItemSelectedEvent e, NotMountedNotSkinUserItemNode item, [JoinAll] ScreenNode screenNode)
 {
     this.ShowMountButton(screenNode, true);
 }
Ejemplo n.º 26
0
 public void ShowMountButton(ListItemSelectedEvent e, NotMountedSkinUserItemNode item, [JoinAll] ScreenNode screenNode)
 {
     this.ShowMountButtonForSkinItem(screenNode, false);
 }
 public void ShowButton(ListItemSelectedEvent e, ItemsContainerNode container, [JoinAll] ScreenNode screenNode)
 {
     screenNode.containersScreen.ContentButtonActivity = true;
 }
 public void ShowUpgradeLevelRestrictionDescription(ListItemSelectedEvent e, UpgradeLevelRestrictionGraffitiNode upgradeLevelRestriction, [JoinByMarketItem] SingleNode <MountUpgradeLevelRestrictionComponent> marketItem, [JoinByParentGroup] WeaponNode weapon, [JoinAll] ScreenNode screen)
 {
     screen.garageItemsScreen.UpgradeLevelRestrictionDescription.Description = screen.garageItemsScreenText.WeaponUpgradeLevelRestrictionDescription.Replace(ITEM_upgLEVEL, marketItem.component.RestrictionValue.ToString()).Replace(ITEM_NAME, weapon.descriptionItem.Name);
     screen.garageItemsScreen.UpgradeLevelRestrictionDescription.gameObject.SetActive(true);
 }