Пример #1
0
        public static void ShowApplicationError(PopupInfo popupInfo)
        {
            StateLayer val = default(StateLayer);

            if (!StateManager.TryGetLayer("application", ref val))
            {
                val = StateManager.AddLayer("application");
            }
            StateManager.SetActiveInputLayer(val);
            popupInfo.style = PopupStyle.Error;
            Show(val, popupInfo);
        }
Пример #2
0
 private int Add(StateContext parentState, PopupInfo info)
 {
     if (parentState is PopupInfoState)
     {
         parentState = parentState.get_parent();
     }
     m_stackedId++;
     m_messages.Add(new StackedMessage(m_stackedId, info, parentState));
     if (m_messages.Count == 1)
     {
         Singleton <SceneEventListener> .instance.AddUpdateListener(Update);
     }
     return(m_stackedId);
 }
Пример #3
0
        public unsafe void Initialize(PopupInfo data)
        {
            //IL_00a2: Unknown result type (might be due to invalid IL or missing references)
            //IL_00ac: Expected O, but got Unknown
            //IL_00c0: Unknown result type (might be due to invalid IL or missing references)
            //IL_00d1: Unknown result type (might be due to invalid IL or missing references)
            m_useBlur = data.useBlur;
            m_buttonNormal.get_gameObject().SetActive(false);
            m_buttonNegative.get_gameObject().SetActive(false);
            m_buttonCancel.get_gameObject().SetActive(false);
            ApplyRawText(m_titleText, data.title);
            ApplyRawText(m_descriptionText, data.message);
            ButtonData[] buttons = data.buttons;
            if (buttons != null)
            {
                int num = buttons.Length;
                for (int i = 0; i < num; i++)
                {
                    AddButton(buttons[i]);
                }
            }
            if (data.closeOnBackgroundClick)
            {
                m_buttonBackground.get_onClick().AddListener(new UnityAction((object)this, (IntPtr)(void *) /*OpCode not supported: LdFtn*/));
            }
            PopupInfoStyle style = GetStyle(data.style);

            m_titleText.color       = style.titleColor;
            m_descriptionText.color = style.textColor;
            m_selectedIndex         = data.selectedButton - 1;
            if (m_selectedIndex < 0 || m_selectedIndex >= m_buttons.Count)
            {
                m_selectedIndex = 0;
            }
            if (m_buttons.Count > 0)
            {
                m_buttons[m_selectedIndex].Select();
            }
        }
Пример #4
0
 public PopupInfoState(PopupInfo data)
 {
     m_data = data;
 }
Пример #5
0
 public static int Show(StateContext parentState, PopupInfo info)
 {
     return(Singleton <PopupInfoManager> .instance.Add(parentState, info));
 }
Пример #6
0
 public StackedMessage(int id, PopupInfo info, StateContext parentState)
 {
     this.id          = id;
     this.info        = info;
     this.parentState = parentState;
 }