예제 #1
0
        ////////////////////////////////////////////////////////////////////////////////////////////////
        /*--------------------------------------------------------------------------------------------*/
        public void Awake()
        {
            if (RowContainer == null)
            {
                RowContainer = gameObject.transform.Find("Rows");
            }

            if (ActiveRow == null)
            {
                ActiveRow = GetComponentInChildren <HoverLayoutArcRow>();
            }
        }
        /*--------------------------------------------------------------------------------------------*/
        private void BuildRow(GameObject pRowGo, string pRowTitle)
        {
            pRowGo.AddComponent <TreeUpdater>();

            HoverLayoutArcRow layoutArc = pRowGo.AddComponent <HoverLayoutArcRow>();

            layoutArc.ArcDegrees    = 90;
            layoutArc.DegreePadding = 0.2f;

            HovercastRowTitle title = pRowGo.AddComponent <HovercastRowTitle>();

            title.RowTitle = pRowTitle;
        }
예제 #3
0
        /*--------------------------------------------------------------------------------------------*/
        private void FadeRow(HoverLayoutArcRow pRow, float pAlpha)
        {
            if (pRow == null || !pRow.gameObject.activeSelf)
            {
                return;
            }

            pRow.GetComponentsInChildren(true, vItemDataResults);

            for (int i = 0; i < vItemDataResults.Count; i++)
            {
                FadeItem(vItemDataResults[i], pAlpha);
            }
        }
        ////////////////////////////////////////////////////////////////////////////////////////////////
        /*--------------------------------------------------------------------------------------------*/
        private void UpdateRow(HoverLayoutArcRow pRow, bool pPreventHighlight)
        {
            if (pRow == null || !pRow.gameObject.activeSelf)
            {
                return;
            }

            pRow.GetComponentsInChildren(true, vItemHighStateResults);

            for (int i = 0; i < vItemHighStateResults.Count; i++)
            {
                UpdateHighState(vItemHighStateResults[i], pPreventHighlight);
            }
        }
예제 #5
0
        ////////////////////////////////////////////////////////////////////////////////////////////////
        /*--------------------------------------------------------------------------------------------*/
        public void NavigateBack(HovercastRowSwitchingInfo.RowEntryType pRowEntry =
                                 HovercastRowSwitchingInfo.RowEntryType.FromInside)
        {
            if (vRowHistory.Count == 0)
            {
                Debug.LogWarning("Can't navigate back. No rows left in history.");
                return;
            }

            PreviousRow = ActiveRow;
            ActiveRow   = vRowHistory.Pop();

            OnRowSwitchedEvent.Invoke(pRowEntry);
        }
예제 #6
0
        ////////////////////////////////////////////////////////////////////////////////////////////////
        /*--------------------------------------------------------------------------------------------*/
        public void Start()
        {
            HovercastInterface cast = GetComponent <HovercastInterface>();

            foreach (Transform childTx in cast.RowContainer)
            {
                HoverLayoutArcRow row = childTx.GetComponent <HoverLayoutArcRow>();

                if (row != null && row != cast.ActiveRow)
                {
                    childTx.gameObject.SetActive(false);
                }
            }
        }
예제 #7
0
        /*--------------------------------------------------------------------------------------------*/
        public void NavigateToRow(HoverLayoutArcRow pRow,
                                  HovercastRowSwitchingInfo.RowEntryType pRowEntry)
        {
            if (pRow == null)
            {
                Debug.LogError("Could not navigate to null/missing row.");
                return;
            }

            vRowHistory.Push(ActiveRow);
            //Debug.Log("Added row to history ("+vRowHistory.Count+"): "+ActiveRow, ActiveRow);

            PreviousRow = ActiveRow;
            ActiveRow   = pRow;

            OnRowSwitchedEvent.Invoke(pRowEntry);
        }
예제 #8
0
        /*--------------------------------------------------------------------------------------------*/
        private void BuildRow(GameObject pRowGo, string pRowTitle)
        {
            pRowGo.AddComponent <TreeUpdater>();

            HoverLayoutArcRow layoutArc = pRowGo.AddComponent <HoverLayoutArcRow>();

            layoutArc.ArcDegrees = 90;

            HoverLayoutArcPaddingSettings layoutArcPad = layoutArc.Padding;

            layoutArcPad.Between = 0.15f;
            layoutArc.Padding    = layoutArcPad;

            HovercastRowTitle title = pRowGo.AddComponent <HovercastRowTitle>();

            title.RowTitle = pRowTitle;
        }
예제 #9
0
 /*--------------------------------------------------------------------------------------------*/
 public void Start()
 {
     PreviousRow = null;
 }