예제 #1
0
 private void SetupListSection()
 {
     TreesList                  = UIFastList.Create <TreeItem>(centerPanel);
     TreesList.zOrder           = 0;
     TreesList.backgroundSprite = "UnlockingPanel";
     TreesList.size             = new Vector2(width - Constants.UISpacing * 2, 420f);
     SetupFastlist();
 }
예제 #2
0
        /// <summary>
        /// Use this to create the UIFastList.
        /// Do NOT use AddUIComponent.
        /// I had to do that way because MonoBehaviors classes cannot be generic
        /// </summary>
        /// <typeparam name="T">The type of the row UI component</typeparam>
        /// <param name="parent"></param>
        /// <returns></returns>
        public static UIFastList Create <T>(UIComponent parent)
            where T : UIPanel, IUIFastListRow
        {
            UIFastList list = parent.AddUIComponent <UIFastList>();

            list.m_rowType = typeof(T);
            return(list);
        }