//////////////////////////////////////////////////////////////////////////////////////////////// /*--------------------------------------------------------------------------------------------*/ public MenuState(IInputProvider pInputProv, NavRoot pNavRoot,InteractionSettings pSettings){ vInputProv = pInputProv; vSettings = pSettings; Arc = new ArcState(pNavRoot, vSettings); Cursor = new CursorState(vSettings); OnSideChange += (() => {}); }
//////////////////////////////////////////////////////////////////////////////////////////////// /*--------------------------------------------------------------------------------------------*/ public ArcState(NavRoot pNavRoot, InteractionSettings pSettings) { vNavRoot = pNavRoot; vSegments = new List<SegmentState>(); vSettings = pSettings; IsLeft = vSettings.IsMenuOnLeftSide; OnLevelChange += (d => {}); vNavRoot.OnLevelChange += HandleLevelChange; HandleLevelChange(0); }
//////////////////////////////////////////////////////////////////////////////////////////////// /*--------------------------------------------------------------------------------------------*/ public virtual InteractionSettings GetSettings() { if ( vSettings == null ) { vSettings = new InteractionSettings(); vSettings.IsMenuOnLeftSide = IsMenuOnLeftSide; vSettings.HighlightDistanceMin = HighlightDistanceMin; vSettings.HighlightDistanceMax = HighlightDistanceMax; vSettings.StickyReleaseDistance = StickyReleaseDistance; vSettings.SelectionMilliseconds = SelectionMilliseconds; vSettings.CursorForwardDistance = CursorForwardDistance; } return vSettings; }
//////////////////////////////////////////////////////////////////////////////////////////////// /*--------------------------------------------------------------------------------------------*/ public virtual InteractionSettings GetSettings() { if (vSettings == null) { vSettings = new InteractionSettings(); vSettings.IsMenuOnLeftSide = IsMenuOnLeftSide; vSettings.HighlightDistanceMin = HighlightDistanceMin; vSettings.HighlightDistanceMax = HighlightDistanceMax; vSettings.StickyReleaseDistance = StickyReleaseDistance; vSettings.SelectionMilliseconds = SelectionMilliseconds; vSettings.CursorForwardDistance = CursorForwardDistance; } return(vSettings); }
//////////////////////////////////////////////////////////////////////////////////////////////// /*--------------------------------------------------------------------------------------------*/ public SegmentState(NavItem pNavItem, InteractionSettings pSettings) { NavItem = pNavItem; vSettings = pSettings; }
//////////////////////////////////////////////////////////////////////////////////////////////// /*--------------------------------------------------------------------------------------------*/ public CursorState(InteractionSettings pSettings) { vSettings = pSettings; }