Exemple #1
0
        public static void Open()
        {
            if (Instance != null)
            {
                return;
            }

            Instance = UIView.GetAView().AddUIComponent(typeof(UILoadWindow)) as UILoadWindow;
            UIView.PushModal(Instance);
        }
Exemple #2
0
 private void SaveLoadButtonOnEventClicked(UIComponent component, UIMouseEventParameter eventparam)
 {
     if (UISaveWindow.Instance != null)
     {
         UISaveWindow.Export(_fileNameLabel.text);
     }
     else
     {
         UILoadWindow.Close();
         PresetsUtils.Import(_fileNameLabel.text);
     }
 }
Exemple #3
0
        public static void Close()
        {
            if (Instance == null)
            {
                return;
            }

            UIView.PopModal();

            var modalEffect = Instance.GetUIView().panelsLibraryModalEffect;

            if (modalEffect != null && modalEffect.isVisible)
            {
                modalEffect.Hide();
            }

            Instance.UnsubscribeFromUiEvents();
            Instance.isVisible = false;
            Destroy(Instance.gameObject);
            Instance = null;
        }
        private void LoadPresetsButtonOnClicked(UIComponent component, UIMouseEventParameter parameter)
        {
            Log._Debug($"[{nameof(UIMainWindow)}.{nameof(LoadPresetsButtonOnClicked)}] Event triggered with parameter: {parameter}");

            UILoadWindow.Open();
        }