//////////////////////////////////////////////////////////////////////////////////////////////// /*--------------------------------------------------------------------------------------------*/ private void UpdateWithTransitions() { HoverpanelRowTransitioner row = gameObject.GetComponent <HoverpanelRowTransitioner>(); HoverpanelInterface panel = gameObject.GetComponent <HoverpanelInterface>(); FadeRow(panel.PreviousRow, 1 - row.TransitionProgressCurved); FadeRow(panel.ActiveRow, row.TransitionProgressCurved); }
//////////////////////////////////////////////////////////////////////////////////////////////// /*--------------------------------------------------------------------------------------------*/ public override void TreeUpdate() { HoverpanelRowTransitioner row = gameObject.GetComponent <HoverpanelRowTransitioner>(); HoverpanelInterface panel = gameObject.GetComponent <HoverpanelInterface>(); bool preventHigh = (row.IsTransitionActive); UpdateRow(panel.PreviousRow, preventHigh); UpdateRow(panel.ActiveRow, preventHigh); }
//////////////////////////////////////////////////////////////////////////////////////////////// /*--------------------------------------------------------------------------------------------*/ public void PerformBuild() { TreeUpdater treeUp = gameObject.AddComponent <TreeUpdater>(); HoverShapeRect shapeRect = gameObject.AddComponent <HoverShapeRect>(); HoverpanelInterface inter = gameObject.AddComponent <HoverpanelInterface>(); //// treeUp.enabled = false; var row0Go = new GameObject("RowRoot"); row0Go.transform.SetParent(gameObject.transform, false); BuildRow(row0Go); if (IncludeExampleRows) { BuildExampleRows(row0Go); } treeUp.enabled = true; //// shapeRect.SizeX = 0.3f; shapeRect.SizeY = 0.2f; inter.ActiveRow = row0Go.GetComponent <HoverLayoutRectRow>(); gameObject.AddComponent <HoverpanelRowSizer>(); HoverpanelRowTransitioner rowTrans = gameObject.AddComponent <HoverpanelRowTransitioner>(); rowTrans.RowEntryTransition = HoverpanelRowSwitchingInfo.RowEntryType.SlideFromTop; #if UNITY_EDITOR UnityEditor.Events.UnityEventTools.AddPersistentListener( inter.OnRowSwitchedEvent, rowTrans.OnRowSwitched); #else inter.OnRowSwitchedEvent.AddListener(rowTrans.OnRowSwitched); #endif gameObject.AddComponent <HoverpanelHighlightPreventer>(); gameObject.AddComponent <HoverpanelActiveDirection>(); gameObject.AddComponent <HoverpanelAlphaUpdater>(); treeUp.Update(); //forces entire interface to update }
/*--------------------------------------------------------------------------------------------*/ public void TreeUpdate() { UpdateFacingTransform(); HoverpanelInterface panel = GetComponent <HoverpanelInterface>(); HoverpanelRowTransitioner trans = GetComponent <HoverpanelRowTransitioner>(); if (OnlyDuringTransitions && !trans.IsTransitionActive) { return; } UpdateRow(panel.ActiveRow); UpdateRow(panel.PreviousRow); Controllers.TryExpireControllers(); }