예제 #1
0
 public GridView(ViewGroupManager owner, GridLayouter gridLayouter, GridViewHandler viewHandler = null) : base(owner)
 {
     m_ViewConfig      = new GridViewConfig();
     m_GridLayouter    = gridLayouter;
     m_DataSource      = m_GridLayouter.DataSource;
     m_GridViewHandler = viewHandler;
     if (m_GridViewHandler == null)
     {
         m_GridViewHandler = new GridViewHandler(m_DataSource);
     }
     m_GridLayouter.Owner = this;
     m_RenameOverlay.Clear();
 }
예제 #2
0
 public void LoadConfig(string configName, EditorWindowConfigSource configSource)
 {
     if (configSource != null && !string.IsNullOrEmpty(configName))
     {
         var viewConfig = configSource.GetValue <GridViewConfig>(configName);
         if (viewConfig != null)
         {
             viewConfig.SetConfigSource(configSource);
             m_ViewConfig = viewConfig;
             if (GridSizeChangedAction != null)
             {
                 GridSizeChangedAction(m_ViewConfig.GridSize);
             }
         }
         else
         {
             viewConfig = new GridViewConfig();
             viewConfig.SetConfigSource(configSource);
             configSource.SetValue(configName, viewConfig);
         }
     }
 }