private void CopyProfilesList(MenuProfilesList _element, bool ignoreUnityUI) { if (ignoreUnityUI) { uiSlots = null; } else { uiSlots = new UISlot[_element.uiSlots.Length]; for (int i = 0; i < uiSlots.Length; i++) { uiSlots[i] = new UISlot(_element.uiSlots[i]); } } textEffects = _element.textEffects; outlineSize = _element.outlineSize; anchor = _element.anchor; maxSlots = _element.maxSlots; actionListOnClick = _element.actionListOnClick; showActive = _element.showActive; uiHideStyle = _element.uiHideStyle; autoHandle = _element.autoHandle; parameterID = _element.parameterID; fixedOption = _element.fixedOption; optionToShow = _element.optionToShow; linkUIGraphic = _element.linkUIGraphic; base.Copy(_element); }
private void CopyCrafting(MenuCrafting _element, bool ignoreUnityUI) { if (ignoreUnityUI) { uiSlots = null; } else { uiSlots = new UISlot[_element.uiSlots.Length]; for (int i = 0; i < uiSlots.Length; i++) { uiSlots[i] = new UISlot(_element.uiSlots[i]); } } isClickable = _element.isClickable; textEffects = _element.textEffects; outlineSize = _element.outlineSize; numSlots = _element.numSlots; craftingType = _element.craftingType; displayType = _element.displayType; uiHideStyle = _element.uiHideStyle; actionListOnWrongIngredients = _element.actionListOnWrongIngredients; linkUIGraphic = _element.linkUIGraphic; autoCreate = _element.autoCreate; inventoryItemCountDisplay = _element.inventoryItemCountDisplay; PopulateList(MenuSource.AdventureCreator); base.Copy(_element); }
private void CopyDialogList(MenuDialogList _element, bool ignoreUnityUI) { if (ignoreUnityUI) { uiSlots = null; } else { uiSlots = new UISlot[_element.uiSlots.Length]; for (int i = 0; i < uiSlots.Length; i++) { uiSlots[i] = new UISlot(_element.uiSlots[i]); } } textEffects = _element.textEffects; outlineSize = _element.outlineSize; displayType = _element.displayType; testIcon = _element.testIcon; anchor = _element.anchor; labels = _element.labels; fixedOption = _element.fixedOption; optionToShow = _element.optionToShow; maxSlots = _element.maxSlots; markAlreadyChosen = _element.markAlreadyChosen; alreadyChosenFontColour = _element.alreadyChosenFontColour; alreadyChosenFontHighlightedColour = _element.alreadyChosenFontHighlightedColour; showIndexNumbers = _element.showIndexNumbers; uiHideStyle = _element.uiHideStyle; linkUIGraphic = _element.linkUIGraphic; resetOffsetWhenRestart = _element.resetOffsetWhenRestart; base.Copy(_element); }
/** A Constructor that gets its values by copying another */ public UISlot(UISlot uiSlot) { uiButton = uiSlot.uiButton; uiButtonID = uiSlot.uiButtonID; sprite = uiSlot.sprite; uiImage = null; uiRawImage = null; }
protected UISlot[] ResizeUISlots(UISlot[] uiSlots, int maxSlots) { List <UISlot> uiSlotsList = new List <UISlot>(); if (uiSlots == null) { return(uiSlotsList.ToArray()); } if (maxSlots < 0) { maxSlots = 0; } if (uiSlots.Length == maxSlots) { return(uiSlots); } // Convert to list foreach (UISlot uiSlot in uiSlots) { uiSlotsList.Add(uiSlot); } if (maxSlots < uiSlotsList.Count) { uiSlotsList.RemoveRange(maxSlots, uiSlotsList.Count - maxSlots); } else if (maxSlots > uiSlotsList.Count) { if (maxSlots > uiSlotsList.Capacity) { uiSlotsList.Capacity = maxSlots; } for (int i = uiSlotsList.Count; i < maxSlots; i++) { UISlot newUISlot = new UISlot(); uiSlotsList.Add(newUISlot); } } return(uiSlotsList.ToArray()); }
private void CopySavesList(MenuSavesList _element, bool ignoreUnityUI) { if (ignoreUnityUI) { uiSlots = null; } else { uiSlots = new UISlot[_element.uiSlots.Length]; for (int i = 0; i < uiSlots.Length; i++) { uiSlots[i] = new UISlot(_element.uiSlots[i]); } } newSaveText = _element.newSaveText; emptySlotText = _element.emptySlotText; emptySlotTextLineID = _element.emptySlotTextLineID; textEffects = _element.textEffects; outlineSize = _element.outlineSize; anchor = _element.anchor; saveListType = _element.saveListType; maxSlots = _element.maxSlots; actionListOnSave = _element.actionListOnSave; displayType = _element.displayType; blankSlotTexture = _element.blankSlotTexture; allowEmptySlots = _element.allowEmptySlots; fixedOption = _element.fixedOption; optionToShow = _element.optionToShow; hideIfNotValid = _element.hideIfNotValid; importProductName = _element.importProductName; importSaveFilename = _element.importSaveFilename; checkImportBool = _element.checkImportBool; checkImportVar = _element.checkImportVar; parameterID = _element.parameterID; showNewSaveOption = _element.showNewSaveOption; autoHandle = _element.autoHandle; uiHideStyle = _element.uiHideStyle; linkUIGraphic = _element.linkUIGraphic; base.Copy(_element); }
private void CopyInteraction(MenuInteraction _element, bool ignoreUnityUI) { if (ignoreUnityUI) { uiButton = null; uiSlots = null; } else { uiButton = _element.uiButton; uiSlots = new UISlot[_element.uiSlots.Length]; for (int i = 0; i < uiSlots.Length; i++) { uiSlots[i] = new UISlot(_element.uiSlots[i]); } } uiPointerState = _element.uiPointerState; uiText = null; uiImage = null; maxSlots = _element.maxSlots; displayType = _element.displayType; anchor = _element.anchor; textEffects = _element.textEffects; outlineSize = _element.outlineSize; iconID = _element.iconID; overrideTexture = _element.overrideTexture; activeTexture = _element.activeTexture; uiSelectableHideStyle = _element.uiSelectableHideStyle; linkUIGraphic = _element.linkUIGraphic; fixedIcon = _element.fixedIcon; base.Copy(_element); if (!fixedIcon) { alternativeInputButton = string.Empty; } }