Exemplo n.º 1
0
        public void CopySlider(MenuSlider _element)
        {
            uiSlider = _element.uiSlider;
            label = _element.label;
            isClickable = _element.isClickable;
            textEffects = _element.textEffects;
            amount = _element.amount;
            anchor = _element.anchor;
            sliderTexture = _element.sliderTexture;
            sliderType = _element.sliderType;
            sliderDisplayType = _element.sliderDisplayType;
            blockSize = _element.blockSize;
            useFullWidth = _element.useFullWidth;
            varID = _element.varID;
            numberOfSteps = _element.numberOfSteps;

            base.Copy (_element);
        }
Exemplo n.º 2
0
        private void CopySlider(MenuSlider _element)
        {
            uiSlider = _element.uiSlider;
            label = _element.label;
            isClickable = _element.isClickable;
            textEffects = _element.textEffects;
            amount = _element.amount;
            minValue = _element.minValue;
            maxValue = _element.maxValue;
            anchor = _element.anchor;
            sliderTexture = _element.sliderTexture;
            sliderType = _element.sliderType;
            sliderDisplayType = _element.sliderDisplayType;
            blockSize = _element.blockSize;
            useFullWidth = _element.useFullWidth;
            varID = _element.varID;
            numberOfSteps = _element.numberOfSteps;
            actionListOnChange = _element.actionListOnChange;

            base.Copy (_element);
        }
Exemplo n.º 3
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();
        }