How do I make and use a GUI Toolbar in C sharp?

I want to make a gui toolbar so i can go between 3 different menus using tabs. How can I do this. How do I even make a toolbar? Do I have to make it so that my variables that control the inventory on and off go on when you click one of the bars? Can someone please help!

The documents located at http://docs.unity3d.com/Documentation/ScriptReference/GUI.Toolbar.html explain the Toolbar’s usage and creation process.

Take a look at the example code:

using UnityEngine;
using System.Collections;

public class Example : MonoBehaviour {
    public int toolbarInt = 0;
    public string[] toolbarStrings = new string[] {"Toolbar1", "Toolbar2", "Toolbar3"};
    void OnGUI() {
        toolbarInt = GUI.Toolbar(new Rect(25, 25, 250, 30), toolbarInt, toolbarStrings);
    }
}

In this code, when Toolbar 1 is selected toolbarInt is set to 0, when Toolbar2 is selected toolbarInt is set to 1. Etc etc…

Just use the integers to determine what menu you are in.

So you could use it like this:

    using UnityEngine;
    using System.Collections;
    
    public class Example : MonoBehaviour {
        public int toolbarInt = 0;
        public string[] toolbarStrings = new string[] {"Main Menu", "Options", "Exit"};
        void OnGUI() {
            toolbarInt = GUI.Toolbar(new Rect(25, 25, 250, 30), toolbarInt, toolbarStrings);
			
			if(toolbarInt==0){
				Debug.Log("This is the main menu!");
			}else if(toolbarInt==1){
				Debug.Log("This is the options menu!");
			}else if(toolbarInt==2){
				Application.Quit();
			}
        }
    }