public void SaveState(DrawerActionScope scope) { foreach (var drawer in EnumerateByScope(scope)) { DrawerStates.Set(drawer.HierarchicalName, drawer.CreateState()); } }
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; }
public bool ApplySavedState() { var state = DrawerStates.Get(HierarchicalName); if (state == null) { return(false); } ApplyState(state); return(true); }
private void OnDestroy() { DrawerStates.Save(); }