Ejemplo n.º 1
0
        private void createGridUIs()
        {
            _allGridUIs.Clear();

            for (int rowIndex = 0; rowIndex < editorData.rowCount; rowIndex++)
            {
                Dictionary <string, IGridData> rowData = editorData.getRow(rowIndex);
                if (rowData.Count > 0)
                {
                    List <IGridUI> row = new List <IGridUI>();

                    for (int colIndex = 0; colIndex < editorData.columnCount; colIndex++)
                    {
                        string  titleName          = editorData.getTitle(colIndex);
                        int     mayBeModifiedIndex = rowIndex;
                        IGridUI grid = GridGUIManager.getInstance().createGridUI(rowData[titleName]);
                        grid.dataChangeAction = () =>
                        {
                            editorData.modify(titleName, mayBeModifiedIndex, grid.getData());
                            EditorUtility.SetDirty(target);
                        };
                        grid.title = titleName;
                        row.Add(grid);
                    }

                    _allGridUIs.Add(row);
                }
            }
        }
Ejemplo n.º 2
0
 public static GridGUIManager getInstance()
 {
     if (_instance == null)
     {
         _instance = new GridGUIManager();
     }
     return(_instance);
 }