/// <summary>
        /// 清空数据
        /// </summary>
        /// <param name="table"></param>
        /// <param name="keys"></param>
        public void ClearData(KGUI_Table table, List <Vector2Int> keys)
        {
            if (table == null)
            {
                Debug.Log("移除数据:表格对象为Null");
                return;
            }

            table.ClearData(keys);
        }
        public void AddData(KGUI_Table table, Vector2Int vector, string data)
        {
            if (table == null)
            {
                Debug.Log("添加数据:表格对象为Null");
                return;
            }

            table.AddData(vector, data);
        }
        /// <summary>
        /// 添加数据
        /// </summary>
        /// <param name="table"></param>
        /// <param name="datas"></param>
        public void AddData(KGUI_Table table, Dictionary <Vector2Int, string> datas)
        {
            if (table == null)
            {
                Debug.Log("添加数据:表格对象为Null");
                return;
            }

            table.AddData(datas);
        }
Exemple #4
0
        /// <summary>
        /// 设置表格
        /// </summary>
        protected virtual void SetTable(int i = 0)
        {
            KGUI_Table table = tableManager.Tables[i];
            Dictionary <Vector2Int, string> dict = new Dictionary <Vector2Int, string>();

            for (int index = 0; index < heads.Length; index++)
            {
                dict.Add(new Vector2Int(0, index), heads[index]);
            }
            tableManager.AddData(tableManager.Tables[i], dict);
        }
Exemple #5
0
        private void OnEnable()
        {
            table = serializedObject.targetObject as KGUI_Table;

            cellObject = serializedObject.FindProperty("cellObject");
            rowObject  = serializedObject.FindProperty("rowObject");
            rowParent  = serializedObject.FindProperty("rowParent");
            Rows       = serializedObject.FindProperty("Rows");
            Merges     = serializedObject.FindProperty("Merges");

            cellBackground = serializedObject.FindProperty("cellBackground");
        }
 public void AddCloumn(KGUI_Table table)
 {
 }
        public void AddRow(KGUI_Table table)
        {
            int i = table.Rows.Count;

            table.CreatRow(i);
        }