override protected void Update() { base.Update(); if (Input.GetKeyDown(KeyCode.Escape)) { DynamicScrollView2 scrollView = FindObjectOfType <DynamicScrollView2>(); if (null != scrollView) { if (scrollView.IsDetailedCardActive) { scrollView.CloseDetailCard(); return; } else if (model.mainStateParent.GetComponent <UIWidget>().alpha != 1) // checks to see if the main state or history state for the profile view is seen { OnHistoryBackPressed(); } else { ITTMainSceneManager.Instance.currentState = ITTMainSceneManager.ITTStates.Main; } } } model.loadingIcon.transform.Rotate(Vector3.forward * 360 * Time.deltaTime); if (model.historyScrollView != null && model.historyScrollView.transform.localScale != Vector3.one) { model.historyScrollView.transform.localScale = Vector3.one; } }
public IEnumerator OnDisplay() { dynamicScrollViewObject = NGUITools.AddChild(gameObject); dynamicScrollViewObject.name = "ScrollViewHolder"; dynamicScrollViewObject.transform.localPosition = new Vector3(0f, -60f, 0f); dynamicScrollView = dynamicScrollViewObject.AddComponent <DynamicScrollView2>(); gameObject.SetActive(true); StartCoroutine(PlayLoadingAnimation()); yield return(StartCoroutine(HelperMethods.Instance.AnimateIn(gameObject))); model.noFilterCard.gameObject.SetActive(false); ITTDataCache.Instance.RequestCombinedActivities(OnFilterSuccess, OnFilterFailure, _filterRequest); }
public IEnumerator OnDisplay() { dynamicScrollViewObject = NGUITools.AddChild(gameObject); dynamicScrollViewObject.name = "ScrollViewHolder"; dynamicScrollViewObject.transform.localPosition = new Vector3(0f, -60f, 0f); dynamicScrollView = dynamicScrollViewObject.AddComponent<DynamicScrollView2>(); gameObject.SetActive(true); StartCoroutine(PlayLoadingAnimation()); yield return StartCoroutine(HelperMethods.Instance.AnimateIn(gameObject)); model.noFilterCard.gameObject.SetActive(false); ITTDataCache.Instance.RequestCombinedActivities(OnFilterSuccess, OnFilterFailure, _filterRequest); }
private void Update() { if (Input.GetKeyDown(KeyCode.Escape)) { DynamicScrollView2 scrollView = FindObjectOfType <DynamicScrollView2>(); if (null != scrollView) { if (scrollView.IsDetailedCardActive) { scrollView.CloseDetailCard(); return; } } ReturnToFilter(); } }
// Use this for initialization void Start() { _swipeState = SwipeState.None; _isFirstTouch = true; _uiScrollView = GetComponentInChildren <UIScrollView>(); if (null == _uiScrollView) { throw new MissingComponentException("TestSwipeScripts.Start - can't get UIScrollView component for _uiScrollView"); } _startingMomentum = _uiScrollView.momentumAmount; _uiScrollView.panel.clipping = UIDrawCall.Clipping.None; _panel = _uiScrollView.GetComponent <UIPanel>(); if (null == _panel) { throw new MissingComponentException("TestSwipeScripts.Start - can't get UIPanel component for _panel"); } DynamicScrollView2 dynamicScrollView = FindObjectOfType <DynamicScrollView2>(); if (null == dynamicScrollView) { throw new NullReferenceException("TestSwipeScripts.Start - can't find DynamicScrollView object"); } _thresholdDistanceToCloseCard = dynamicScrollView.closeDetailCardThresholdHorizontal; _thresholdDistanceVerticalToCloseCard = dynamicScrollView.closeDetailCardThreshold; ScrollViewContainer = NGUITools.FindInParents <UIWidget>(_uiScrollView.transform); if (null == ScrollViewContainer) { throw new MissingComponentException("TestSwipeScripts.Start - can't get UIWidget component for _scrollViewContainer"); } _currentScale = Vector3.one; _previousMovementState = UIScrollView.Movement.Custom; }
private void Update() { if (Input.GetKeyDown(KeyCode.Escape)) { DynamicScrollView2 scrollView = FindObjectOfType <DynamicScrollView2>(); if (null != scrollView) { if (scrollView.IsDetailedCardActive) { scrollView.CloseDetailCard(); return; } } ITTMainSceneManager.Instance.currentState = ITTMainSceneManager.ITTStates.Main; } }