예제 #1
0
        public void CallPreviousPanel(UMUI.Data data)
        {
            var temp = currentPanel;

            currentPanel?.Hide();
            previousPanel?.Show(data);
            currentPanel  = previousPanel;
            previousPanel = temp;
        }
예제 #2
0
 public virtual void ShowAdditivePanel(string panelName, UMUI.Data data)
 {
     foreach (var panel in panels)
     {
         if (panel.Name == panelName)
         {
             panel.Show(data);
             currentPanel = panel;
         }
     }
 }
예제 #3
0
 public virtual void ShowPanel(string panelName, UMUI.Data data = null)
 {
     foreach (IPanel panel in panels)
     {
         if (panel.Name == panelName)
         {
             panel.Show(data);
             previousPanel = currentPanel;
             currentPanel  = panel;
         }
         else
         {
             if (panel.panelObject.activeSelf)
             {
                 panel.Hide();
             }
         }
     }
 }
예제 #4
0
        public override void Show(UMUI.Data data)
        {
            if (data == null)
            {
                return;
            }
            var d = (GenericPanelData)data;

            panelObject.transform.SetAsLastSibling();
            Buttons[1].onClick.RemoveAllListeners();             // negative
            Buttons[0].onClick.RemoveAllListeners();             //Position
            Buttons[1].gameObject.SetActive(true);
            panelObject.SetActive(true);
            titleText.text       = d.title;
            descriptionText.text = d.message;
            negativeText.text    = d.negativeText;
            Buttons[1].onClick.AddListener(Hide);
            if (d.negativeEvent != null)
            {
                Buttons[1].onClick.AddListener(EventHandler.ButtonSound.Send);
                Buttons[1].onClick.AddListener(d.negativeEvent);
            }

            if (d.isPositiveButton)
            {
                Buttons[0].gameObject.SetActive(true);
                if (d.positiveEvent != null)
                {
                    Buttons[0].onClick.AddListener(EventHandler.ButtonSound.Send);
                    Buttons[0].onClick.AddListener(Hide);
                    Buttons[0].onClick.AddListener(d.positiveEvent);
                }

                positiveText.text = d.positiveText;
            }

            EventHandler.AnalyticsEvent.Send($"{d.title}_Panel_Opened");
        }
 public virtual void Show(UMUI.Data data)
 {
     panelObject.SetActive(true);
     panelObject.transform.SetAsLastSibling();
     EventHandler.AnalyticsEvent.Send($"{Name}_Opened");
 }