예제 #1
0
        public static WindowPanelBuilder Create(string title)
        {
            title = TextHelper.Cap(title);
            GameObject act = Instantiate(UIElements.Get().panelWindow, GameObject.Find("WindowsMgmt").transform);

            act.name = title;
            act.transform.GetComponentInChildren <Text>().text = title;

            act.GetComponent <WindowPanelBuilder>().panel = PanelBuilder.Create(act.transform.GetChild(0).GetChild(2).transform);
            return(act.GetComponent <WindowPanelBuilder>());
        }
예제 #2
0
        private void ShowDetail()
        {
            if (infoPanel.transform.childCount > 0)
            {
                UIHelper.ClearChild(infoPanel);
            }

            PanelBuilder p = PanelBuilder.Create(infoPanel.transform);

            selectedElement.ShowDetail(p);
            p.CalcSize();
            NAudio.Play(selectedElement.audioSwitch);
        }
예제 #3
0
        private void ShowDetail()
        {
            if (infoPanel.transform.childCount > 0)
            {
                foreach (Transform child in infoPanel.transform)
                {
                    Destroy(child.gameObject);
                }
                ;
            }

            PanelBuilder p = PanelBuilder.Create(infoPanel.transform);

            selectedElement.ShowDetail(p);
            p.CalcSize();
            NAudio.Play(selectedElement.audioSwitch);
        }