Example #1
0
 public void SaveState(DrawerActionScope scope)
 {
     foreach (var drawer in EnumerateByScope(scope))
     {
         DrawerStates.Set(drawer.HierarchicalName, drawer.CreateState());
     }
 }
Example #2
0
        protected virtual void ResetVisibility(bool bySavedStates)
        {
            var state = bySavedStates ? DrawerStates.Get(HierarchicalName) : null;

            SelfVisible     = state != null ? state.SelfVisible : DefaultSelfVisible;
            ChildrenVisible = state != null ? state.ChildrenVisible : IsRoot;
        }
Example #3
0
        public bool ApplySavedState()
        {
            var state = DrawerStates.Get(HierarchicalName);

            if (state == null)
            {
                return(false);
            }
            ApplyState(state);
            return(true);
        }
Example #4
0
 private void OnDestroy()
 {
     DrawerStates.Save();
 }