I am making a Toolbar interface i created 4 buttons in it all i want is that when i click any of the button a window will popup. 4 button = 4 different popups
125**
private var selectedToolbar : int = 0;
private var toolbarStrings = ["Tab One", "Tab Two", "Tab Three", "Tab Four"];
function SelectedPopup(){
if (SelectedPopup==-1) {
result = GUI.Toolbar((Rect (10, 0, Screen.width - 600, 20), selectedToolbar, toolbarStrings));
if (result != -1 (or whatever toolbar returns if nothing pressed))
SelectedPopup = result;
}
if (SelectedPopup==1) {
PopupGuiCode();
}
if (SelectedPopup==2) {
PopupGuiCode();
}
if (SelectedPopup==3) {
PopupGuiCode();
}
if (SelectedPopup==4) {
PopupGuiCode();
}
if (GUI.Button (Rect (25, 25, 100, 30), "Button"))
}
function OnGUI () {
selectedToolbar = GUI.Toolbar (Rect (10, 0, Screen.width - 600, 20), selectedToolbar, toolbarStrings);
}
**125