Example #1
0
        private void CopyCycle(MenuCycle _element, bool ignoreUnityUI)
        {
            if (ignoreUnityUI)
            {
                uiButton = null;
            }
            else
            {
                uiButton = _element.uiButton;
            }
            uiText = null;

            label                 = _element.label;
            textEffects           = _element.textEffects;
            outlineSize           = _element.outlineSize;
            anchor                = _element.anchor;
            selected              = _element.selected;
            optionsArray          = _element.optionsArray;
            cycleType             = _element.cycleType;
            splitLanguageType     = _element.splitLanguageType;
            varID                 = _element.varID;
            cycleText             = string.Empty;
            actionListOnClick     = _element.actionListOnClick;
            uiSelectableHideStyle = _element.uiSelectableHideStyle;
            cycleUIBasis          = _element.cycleUIBasis;
            optionTextures        = _element.optionTextures;
            linkedVariable        = null;
            uiDropdown            = _element.uiDropdown;

            base.Copy(_element);
        }
Example #2
0
        private void CopyCycle(MenuCycle _element, bool ignoreUnityUI)
        {
            if (ignoreUnityUI)
            {
                uiButton = null;
            }
            else
            {
                uiButton = _element.uiButton;
            }
            uiText = null;

            label                 = _element.label;
            textEffects           = _element.textEffects;
            outlineSize           = _element.outlineSize;
            anchor                = _element.anchor;
            selected              = _element.selected;
            optionsArray          = _element.optionsArray;
            cycleType             = _element.cycleType;
            varID                 = _element.varID;
            cycleText             = "";
            actionListOnClick     = _element.actionListOnClick;
            uiSelectableHideStyle = _element.uiSelectableHideStyle;
            cycleUIBasis          = _element.cycleUIBasis;

                        #if UNITY_5_3_OR_NEWER
            uiDropdown = _element.uiDropdown;
                        #endif

            base.Copy(_element);
        }
Example #3
0
        public override MenuElement DuplicateSelf(bool fromEditor, bool ignoreUnityUI)
        {
            MenuCycle newElement = CreateInstance <MenuCycle>();

            newElement.Declare();
            newElement.CopyCycle(this, ignoreUnityUI);
            return(newElement);
        }
Example #4
0
        public override MenuElement DuplicateSelf()
        {
            MenuCycle newElement = CreateInstance <MenuCycle>();

            newElement.Declare();
            newElement.CopyCycle(this);
            return(newElement);
        }
Example #5
0
		public void CopyCycle (MenuCycle _element)
		{
			label = _element.label;
			textEffects = _element.textEffects;
			anchor = _element.anchor;
			selected = _element.selected;
			optionsArray = _element.optionsArray;
			cycleType = _element.cycleType;
			varID = _element.varID;
			
			base.Copy (_element);
		}
Example #6
0
        public void CopyCycle(MenuCycle _element)
        {
            uiButton     = _element.uiButton;
            uiText       = null;
            label        = _element.label;
            textEffects  = _element.textEffects;
            anchor       = _element.anchor;
            selected     = _element.selected;
            optionsArray = _element.optionsArray;
            cycleType    = _element.cycleType;
            varID        = _element.varID;
            cycleText    = "";

            base.Copy(_element);
        }
Example #7
0
        public void CopyCycle(MenuCycle _element)
        {
            uiButton = _element.uiButton;
            uiText = null;
            label = _element.label;
            textEffects = _element.textEffects;
            anchor = _element.anchor;
            selected = _element.selected;
            optionsArray = _element.optionsArray;
            cycleType = _element.cycleType;
            varID = _element.varID;
            cycleText = "";
            actionListOnClick = _element.actionListOnClick;

            base.Copy (_element);
        }
Example #8
0
        private void CopyCycle(MenuCycle _element)
        {
            uiButton          = _element.uiButton;
            uiText            = null;
            label             = _element.label;
            textEffects       = _element.textEffects;
            outlineSize       = _element.outlineSize;
            anchor            = _element.anchor;
            selected          = _element.selected;
            optionsArray      = _element.optionsArray;
            cycleType         = _element.cycleType;
            varID             = _element.varID;
            cycleText         = "";
            actionListOnClick = _element.actionListOnClick;

            base.Copy(_element);
        }
Example #9
0
        private void SearchForInstances(bool justLocal, ActionType actionType)
        {
            if (searchedAssets != null)
            {
                searchedAssets.Clear();
            }

            if (justLocal)
            {
                SearchSceneForType("", actionType);
                return;
            }

            string[] sceneFiles = AdvGame.GetSceneFiles();

            // First look for lines that already have an assigned lineID
            foreach (string sceneFile in sceneFiles)
            {
                SearchSceneForType(sceneFile, actionType);
            }

            // Settings
            if (KickStarter.settingsManager)
            {
                SearchAssetForType(KickStarter.settingsManager.actionListOnStart, actionType);
                if (KickStarter.settingsManager.activeInputs != null)
                {
                    foreach (ActiveInput activeInput in KickStarter.settingsManager.activeInputs)
                    {
                        SearchAssetForType(activeInput.actionListAsset, actionType);
                    }
                }
            }

            // Inventory
            if (KickStarter.inventoryManager)
            {
                SearchAssetForType(KickStarter.inventoryManager.unhandledCombine, actionType);
                SearchAssetForType(KickStarter.inventoryManager.unhandledHotspot, actionType);
                SearchAssetForType(KickStarter.inventoryManager.unhandledGive, actionType);

                // Item-specific events
                if (KickStarter.inventoryManager.items.Count > 0)
                {
                    foreach (InvItem item in (KickStarter.inventoryManager.items))
                    {
                        SearchAssetForType(item.useActionList, actionType);
                        SearchAssetForType(item.lookActionList, actionType);
                        SearchAssetForType(item.unhandledActionList, actionType);
                        SearchAssetForType(item.unhandledCombineActionList, actionType);

                        foreach (ActionListAsset actionList in item.combineActionList)
                        {
                            SearchAssetForType(actionList, actionType);
                        }

                        foreach (InvInteraction interaction in item.interactions)
                        {
                            if (interaction.actionList != null)
                            {
                                SearchAssetForType(interaction.actionList, actionType);
                            }
                        }
                    }
                }

                foreach (Recipe recipe in KickStarter.inventoryManager.recipes)
                {
                    SearchAssetForType(recipe.invActionList, actionType);
                    SearchAssetForType(recipe.actionListOnCreate, actionType);
                }
            }

            // Cursor
            if (KickStarter.cursorManager)
            {
                // Prefixes
                foreach (ActionListAsset actionListAsset in KickStarter.cursorManager.unhandledCursorInteractions)
                {
                    SearchAssetForType(actionListAsset, actionType);
                }
            }

            // Menus
            if (KickStarter.menuManager)
            {
                // Gather elements
                if (KickStarter.menuManager.menus.Count > 0)
                {
                    foreach (AC.Menu menu in KickStarter.menuManager.menus)
                    {
                        SearchAssetForType(menu.actionListOnTurnOff, actionType);
                        SearchAssetForType(menu.actionListOnTurnOn, actionType);

                        foreach (MenuElement element in menu.elements)
                        {
                            if (element is MenuButton)
                            {
                                MenuButton button = (MenuButton)element;
                                if (button.buttonClickType == AC_ButtonClickType.RunActionList)
                                {
                                    SearchAssetForType(button.actionList, actionType);
                                }
                            }
                            else if (element is MenuSavesList)
                            {
                                MenuSavesList button = (MenuSavesList)element;
                                SearchAssetForType(button.actionListOnSave, actionType);
                            }
                            else if (element is MenuCycle)
                            {
                                MenuCycle cycle = (MenuCycle)element;
                                SearchAssetForType(cycle.actionListOnClick, actionType);
                            }
                            else if (element is MenuJournal)
                            {
                                MenuJournal journal = (MenuJournal)element;
                                SearchAssetForType(journal.actionListOnAddPage, actionType);
                            }
                            else if (element is MenuSlider)
                            {
                                MenuSlider slider = (MenuSlider)element;
                                SearchAssetForType(slider.actionListOnChange, actionType);
                            }
                            else if (element is MenuToggle)
                            {
                                MenuToggle toggle = (MenuToggle)element;
                                SearchAssetForType(toggle.actionListOnClick, actionType);
                            }
                            else if (element is MenuProfilesList)
                            {
                                MenuProfilesList profilesList = (MenuProfilesList)element;
                                SearchAssetForType(profilesList.actionListOnClick, actionType);
                            }
                        }
                    }
                }
            }

            searchedAssets.Clear();
        }