public void SetDataWeightByID(long id, int weight0) { FastGridItemData data = GetData(id); if (data != null) { data.SetWeight(weight0); } }
// 设置数据权重 public void SetDataWeightByIndex(int index, int weight0) { FastGridItemData data = GetDataByIndex(index); if (data != null) { data.SetWeight(weight0); } }
/// <summary> /// id一定不能==0 /// </summary> public void AddData1(long id, LuaTable table, int weight0, int weight1, float size = 0) { FastGridItemData data = new FastGridItemData(id, table); data.SetWeight(weight0); data.SetWeight1(weight1); if (size > 0) { data.SetSizeValue(size); } datas.Add(data); RepositionNow = true; }