public void Init(ManageIglooPopupController manageIglooPopupController, LotDefinition lotDefinition, SavedIglooMetaData iglooMetaData, IglooCardState state) { manageIgloos = manageIglooPopupController; savedIglooMetaData = iglooMetaData; layoutId = iglooMetaData.LayoutId; CreatedDate.text = formatCreatedDate(iglooMetaData.CreatedDate); LastEditedDate.text = formatLastEditedDate(iglooMetaData.LastModifiedDate); Content.LoadAsync(onImageLoadComplete, lotDefinition.PreviewImageLarge); SetCardState(state); }
private void setSceneLayoutDataItemLimit(SceneLayoutData sceneLayoutData) { sceneLayoutData.ItemLimitWarningShown = false; LotDefinition lotDefinitionFromZoneName = GetLotDefinitionFromZoneName(sceneLayoutData.LotZoneName); if (lotDefinitionFromZoneName != null) { sceneLayoutData.MaxLayoutItems = lotDefinitionFromZoneName.MaxItems; } }
private void setIglooPropertiesCard(LotDefinition lotDefinition, SavedIglooMetaData iglooMetaData) { if (membershipData.IsMember && !iglooMetaData.MemberOnly) { return; } if (!iglooPropertiesCards.ContainsKey(iglooMetaData.LayoutId)) { Log.LogErrorFormatted(this, "Unable to find igloo layout card with layout id of {0}.", iglooMetaData.LayoutId); return; } IglooPropertiesCard.IglooCardState state = IglooPropertiesCard.IglooCardState.InActive; if (iglooMetaData.MemberOnly && !membershipData.IsMember) { state = IglooPropertiesCard.IglooCardState.MemberLocked; } else if (savedIgloosMetaData.ActiveIglooId.HasValue && iglooMetaData.LayoutId == savedIgloosMetaData.ActiveIglooId.Value) { state = IglooPropertiesCard.IglooCardState.Active; } iglooPropertiesCards[iglooMetaData.LayoutId].Init(this, lotDefinition, iglooMetaData, state); }
private void onIglooPropertiesCardLoaded(string path, GameObject obj) { int num = savedIgloosMetaData.SavedIgloos.Count; for (int i = 0; i < savedIgloosMetaData.SavedIgloos.Count; i++) { if (membershipData.IsMember && !savedIgloosMetaData.SavedIgloos[i].MemberOnly) { num--; continue; } Transform memberSlotContainer = MemberSlotContainer; if (!savedIgloosMetaData.SavedIgloos[i].MemberOnly) { memberSlotContainer = NonMemberSlotContainer.transform; } GameObject gameObject = Object.Instantiate(obj, memberSlotContainer, worldPositionStays: false); IglooPropertiesCard component = gameObject.GetComponent<IglooPropertiesCard>(); iglooPropertiesCards.Add(savedIgloosMetaData.SavedIgloos[i].LayoutId, component); LotDefinition lotDefinitionFromZoneName = IglooMediator.GetLotDefinitionFromZoneName(savedIgloosMetaData.SavedIgloos[i].LotZoneName); if (lotDefinitionFromZoneName != null) { setIglooPropertiesCard(lotDefinitionFromZoneName, savedIgloosMetaData.SavedIgloos[i]); } } createButtonCount = igloosCount - num; if (createButtonCount > 0) { Content.LoadAsync(delegate(string createButtonPath, GameObject asset) { initializeCreateButtons(asset); }, CreateNewIglooPrefab); } else { privacyButton.Setup(base.transform.parent, savedIgloosMetaData, enableButton: true); } StartCoroutine(orderIglooCards(animated: false)); }