Results of several missed Synthroid tabs

Results of several missed Synthroid tabs 37.5 need prescript these foods, your body no longer holds otno that extra wate. So along wtih in diggesstion and assimilatijob, constitutnig imprtawnt #ssubject Adam?s apple area. The thyroid produces two key hormones, triiodotbyro.

I just want to select just one item in this window, but how to deal the bTag? Is there any other method to do this?

bTag = GUILayout.Toggle(bTag, info.Name);

Check out http://www.unifycommunity.com/wiki/index.php?title=FileBrowser

Hey, AngryAnt! I have seen your article, it is very helpful! But I want make a tree view, I think it need recursion。

I build a simple browse demo! It takes me all day!

99030–3841–$browser_132.zip (11.5 MB)

Nicely done Francis! Would make an awesome addition to the Wiki (hint :wink: ).

I will, before that I have to fixed some bugs! :smile:

I dont know how to edit the wiki, so paste the code in here: :stuck_out_tongue: :shock:

//
//Name : CTreeView.cs
//Desc : Use this class to show a browse window like a tree view
// 		u can choose folder and file
//Auth : Nette
//Date : 10-25-2008 
//


using UnityEngine;
using System.IO;
using System.Collections;

public class CTreeView : MonoBehaviour {
	
	public Rect winRect = new Rect(20,20,120,50);	//windows basic rect
	public string location;
	private Vector2 scrollPosition;
	
	private string[] strs;	//record the special level's selection
	private int index;
	private string path;	//this is the selected file's full name
	
	public GUIStyle fileStyle;						//if the item is a file use this style
	public GUIStyle dirStyle;						//if the item is a directory use this style
	
	public string filter;							//filter of file select
	
	public Texture2D fileTexture;					//the file texture
	public Texture2D dirTexture;					//the directory texture
	
	void Awake()
	{
		location = Application.dataPath;
		strs = new string[20];
		index = 0;
		path = location;
	}
	
	void OnGUI()
	{
		winRect = GUILayout.Window(1, winRect, DoMyWindow, "Browser");
	}
	
	void DoMyWindow(int windowID)
	{
		OpenFileWindow(location);
		GUI.DragWindow ();
	}
	
	void OpenFileWindow( string location )
	{
		scrollPosition = GUILayout.BeginScrollView (scrollPosition,GUILayout.Width(400),GUILayout.Height(400));
		GUILayout.BeginVertical();
			FileBrowser( location, 0, 0);	
		GUILayout.EndVertical();
		GUILayout.EndScrollView ();
		GUILayout.Label("Selected:" + path);
	}
	
	void FileBrowser( string location, int spaceNum, int index)
	{
		FileInfo fileSelection;
		DirectoryInfo directoryInfo;
		DirectoryInfo directorySelection;
		
		//
		fileSelection = new FileInfo( location );
		if( fileSelection.Attributes == FileAttributes.Directory )
			directoryInfo = new DirectoryInfo( location );
		else
			directoryInfo = fileSelection.Directory;
			
		//
		GUILayout.BeginVertical();
			
			foreach( DirectoryInfo dirInfo in directoryInfo.GetDirectories())
			{
				GUILayout.BeginHorizontal();
				GUILayout.Space(spaceNum);
				GUILayout.Label(dirTexture,dirStyle,GUILayout.Width(12));
				if( GUILayout.Button(dirInfo.Name, dirStyle) )
				{
					strs[index] = dirInfo.FullName;
					path = dirInfo.FullName;	
				}
				GUILayout.EndHorizontal();
				if( dirInfo.FullName == strs[index]  strs[index] != location )
					FileBrowser(strs[index], spaceNum + 20, index+1);				
			}
			
			//list the special file with speical style and texture under current directory
			//if( filter=="") filter = "*.*";
			fileSelection = SelectList(directoryInfo.GetFiles(), null, fileStyle, fileTexture, spaceNum) as FileInfo;
			if( fileSelection != null )
        		path = fileSelection.FullName;
				
		GUILayout.EndVertical();	
	}
	
	private object SelectList( ICollection list, object selected, GUIStyle style, Texture image, int spaceNum)
	{
		foreach( object item in list )
		{
			//just show the name of directory and file
			FileSystemInfo info = item as FileSystemInfo;
			GUILayout.BeginHorizontal();
			GUILayout.Space(spaceNum);
			GUILayout.Label(image,style,GUILayout.Width(12));
			if( GUILayout.Button(info.Name, style) )
			{
				selected = item;
			}
			GUILayout.EndHorizontal();
		}
		return selected;
	}
}

Excellent, thanks for sharing Francis!

I gave it a try but since my C# skills are a bit limited I’m not able to find how you did the “…” move up the folder tree function in your stand-alone. Perhaps these warnings are related to this functionality?

I’m talking about the “…” like this:

100082--3871--$picture_2_112.jpg

hey, bigkahuna, I made two type of browser as u see, I dont konw how to add parent button(…) and use recursion. Anyway, I paste the code of parent button(…) in here:

			//show the up on level button, if click this button the direcotory will up to its parent 
			GUILayout.BeginHorizontal();
			GUILayout.Label(dirTexture, dirStyle, GUILayout.Width(12));
			if( path != "/"  GUILayout.Button("..", dirStyle))
			{
				directoryInfo = directoryInfo.Parent;
				path = directoryInfo.FullName;
			}
			GUILayout.EndHorizontal();

Thanks Francis, but I’m afraid I don’t understand. Could you upload a package file? If not, that’s OK. I’ll try to figure it out later when I have some free time.

Not to be digging around too much here, but I just found this and couldn’t resist clarifying for you BigKahuna.

What he means is that he knows how to select the Unix navigation items, but once they’re selected he doesn’t know how to use them to modify the path properly.

I added his code in at line 92, and it added the … nav item. Which is all well and good, but it doesn’t do anything :stuck_out_tongue:

@Francis: What you need to do is if the … item is selected, use some string functions to remove part of the path up to the previous “/”, then update the browser to that path. I would do it, but I don’t know any C# (and don’t intend on learning it unless I really have to).

Hope that makes some sense!