Is there anyway to control the format of a tooltip? For example, I’d want to make a tooltip consisting of several GUILabels and maybe a texture positioned in one of the corners.
You can do all kinds of crazy things with GUI.Tooltips (ie) convert it to string then compare the tooltip for setting up statements
//set the var
var showWindow : boolean;
var tipName : String;
//create any gui element that can pass a tooltip
GUI.Button (Rect (10,10,100,20), GUIContent (“Click me”, “This is the tooltip”));
//insert this before the if statments
tipName = GUI.tooltip.ToString();
//create the condition
if(tipName==“This is the tooltip”) {
//open any kind of detailed box/window
showWindow = true;
}
else {
showWindow = false;
}
So while the mouse is hovered over the element with the tooltip the condition is true and anything can happen.
Most of this is from memory so do’nt hold it against me if it doesn’t work lol.
This should be in the GUI sector of the forum. (good luck)
I hadn’t thought about it like that, thanks!
Using this method, is there a good way to tell which GUI component triggered the tooltip? Also, is it possible to add the tooltip after the GUIButton/Label has been created?