// Use this for initialization void Start() { mLoopGridView.InitGridView(DataSourceMgr.Get.TotalItemCount, OnGetItemByRowColumn); mBackButton.onClick.AddListener(OnBackBtnClicked); mSelectAllButton.onClick.AddListener(OnSelectAllBtnClicked); mCancelAllButton.onClick.AddListener(OnCancelAllBtnClicked); mDeleteButton.onClick.AddListener(OnDeleteBtnClicked); }
// Use this for initialization void Start() { /*LoopGridViewSettingParam settingParam = new LoopGridViewSettingParam(); * settingParam.mItemSize = new Vector2(500, 500); * settingParam.mItemPadding = new Vector2(40, 40); * settingParam.mPadding = new RectOffset(10, 20, 30, 40); * settingParam.mGridFixedType = GridFixedType.RowCountFixed; * settingParam.mFixedRowOrColumnCount = 6; * mLoopGridView.InitGridView(DataSourceMgr.Get.TotalItemCount, OnGetItemByIndex, settingParam); */ mLoopGridView.InitGridView(DataSourceMgr.Get.TotalItemCount, OnGetItemByRowColumn); 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); }