private void DrawFileList()
{
Rect box = new Rect( 5, 52, EditorRect.width-10, EditorRect.height - 105 );
DrawRect( new Rect( 0, 50, EditorRect.width, 15), new Color(.6f,.6f,.6f));
GUI.skin.label.fontSize = 8;
EditorStyles.popup.fixedHeight= 20;
EditorStyles.miniButtonLeft.fontSize = 8;
EditorStyles.miniButtonMid.fontSize = 8;
EditorStyles.miniButtonRight.fontSize = 8;
GUI.Label(new Rect( 5, 50, 100, 15) , "Convert File List" );
GUI.Label(new Rect( 460, 70, 70, 25) , "Export\nExtension" );
GUI.BeginGroup( box );
GUI.Box( new Rect( 5, 45, box.width-10, box.height - 50) , "");
GUI.Box( new Rect( 10, 60, box.width-20, box.height - 74) , "");
GUI.skin.label.fontSize = 9;
GUI.skin.label.alignment = TextAnchor.MiddleCenter;
GUI.Label(new Rect(15, 40, sideWidth-15, 25 ), "Resource");
GUI.Label(new Rect(sideWidth+15, 40, box.width-20-sideWidth, 25 ), "Convert To");
GUI.skin.label.alignment = TextAnchor.MiddleLeft;
GUI.skin.label.fontSize = 8;
GUI.skin.button.fontSize = 7;
if(GUI.Button( new Rect( 5, 20, 80, 20 ), new GUIContent( "TextureImporter\nSettings","General settings for the unity TextureImporter"))) TextImportSetup();
GUI.skin.button.fontSize = 8;
if(GUI.Button( new Rect( 100, 20, 80, 20), new GUIContent("Add" , "Add a file to the converter list"), EditorStyles.miniButtonLeft)) AddFile();
if( draw )GUI.enabled = ( selectedIndex != -1 ) ? true : false;
if(GUI.Button( new Rect( 180, 20, 80, 20), new GUIContent("Delete", "Remove selected file from the converter list"), EditorStyles.miniButtonMid)) DeleteFile();
if( draw )GUI.enabled = ( fLength > 0 ) ? true : false;
if(GUI.Button( new Rect( 260, 20, 80, 20), new GUIContent( "Clear List", "Clear the complete converter list"), EditorStyles.miniButtonRight)) DeleteAll();
if( draw )GUI.enabled = true;
fTemp = fType;
fType = EditorGUI.Popup( new Rect( 500, 20, 60, 25 ), fType, fTypes);
GUI.Button( new Rect(box.width - 65, 20, 60, 25), new GUIContent("" , "Select a Extension for the export files"), GUIStyle.none);
GUI.EndGroup();
if( fLength > 0 ){
scrollPos = GUI.BeginScrollView( new Rect( 16, 113, box.width-22, box.height - 76), scrollPos, new Rect( 0, 0, box.width-42 , (22 * fLength)));
GUI.skin.label.alignment = TextAnchor.MiddleLeft;
Handles.color = new Color( .6f, .6f, .6f, .6f);
for( int j = 0; j < fLength; j++ ) Handles.DrawLine( new Vector3(0 , Mathf.RoundToInt(-2+j*22)+22, 0) , new Vector3( box.width , Mathf.RoundToInt(-2+j*22)+22 , 0));
Handles.color = Color.white;
for( int i = 0; i < fLength; i++ )
{
if( fList[i] != null ){
GUI.color = (selectedIndex == i) ? new Color( 1, .5f, 0, .3f) : new Color( 1, 1, 1, .5f);
if( GUI.Button(new Rect( -10 , -2+i*22, box.width-5, 21), "", ListStyle( i ))){;
if(selectedIndex == i){
selectedIndex = -1;
}else if(selectedIndex != i) selectedIndex = i;
}
GUI.color = Color.white;
GUI.Label( new Rect( 10 , 2 +i*22, sideWidth-22, 20), fList[i], GUIStyle.none );
GUI.Label( new Rect( sideWidth, 2+i*22, EditorRect.width-sideWidth+10, 20), Path.GetFileNameWithoutExtension( fList[i] ) + "."+ fTypes[fType], GUIStyle.none);
}
}
GUI.EndScrollView();
}
GUIDraw.DrawLine(new Vector2( sideWidth+box.x, 45+box.y ), new Vector2( sideWidth+box.x, box.height+box.y-15 ), Color.grey);
}