예제 #1
0
        public void Show(FileSelectionViewControllerDelegate Delegate)
        {
            this.controllerDelegate = Delegate;

            this.containerRect = itemTemplate.transform.parent.GetComponent <RectTransform>();

            InputRegistry.shared.Register(InputType.All, this, EventHandleMode.ConsumeEvent);
            GestureRecognizerCollection.shared.GetAndroidBackButtonGestureRecognizer().OnGesture += OnAndroidBackButton;

            DeleteAllItemViews();
            gameObject.SetActive(true);
            RefreshSearch();
            searchInputField.text = "";
            searchInputField.onValueChanged.AddListener(delegate(string value) {
                this.searchResult = this.search.Find(value);
                Refresh();
            });

            Refresh();
            ScrollSelectedItemToTop();

                        #if !UNITY_IOS && !UNITY_ANDROID
            searchInputField.Select();
                        #endif
        }
예제 #2
0
 public void Close()
 {
     controllerDelegate = null;
     InputRegistry.shared.Deregister(this);
     GestureRecognizerCollection.shared.GetAndroidBackButtonGestureRecognizer().OnGesture -= OnAndroidBackButton;
     gameObject.SetActive(false);
 }