Exemplo n.º 1
0
 void Start()
 {
     //Debug.Log("this is favorite star");
     mLoopListView.InitListView(TotalItemCount, InitScrollView);
     mLoopListView.mOnEndDragAction = OnEndDrag;
     transform.parent.GetChild(3).gameObject.SetActive(false);
 }
Exemplo n.º 2
0
    public void Init(GameObject obj)
    {
        LoopListView.ArrangeType = ArrangeType;
        m_Content = LoopListView.transform.Find("Viewport/Content");
        GameObject insObj = Instantiate(obj);

        ItemName = insObj.name = "Item";
        RectTransform rt = insObj.GetComponent <RectTransform>();

        rt.anchorMin = new Vector2(0, 1f);
        rt.anchorMax = new Vector2(0, 1f);
        rt.pivot     = new Vector2(0, 1);
        insObj.transform.SetParent(m_Content);
        insObj.transform.localScale = Vector2.one;
        ItemPrefabConfData itemData = new ItemPrefabConfData();

        itemData.mItemPrefab      = insObj;
        itemData.mPadding         = SpacingY;
        itemData.mInitCreateCount = 0;
        itemData.mStartPosOffset  = SpacingX;
        List <ItemPrefabConfData> list = new List <ItemPrefabConfData>();

        list.Add(itemData);
        LoopListView.mItemPrefabDataList = list;

        DataManger = new ScrollViewData();
        DataManger.TotalDataCount = TotalCount;
        DataManger.Init();
        LoopListView.InitListView(DataManger.TotalDataCount, OnGetItemByIndex);
    }
Exemplo n.º 3
0
 public static void InitListView(this LoopListView2 view, LuaTable self, int num, LuaFunction onUpdate)
 {
     if (view != null)
     {
         view.InitListView(num, (LoopListView2 arg1, int arg2) => onGetItemByIndex(arg1, arg2, self, onUpdate));
     }
 }
Exemplo n.º 4
0
        // Use this for initialization
        void Start()
        {
            int count = TreeViewDataSourceMgr.Get.TreeViewItemCount;

            for (int i = 0; i < count; ++i)
            {
                int childCount = TreeViewDataSourceMgr.Get.GetItemDataByIndex(i).ChildCount;
                mTreeItemCountMgr.AddTreeItem(childCount, true);
            }


            mLoopListView.InitListView(mTreeItemCountMgr.GetTotalItemAndChildCount(), OnGetItemByIndex);

            mExpandAllButton    = GameObject.Find("ButtonPanel/buttonGroup1/ExpandAllButton").GetComponent <Button>();
            mScrollToButton     = GameObject.Find("ButtonPanel/buttonGroup2/ScrollToButton").GetComponent <Button>();
            mCollapseAllButton  = GameObject.Find("ButtonPanel/buttonGroup3/CollapseAllButton").GetComponent <Button>();
            mScrollToInputItem  = GameObject.Find("ButtonPanel/buttonGroup2/ScrollToInputFieldItem").GetComponent <InputField>();
            mScrollToInputChild = GameObject.Find("ButtonPanel/buttonGroup2/ScrollToInputFieldChild").GetComponent <InputField>();
            mScrollToButton.onClick.AddListener(OnJumpBtnClicked);
            mBackButton = GameObject.Find("ButtonPanel/BackButton").GetComponent <Button>();
            mBackButton.onClick.AddListener(OnBackBtnClicked);
            mExpandAllButton.onClick.AddListener(OnExpandAllBtnClicked);
            mCollapseAllButton.onClick.AddListener(OnCollapseAllBtnClicked);

            mStickeyHeadItemHeight = mStickeyHeadItem.GetComponent <RectTransform>().rect.height;


            mStickeyHeadItem.Init();
            mStickeyHeadItem.SetClickCallBack(this.OnExpandClicked);

            mLoopListView.ScrollRect.onValueChanged.AddListener(OnScrollContentPosChanged);
            UpdateStickeyHeadPos();
        }
        // Use this for initialization
        void Start()
        {
            mListItemTotalCount = DataSourceMgr.Get.TotalItemCount;
            int count = mListItemTotalCount / mItemCountPerRow;

            if (mListItemTotalCount % mItemCountPerRow > 0)
            {
                count++;
            }
            mLoopListView.InitListView(count, OnGetItemByIndex);

            mSetCountButton = GameObject.Find("ButtonPanel/buttonGroup1/SetCountButton").GetComponent <Button>();
            mScrollToButton = GameObject.Find("ButtonPanel/buttonGroup2/ScrollToButton").GetComponent <Button>();
            mAddItemButton  = GameObject.Find("ButtonPanel/buttonGroup3/AddItemButton").GetComponent <Button>();
            mSetCountInput  = GameObject.Find("ButtonPanel/buttonGroup1/SetCountInputField").GetComponent <InputField>();
            mScrollToInput  = GameObject.Find("ButtonPanel/buttonGroup2/ScrollToInputField").GetComponent <InputField>();
            mAddItemInput   = GameObject.Find("ButtonPanel/buttonGroup3/AddItemInputField").GetComponent <InputField>();
            mScrollToButton.onClick.AddListener(OnJumpBtnClicked);
            mAddItemButton.onClick.AddListener(OnAddItemBtnClicked);
            mSetCountButton.onClick.AddListener(OnSetItemCountBtnClicked);
            mBackButton = GameObject.Find("ButtonPanel/BackButton").GetComponent <Button>();
            mBackButton.onClick.AddListener(OnBackBtnClicked);
            mDragChangSizeScript.mOnDragEndAction = OnViewPortSizeChanged;
            OnViewPortSizeChanged();
        }
Exemplo n.º 6
0
        // Use this for initialization
        void Start()
        {
            int count = TreeViewDataSourceMgr.Get.TreeViewItemCount;

            //tells mTreeItemCountMgr there are how many TreeItems and every TreeItem has how many ChildItems.
            for (int i = 0; i < count; ++i)
            {
                int childCount = TreeViewDataSourceMgr.Get.GetItemDataByIndex(i).ChildCount;
                //second param "true" tells mTreeItemCountMgr this TreeItem is in expand status, that is to say all its children are showing.
                mTreeItemCountMgr.AddTreeItem(childCount, true);
            }


            //initialize the InitListView
            //mTreeItemCountMgr.GetTotalItemAndChildCount() return the total items count in the TreeView, include all TreeItems and all TreeChildItems.
            mLoopListView.InitListView(mTreeItemCountMgr.GetTotalItemAndChildCount(), OnGetItemByIndex);

            mExpandAllButton    = GameObject.Find("ButtonPanel/buttonGroup1/ExpandAllButton").GetComponent <Button>();
            mScrollToButton     = GameObject.Find("ButtonPanel/buttonGroup2/ScrollToButton").GetComponent <Button>();
            mCollapseAllButton  = GameObject.Find("ButtonPanel/buttonGroup3/CollapseAllButton").GetComponent <Button>();
            mScrollToInputItem  = GameObject.Find("ButtonPanel/buttonGroup2/ScrollToInputFieldItem").GetComponent <InputField>();
            mScrollToInputChild = GameObject.Find("ButtonPanel/buttonGroup2/ScrollToInputFieldChild").GetComponent <InputField>();
            mScrollToButton.onClick.AddListener(OnJumpBtnClicked);
            mBackButton = GameObject.Find("ButtonPanel/BackButton").GetComponent <Button>();
            mBackButton.onClick.AddListener(OnBackBtnClicked);
            mExpandAllButton.onClick.AddListener(OnExpandAllBtnClicked);
            mCollapseAllButton.onClick.AddListener(OnCollapseAllBtnClicked);
        }
        private void Start()
        {
            m_list = new List <ListItemData>();

            for (int i = 0; i < 1000; i++)
            {
                var charaIndex      = Random.Range(0, m_charaList.Length);
                var textIndex       = Random.Range(0, m_textList.Length);
                var imageIndex      = Random.Range(0, m_imageSpriteNameList.Length);
                var charaData       = m_charaList[charaIndex];
                var text            = m_textList[textIndex];
                var imageSpriteName = m_imageSpriteNameList[imageIndex];
                var isMessage       = Random.Range(0, 5) != 0;

                var data = new ListItemData
                           (
                    charaData: charaData,
                    message: isMessage ? text : null,
                    imageSpriteName: isMessage ? null : imageSpriteName
                           );

                m_list.Add(data);
            }

            m_view.InitListView(m_list.Count, OnUpdate);
        }
Exemplo n.º 8
0
 /// <summary>
 /// 加载数据
 /// </summary>
 void OnDataSourceRefreshFinished()
 {
     //OnGetItemByIndex:创建item和更新item数据
     mLoopListView.InitListView(SuperDataSourceMgr.Get.TotalItemCount + 1, OnGetItemByIndex);
     mLoopListView.mOnBeginDragAction = OnBeginDrag;
     mLoopListView.mOnDragingAction   = OnDraging;
     mLoopListView.mOnEndDragAction   = OnEndDrag;
 }
 /// <summary>
 /// 無限スクロールの初期化
 /// TODO 未完成 あとでいい感じに実装する
 /// </summary>
 /// <typeparam name="TExtensionInfiniteScroll"></typeparam>
 /// <typeparam name="TExtensionInfiniteScrollData"></typeparam>
 /// <param name="view"></param>
 /// <param name="scrollDataList"></param>
 public void InitInfiniteScroll <TExtensionInfiniteScroll, TExtensionInfiniteScrollData>(LoopListView2 view, List <TExtensionInfiniteScrollData> scrollDataList)
     where TExtensionInfiniteScroll : IExtensionInfiniteScrollItem
     where TExtensionInfiniteScrollData : ExtensionScrollItemData
 {
     OrtegaLogger.Log("無限スクロールの初期化");
     ScrollItemDataList = new List <ExtensionScrollItemData>(scrollDataList);
     view.InitListView(ScrollItemDataList.Count, OnUpdateInfiniteScroll <TExtensionInfiniteScroll>);
 }
Exemplo n.º 10
0
 void Start()
 {
     mLoopListView.InitListView(DataSourceMgr.Get.TotalItemCount + 1, OnGetItemByIndex);
     mLoopListView.mOnEndDragAction       = OnEndDrag;
     mLoopListView.mOnUpRefreshDragAction = OnUpRefreshDragAction;
     mLoopListView.mOnDownMoreDragAction  = OnDownMoreDragAction;
     InitButtons();
 }
 void Start()
 {
     // totalItemCount +1 because the last "load more" banner is also a item.
     mLoopListView.InitListView(DataSourceMgr.Get.TotalItemCount + 1, OnGetItemByIndex);
     mLoopListView.mOnBeginDragAction = OnBeginDrag;
     mLoopListView.mOnDragingAction   = OnDraging;
     mLoopListView.mOnEndDragAction   = OnEndDrag;
 }
 // Use this for initialization
 void Start()
 {
     mLoopListView.InitListView(ChatMsgDataSourceMgr.Get.TotalItemCount, OnGetItemByIndex);
     mScrollToButton = GameObject.Find("ButtonPanel/buttonGroup2/ScrollToButton").GetComponent <Button>();
     mScrollToInput  = GameObject.Find("ButtonPanel/buttonGroup2/ScrollToInputField").GetComponent <InputField>();
     mScrollToButton.onClick.AddListener(OnJumpBtnClicked);
     mBackButton = GameObject.Find("ButtonPanel/BackButton").GetComponent <Button>();
     mBackButton.onClick.AddListener(OnBackBtnClicked);
 }
Exemplo n.º 13
0
    void Start()
    {
        mLoopListView.InitListView(Card.Get.TotalItemCount, InitScrollView);
        mLoopListView.mOnEndDragAction = OnEndDrag;

        //Ghilman
        // just follow the numana code but in my why. which easy and right way to do.
        currentCardData = GameManager.Instance.mItemDataList[GameManager.Instance.cardIndex];
        if (isHistory)
        {
            if (currentCardData.mDuration.Equals("90"))
            {
                mStats.text = "Posted:" + currentCardData.mDate.Substring(0, 10);// + " | Duration:" + GameManager.Instance.mItemDataList[GameManager.Instance.mItemDataList.Count-1].mDuration+"s";
            }
            else if (currentCardData.mDuration.Equals("60"))
            {
                mStats.text = "Posted:" + currentCardData.mDate.Substring(0, 10);// + " | Duration:" + GameManager.Instance.mItemDataList[GameManager.Instance.mItemDataList.Count-1].mDuration+"s";
            }
            else if (currentCardData.mDuration.Equals("30"))
            {
                mStats.text = "Posted:" + currentCardData.mDate.Substring(0, 10);// + " | Duration:" + GameManager.Instance.mItemDataList[GameManager.Instance.mItemDataList.Count-1].mDuration+"s";
            }
            else
            {
                mStats.text = "Posted:" + currentCardData.mDate.Substring(0, 10);// + " | Duration: Unlimited";
            }
            //mName.text = "Mode: " + currentCardData.mName;
            mName.text  = "Mode: Solo";
            mRound.text = "Total Rounds: " + currentCardData.rData.Count.ToString();
        }
        else
        {
            // Numan's code
            if (GameManager.Instance.mItemDataList[GameManager.Instance.mItemDataList.Count - 1].mDuration.Equals("90"))
            {
                mStats.text = "Posted:" + GameManager.Instance.mItemDataList[GameManager.Instance.mItemDataList.Count - 1].mDate.Substring(0, 10);// + " | Duration:" + GameManager.Instance.mItemDataList[GameManager.Instance.mItemDataList.Count-1].mDuration+"s";
            }
            else if (GameManager.Instance.mItemDataList[GameManager.Instance.mItemDataList.Count - 1].mDuration.Equals("60"))
            {
                mStats.text = "Posted:" + GameManager.Instance.mItemDataList[GameManager.Instance.mItemDataList.Count - 1].mDate.Substring(0, 10);// + " | Duration:" + GameManager.Instance.mItemDataList[GameManager.Instance.mItemDataList.Count-1].mDuration+"s";
            }
            else if (GameManager.Instance.mItemDataList[GameManager.Instance.mItemDataList.Count - 1].mDuration.Equals("30"))
            {
                mStats.text = "Posted:" + GameManager.Instance.mItemDataList[GameManager.Instance.mItemDataList.Count - 1].mDate.Substring(0, 10);// + " | Duration:" + GameManager.Instance.mItemDataList[GameManager.Instance.mItemDataList.Count-1].mDuration+"s";
            }
            else
            {
                mStats.text = "Posted:" + GameManager.Instance.mItemDataList[GameManager.Instance.mItemDataList.Count - 1].mDate.Substring(0, 10);// + " | Duration: Unlimited";
            }

            mName.text  = "Mode: " + GameManager.Instance.mItemDataList[GameManager.Instance.mItemDataList.Count - 1].mName;
            mRound.text = "Total Rounds: " + GameManager.Instance.mItemDataList[GameManager.Instance.mItemDataList.Count - 1].rData.Count.ToString();
            // Numan's code
        }
        //Ghilman
        base.AddMouseDownEvent();
    }
Exemplo n.º 14
0
        // Use this for initialization
        void Start()
        {
            mLoopListView.InitListView(DataSourceMgr.Get.TotalItemCount, OnGetItemByIndex);

            mSelectAllButton.onClick.AddListener(OnSelectAllBtnClicked);
            mCancelAllButton.onClick.AddListener(OnCancelAllBtnClicked);
            mDeleteButton.onClick.AddListener(OnDeleteBtnClicked);
            mBackButton.onClick.AddListener(OnBackBtnClicked);
        }
Exemplo n.º 15
0
 void Start()
 {
     // 步骤0:创建默认的ScrollView,添加 LoopListView2 组件
     // 步骤1:将预制体拖入 LoopListView2 中,只能通过将预设体拖入
     // 步骤2:初始化 LoopListView2
     // -1:表示可以无限拖动   OnGetItemByIndex 表示对 Item 初始化数据时调用的方法
     // 10: 表示有限个
     listview.InitListView(-1, OnGetItemByIndex);
     //listview.InitListView(10, OnGetItemByIndex);
 }
Exemplo n.º 16
0
    private void Awake()
    {
        mLoopListView = UnityHelper.FindTheChildNode(gameObject, "Viewport").GetComponent <LoopListView2>();
        mLoopListView.InitListView(0, OnGetItemByIndex);

        scrollbar = UnityHelper.FindTheChildNode(gameObject, "Scrollbar").GetComponent <Scrollbar>();

        MessageMgr.AddMsgListener("AllMsgUIFormMsg", OnUIFormMessagesEvent);
        MessageMgr.AddMsgListener(Define.GLOBAL_MESSAGE_TYPE, OnGlobalMessagesEvent);
    }
Exemplo n.º 17
0
 // Use this for initialization
 void Start()
 {
     // totalItemCount +1 because the last "load more" button is also a item.
     mLoopListView.InitListView(DataSourceMgr.Get.TotalItemCount + 1, OnGetItemByIndex);
     mScrollToButton = GameObject.Find("ButtonPanel/buttonGroup2/ScrollToButton").GetComponent <Button>();
     mScrollToInput  = GameObject.Find("ButtonPanel/buttonGroup2/ScrollToInputField").GetComponent <InputField>();
     mScrollToButton.onClick.AddListener(OnJumpBtnClicked);
     mBackButton = GameObject.Find("ButtonPanel/BackButton").GetComponent <Button>();
     mBackButton.onClick.AddListener(OnBackBtnClicked);
 }
Exemplo n.º 18
0
        private void Start()
        {
            m_list = Enumerable
                     .Range(0, 1000)
                     .Select(c => (c + 1).ToString("0000"))
                     .Select(c => new ListItemData(c))
                     .ToArray()
            ;

            m_view.InitListView(m_list.Length, OnUpdate);
        }
Exemplo n.º 19
0
        int mItemTotalCount        = 100; //total item count in the GridView

        void Start()
        {
            int count = mItemTotalCount / mItemCountPerRow;

            if (mItemTotalCount % mItemCountPerRow > 0)
            {
                count++;
            }
            //count is the total row count
            mLoopListView.InitListView(count, OnGetItemByIndex);
        }
 // Use this for initialization
 void Start()
 {
     // totalItemCount +2 because the "pull to refresh" banner is also a item.
     mLoopListView.InitListView(DataSourceMgr.Get.TotalItemCount + 2, OnGetItemByIndex);
     mLoopListView.mOnDragingAction = OnDraging;
     mLoopListView.mOnEndDragAction = OnEndDrag;
     mScrollToButton = GameObject.Find("ButtonPanel/buttonGroup2/ScrollToButton").GetComponent <Button>();
     mScrollToInput  = GameObject.Find("ButtonPanel/buttonGroup2/ScrollToInputField").GetComponent <InputField>();
     mScrollToButton.onClick.AddListener(OnJumpBtnClicked);
     mBackButton = GameObject.Find("ButtonPanel/BackButton").GetComponent <Button>();
     mBackButton.onClick.AddListener(OnBackBtnClicked);
 }
Exemplo n.º 21
0
 // Use this for initialization
 void Start()
 {
     mLoopListView.InitListView(ChatMsgDataSourceMgr.Get.TotalItemCount, OnGetItemByIndex);
     mScrollToButton = GameObject.Find("ButtonPanel/buttonGroup2/ScrollToButton").GetComponent <Button>();
     mScrollToInput  = GameObject.Find("ButtonPanel/buttonGroup2/ScrollToInputField").GetComponent <InputField>();
     mScrollToButton.onClick.AddListener(OnJumpBtnClicked);
     mBackButton = GameObject.Find("ButtonPanel/BackButton").GetComponent <Button>();
     mBackButton.onClick.AddListener(OnBackBtnClicked);
     mAppendMsgButton = GameObject.Find("ButtonPanel/buttonGroup1/AppendButton").GetComponent <Button>();
     mAppendMsgButton.onClick.AddListener(OnAppendMsgBtnClicked);
     mDragChangSizeScript.mOnDragEndAction = OnViewPortHeightChanged;
     //mDragChangSizeScript.mOnDraggingAction = OnViewPortHeightChanged;
 }
Exemplo n.º 22
0
        // Use this for initialization
        void Start()
        {
            //init all superListView.
            mLoopListViewMonth.InitListView(-1, OnGetItemByIndexForMonth);
            mLoopListViewDay.InitListView(-1, OnGetItemByIndexForDay);
            mLoopListViewHour.InitListView(-1, OnGetItemByIndexForHour);
            //set all snap callback.
            mLoopListViewMonth.mOnSnapItemFinished   = OnMonthSnapTargetFinished;
            mLoopListViewMonth.mOnSnapNearestChanged = OnMonthSnapTargetChanged;
            mLoopListViewDay.mOnSnapNearestChanged   = OnDaySnapTargetChanged;
            mLoopListViewHour.mOnSnapNearestChanged  = OnHourSnapTargetChanged;

            mBackButton.onClick.AddListener(OnBackBtnClicked);
        }
Exemplo n.º 23
0
        void Start()
        {
            InitDots();
            LoopListViewInitParam initParam = LoopListViewInitParam.CopyDefaultInitParam();

            initParam.mSnapVecThreshold         = 99999;
            mLoopListView.mOnBeginDragAction    = OnBeginDrag;
            mLoopListView.mOnDragingAction      = OnDraging;
            mLoopListView.mOnEndDragAction      = OnEndDrag;
            mLoopListView.mOnSnapNearestChanged = OnSnapNearestChanged;
            mLoopListView.InitListView(mPageCount, OnGetItemByIndex, initParam);

            mBackButton = GameObject.Find("ButtonPanel/BackButton").GetComponent <Button>();
            mBackButton.onClick.AddListener(OnBackBtnClicked);
        }
        // Use this for initialization
        void Start()
        {
            mListItemTotalCount = DataSourceMgr.Get.TotalItemCount;
            int count = mListItemTotalCount / mItemCountPerRow;

            if (mListItemTotalCount % mItemCountPerRow > 0)
            {
                count++;
            }
            mLoopListView.InitListView(count, OnGetItemByIndex);
            mBackButton.onClick.AddListener(OnBackBtnClicked);
            mSelectAllButton.onClick.AddListener(OnSelectAllBtnClicked);
            mCancelAllButton.onClick.AddListener(OnCancelAllBtnClicked);
            mDeleteButton.onClick.AddListener(OnDeleteBtnClicked);
        }
Exemplo n.º 25
0
        // Use this for initialization
        void Start()
        {
            mFilerStr = "";
            InitData();//init the item data list.
            UpdateFilteredDataList();
            mLoopListView.InitListView(mFilteredDataList.Count, OnGetItemByIndex);

            mScrollToButton = GameObject.Find("ButtonPanel/buttonGroup2/ScrollToButton").GetComponent <Button>();
            mScrollToInput  = GameObject.Find("ButtonPanel/buttonGroup2/ScrollToInputField").GetComponent <InputField>();
            mScrollToButton.onClick.AddListener(OnJumpBtnClicked);

            mFilterButton = GameObject.Find("ButtonPanel/buttonGroup2/FilterButton").GetComponent <Button>();
            mFilterInput  = GameObject.Find("ButtonPanel/buttonGroup2/FilterInputField").GetComponent <InputField>();
            mFilterButton.onClick.AddListener(OnFilterButtonClicked);
        }
Exemplo n.º 26
0
        // Use this for initialization
        void Start()
        {
            InitData();//init the item data list.

            mLoopListView.InitListView(mDataList.Count, OnGetItemByIndex);


            mScrollToButton   = GameObject.Find("ButtonPanel/buttonGroup2/ScrollToButton").GetComponent <Button>();
            mAppendItemButton = GameObject.Find("ButtonPanel/buttonGroup3/AppendItemButton").GetComponent <Button>();
            mInsertItemButton = GameObject.Find("ButtonPanel/buttonGroup3/InsertItemButton").GetComponent <Button>();

            mScrollToInput = GameObject.Find("ButtonPanel/buttonGroup2/ScrollToInputField").GetComponent <InputField>();
            mScrollToButton.onClick.AddListener(OnJumpBtnClicked);
            mAppendItemButton.onClick.AddListener(OnAppendItemBtnClicked);
            mInsertItemButton.onClick.AddListener(OnInsertItemBtnClicked);
        }
Exemplo n.º 27
0
        // Use this for initialization
        void Start()
        {
            // totalItemCount +2 because the "pull to refresh" banner is also a item.
            mLoopListView.InitListView(GetMaxRowCount() + 2, OnGetItemByIndex);

            mDragChangSizeScript.mOnDragEndAction = OnViewPortSizeChanged;
            mLoopListView.mOnDragingAction        = OnDraging;
            mLoopListView.mOnEndDragAction        = OnEndDrag;
            OnViewPortSizeChanged();

            mScrollToButton = GameObject.Find("ButtonPanel/buttonGroup2/ScrollToButton").GetComponent <Button>();
            mScrollToInput  = GameObject.Find("ButtonPanel/buttonGroup2/ScrollToInputField").GetComponent <InputField>();
            mScrollToButton.onClick.AddListener(OnJumpBtnClicked);
            mBackButton = GameObject.Find("ButtonPanel/BackButton").GetComponent <Button>();
            mBackButton.onClick.AddListener(OnBackBtnClicked);
        }
Exemplo n.º 28
0
 public void ShowSelected(NodeInfo node)
 {
     lastAffair = "";
     lastOffY   = 0f;
     data       = node.entity.experiences;
     gameObject.SetActive(true);
     canvasGroup.interactable   = true;
     canvasGroup.blocksRaycasts = true;
     canvasGroup.alpha          = 0f;
     canvasGroup.DOFade(1f, 0.3f);
     scrollViewer.InitListView(data.Count, GetItemHandle);
     if (data != null && data.Count > 0)
     {
         UpdateAnchorStep(data[0]);
     }
     //StartCoroutine(CreateItemInspector(node.personage.experiences));
 }
Exemplo n.º 29
0
        private void Start()
        {
            m_list = Enumerable
                     .Range(0, 5)
                     .Select(c => (c + 1).ToString("0000"))
                     .Select(c => new ListItemData(c))
                     .ToArray()
            ;

            var initParam = new LoopListViewInitParam
            {
                mSmoothDumpRate   = 0.1f,
                mSnapVecThreshold = 99999,
            };

            m_view.mOnSnapNearestChanged = OnSnapNearestChanged;
            m_view.InitListView(-1, OnUpdate, initParam);
        }
        /// <summary>
        /// ループするバナーの初期化(ボタン付き
        /// </summary>
        /// <typeparam name="TExtensionBanner"></typeparam>
        /// <typeparam name="TExtensionBannerData"></typeparam>
        /// <param name="view"></param>
        /// <param name="dotAction"></param>
        /// <param name="bannerDataList"></param>
        public void InitBannerLoop <TExtensionBanner, TExtensionBannerData>(LoopListView2 view, Action <int> dotAction, List <TExtensionBannerData> bannerDataList)
            where TExtensionBanner : IExtensionBanner
            where TExtensionBannerData : ExtensionScrollItemData
        {
            var initParam = new LoopListViewInitParam
            {
                mSmoothDumpRate   = 0.1f,
                mSnapVecThreshold = 99999,
            };

            ScrollItemDataList = new List <ExtensionScrollItemData>(bannerDataList);
            DotAction          = dotAction;

            view.mOnSnapNearestChanged = OnUpdateBannerDot;
            view.InitListView(-1, OnUpdateBanner <TExtensionBanner>, initParam);

            //自動スクロール(Intervalで図る
        }