private IEnumerator AsyncEachChildUpdateImpl(DrawerUpdateParameters parameters, int executeMultiplier = 1) { foreach (var child in Children) { yield return(CreateAsyncUpdateImplRoutine(child, parameters, executeMultiplier)); } }
private static SHCoroutine CreateAsyncUpdateImplRoutine( Drawer drawer, DrawerUpdateParameters parameters, int executeMultiplier) { return(new SHCoroutine( drawer.AsyncUpdateImpl(parameters, executeMultiplier), drawer.HierarchicalName + "+AsyncUpdateImpl", executeMultiplier, drawer.OnAsyncUpdateDone)); }
private void EachChildUpdate(DrawerUpdateParameters parameters) { foreach (var child in Children) { child.Update(parameters); } }
private void DrawersUpdateIfNeeded(bool async, DrawerUpdateParameters parameters) { if (!drawersNeedUpdate) { return; } DrawersUpdate(async, parameters); drawersNeedUpdate = false; }
private void DeinitSearchFilter() { EndSearch(); drawerSearchUpdateParameters = null; searchFilter.SearchTextApplied -= OnSearchTextApplied; searchFilter.SearchTextApplying -= OnSearchTextApplying; searchFilter.SearchTextChanging -= OnSearchTextChanging; }
private void InitSearchFilter() { searchFilter.SearchTextChanging += OnSearchTextChanging; searchFilter.SearchTextApplying += OnSearchTextApplying; searchFilter.SearchTextApplied += OnSearchTextApplied; drawerSearchUpdateParameters = new DrawerUpdateParameters { MaxDepth = Settings.SearchDepth, DeepUpdate = true, ChildrenUpdatePrecondition = ChildrenUpdatePreconditionDuringSearch }; }
public void AsyncUpdate(DrawerUpdateParameters parameters, int executeMultiplier = 1, Action done = null) { if (DepthInHierarchy > parameters.MaxDepth) { return; } StopAsyncUpdate(); asyncUpdateDone = done; asyncUpdateRoutine = CreateAsyncUpdateImplRoutine(this, parameters, executeMultiplier); asyncUpdateRoutine.Start(); }
private void DrawersUpdate(bool async, DrawerUpdateParameters parameters) { for (int i = 0; i < RootValueDrawerCount; ++i) { var drawer = rootValueDrawers[i]; if (async) { drawer.AsyncUpdate(parameters); } else { drawer.Update(parameters); } } }
private bool CanChildrenUpdate(DrawerUpdateParameters parameters) { if (DepthInHierarchy > parameters.MaxDepth) { return(false); } var precondition = parameters.ChildrenUpdatePrecondition; if (precondition != null && !precondition(this)) { return(false); } return(true); }
public void Update(DrawerUpdateParameters parameters) { if (DepthInHierarchy > parameters.MaxDepth) { return; } SelfUpdate(); if (CanChildrenUpdate(parameters)) { ChildrenUpdate(); if (CanEachChildUpdate(parameters.DeepUpdate)) { EachChildUpdate(parameters); } } }
private IEnumerator AsyncUpdateImpl(DrawerUpdateParameters parameters, int executeMultiplier = 1) { if (DepthInHierarchy > parameters.MaxDepth) { yield break; } SelfUpdate(); yield return(null); if (CanChildrenUpdate(parameters)) { ChildrenUpdate(); if (CanEachChildUpdate(parameters.DeepUpdate)) { yield return(new SHCoroutine( AsyncEachChildUpdateImpl(parameters, executeMultiplier), HierarchicalName + "+AsyncEachChildUpdateImpl")); } } }
private void DrawersUpdateImmediate(bool async, DrawerUpdateParameters parameters) { DrawersUpdate(async, parameters); drawersNeedUpdate = false; }