void DrawSaveSettingSelect()
 {
     string[] savedSetNames   = new string[config.SettingsSets.Count];
     int[]    savedSetIndeces = new int[savedSetNames.Length];
     for (int i = 0; i < savedSetNames.Length; i++)
     {
         savedSetNames[i]   = config.SettingsSets[i].Name;
         savedSetIndeces[i] = i;
     }
     // Make sure a previously selected index still exists
     if (selectedSettingIndex >= savedSetNames.Length)
     {
         selectedSettingIndex = savedSetNames.Length - 1;
     }
     EditorGUILayout.BeginHorizontal();
     selectedSettingIndex = EditorGUILayout.IntPopup("Setting to Apply", selectedSettingIndex,
                                                     savedSetNames, savedSetIndeces);
     currentSelectedSettings = config.SettingsSets [selectedSettingIndex];
     if (GUILayout.Button("Edit", GUILayout.MaxWidth(80.0f)))
     {
         SpriteSettingsConfigWindow window =
             EditorWindow.GetWindow <SpriteSettingsConfigWindow>("Saved SpriteSettings", true);
         window.SelectSetting(selectedSettingIndex);
     }
     EditorGUILayout.EndHorizontal();
 }
Example #2
0
 void ShowConfigWindow(int indexToFocus)
 {
     configWindow = EditorWindow.GetWindow <SpriteSettingsConfigWindow>("Saved SpriteSettings", true);
     configWindow.SetConfig(config);
     configWindow.SelectSetting(indexToFocus);
 }