I am looking at the overview and tried the following:
function OnGUI () {
// Make a background box
GUI.Box (Rect (10,10,100,90), "GUI Basics");
// Make the first button. If it is pressed, Application.Loadlevel (1) will be executed
if (GUI.Button (Rect (20,40,80,20), "Level 1")) {
GUI.Label(Rect (60, 40, 80, 20), "you hit LoadLevel (1), but this does nothing yet");
}
// Make the second button.
//if (GUI.Button (Rect (20,70,80,20), GUIContent ("Level 2", "This is the tooltip")));
if (GUI.Button (Rect (20,70,80,20), GUIContent("Level 2", "Yep - tooltip")))
{
print ("You hit LoadLevel (2), but this does nothing yet");
}
}
Problem 1) When I click on button 1, I do not see a label pop up Probem 2) I do not see a tooltip when I hover over button 2
Suggestions?
Thx