protected StandardUIMenuPanel GetPanelFromNumber(MenuPanelNumber menuPanelNumber, StandardUIMenuPanel customMenuPanel)
        {
            switch (menuPanelNumber)
            {
            case MenuPanelNumber.Default:
                return(m_defaultPanel);

            case MenuPanelNumber.Custom:
                return(customMenuPanel);

            default:
                var index = PanelNumberUtility.GetMenuPanelIndex(menuPanelNumber);
                return((0 <= index && index < m_builtinPanels.Count) ? m_builtinPanels[index] : null);
            }
        }
Exemple #2
0
        private StandardUIMenuPanel GetDialogueActorPanel(DialogueActor dialogueActor)
        {
            if (dialogueActor == null)
            {
                return(null);
            }
            switch (dialogueActor.standardDialogueUISettings.menuPanelNumber)
            {
            case MenuPanelNumber.Default:
                return(m_defaultPanel);

            case MenuPanelNumber.Custom:
                return(dialogueActor.standardDialogueUISettings.customMenuPanel);

            default:
                var index = PanelNumberUtility.GetMenuPanelIndex(dialogueActor.standardDialogueUISettings.menuPanelNumber);
                return((0 <= index && index < m_builtinPanels.Count) ? m_builtinPanels[index] : null);
            }
        }