Exemple #1
0
 private void Awake()
 {
     instance      = this;
     rectTransform = transform as RectTransform;
     noticeText    = rectTransform.Find("NoticeText").GetComponent <Text>();
     cancelBtn     = rectTransform.Find("CancelBtn").GetComponent <Button>();
     sureBtn       = rectTransform.Find("SureBtn").GetComponent <Button>();
     sureBtn2      = rectTransform.Find("SureBtn2").GetComponent <Button>();
     cancelBtn.onClick.AddListener(CancelBtnClick);
     sureBtn.onClick.AddListener(SureBtnClick);
     sureBtn2.onClick.AddListener(SureBtnClick);
 }
Exemple #2
0
 public void SelectItem()
 {
     editorInstance.selectedItemIndex   = itemIndex;
     editorInstance.selectedTypeIndex   = typeIndex;
     editorInstance.selectedSpriteImage = itemSpriteImage;
     MainUI.SetSelectedImage(itemSpriteImage);
     // 초기화 버튼일 시 안내 창 띄움
     if (itemIndex == -1)
     {
         NoticeUI.AddToViewport(2);
     }
 }
Exemple #3
0
 // Start is called before the first frame update
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         Debug.LogWarning("Singleton Error! : " + this.name);
         Destroy(this);
     }
     noticeEntity = Resources.Load <GameObject>("Prefabs/UI/NoticeEntity");
     content      = transform.Find("Viewport").Find("Content");
     myScrollRect = transform.GetComponent <ScrollRect>();
 }
 public static bool IsExist()
 {
     if (noticeUI == null)
     {
         try
         {
             noticeUI = GameObject.Find("Tools_UI").transform.Find("NoticeUI").GetComponent <NoticeUI>();
         }
         catch (NullReferenceException e)
         {
             Debug.LogWarning("noticeUI object dosen't exist");
             noticeUI = null;
         }
         return(noticeUI != null);
     }
     else
     {
         return(true);
     }
 }
Exemple #5
0
 public void OnExportClicked()
 {
     NoticeUI.AddToViewport(1);
 }
Exemple #6
0
 public void OnLoadClicked()
 {
     NoticeUI.AddToViewport(3);
 }
Exemple #7
0
 public void OnCreateClicked()
 {
     NoticeUI.AddToViewport(0);
 }