public void CallPreviousPanel(UMUI.Data data) { var temp = currentPanel; currentPanel?.Hide(); previousPanel?.Show(data); currentPanel = previousPanel; previousPanel = temp; }
public virtual void ShowAdditivePanel(string panelName, UMUI.Data data) { foreach (var panel in panels) { if (panel.Name == panelName) { panel.Show(data); currentPanel = panel; } } }
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(); } } } }
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"); }