Game Development Reference
In-Depth Information
scrollPosition2 = GUI.BeginScrollView (new Rect (257, 343, 320,
75), scrollPosition2, new Rect (0, 0, 280, f_height));
GUI.Label(new Rect (0, 0, 280, f_height), s_info);
}
We basically tell GUI.tooltip that we will assign rollover toolip informaion to the
label when the player rolls over. And if the player rolls out, we show the selected item
informaion, for which the default is the irst item as we can see in the following screenshot:
From the preceding screenshot, the left image shows that when we roll over the second key,
the informaion box shows the toolip of the second key. The right image shows that when
we rollout from the second key, the informaion box shows the toolip of the selected key,
which is the first key.
You can see more details about GUI.tooltip at this URL:
http://unity3d.com/support/documentation/
ScriptReference/GUI-tooltip.html .
 
Search WWH ::




Custom Search