var skin1 : GUISkin;
function OnGUI ()
{
GUI.skin = skin1;
GUI.skin.button.hover.textColor = Color.red;
GUI.Box(Rect(3,0,808,35), " ");
GUI.Button(Rect (3,5,80,35),GUIContent ("START","start1"));
GUI.Button(Rect (85,5,80,35),GUIContent ("CONTINUE","continue1"));
GUI.Button(Rect (167,5,80,35),GUIContent ("EXIT","exit1"));
if(GUI.tooltip == "start1")
{
GUI.Button(Rect (3,26,80,35), "START1");
GUI.Button(Rect (3,47,80,35), "START2");
GUI.Button(Rect (3,68,80,35), "START3");
GUI.Button(Rect (3,89,80,35), "START4");
GUI.Button(Rect (3,110,80,35), "START5");
}
if(GUI.tooltip == "continue1")
{
GUI.Button(Rect (85,26,80,35), "CONTINUE1");
GUI.Button(Rect (85,47,80,35), "CONTINUE2");
GUI.Button(Rect (85,68,80,35), "CONTINUE3");
GUI.Button(Rect (85,89,80,35), "CONTINUE4");
GUI.Button(Rect (85,110,80,35), "CONTINUE5");
}
if(GUI.tooltip == "exit1")
{
GUI.Button(Rect (167,26,80,35), "EXIT1");
GUI.Button(Rect (167,47,80,35), "EXIT2");
GUI.Button(Rect (167,68,80,35), "EXIT3");
GUI.Button(Rect (167,89,80,35), "EXIT4");
GUI.Button(Rect (167,110,80,35), "EXIT5");
}
}
Here i am trying to create a sub menu bar using tooltip like windows.start,continue and exit are three buttons in sub menubar when i keep mouse in start button list of buttons sub menu buttons are displaying the problem is when i come down to sub menu button the menu bar dis appear as the tool tip control is only in start button it works when i keep mouse on that button alone like wise other others also