Hii, i need to do these things on my tooltip, plz help
i need to bold it,
make it left align,like i kept the size of my tooltip to width = 300, length = 60 but i want my text to be left align to 200,60
i need to change its color to darkish blue, cant i select color from color pallete instead of writing like dis ?
guiStyleFore.normal.textColor = Color.blue;
the code is shown below -
var toolTipText = “”; // set this in the Inspector
var backgroundTexture : Texture2D;
private var currentToolTipText = “use W,A,S,D keys to move and mouse to rotate view”;
private var guiStyleFore : GUIStyle;
private var guiStyleBack : GUIStyle;
var clickLeft : int = 0;
var mouseIsOnIT : int = 0;
function Start()
{
guiStyleFore = new GUIStyle();
guiStyleFore.normal.background = backgroundTexture;
guiStyleFore.normal.textColor = Color.blue;
guiStyleFore.alignment = TextAnchor.UpperCenter ;
guiStyleFore.wordWrap = true;
guiStyleBack = new GUIStyle();
guiStyleBack.normal.textColor = Color.black;
guiStyleBack.alignment = TextAnchor.UpperCenter ;
guiStyleBack.wordWrap = true;
}
function OnMouseEnter ()
{
mouseIsOnIT = 1;
currentToolTipText = toolTipText;
}
function Update ()
{
if (mouseIsOnIT == 1 Input.GetMouseButton(0))
{
clickLeft = 1;
Debug.Log(clickLeft + “Pressed left click.”);
popupminmax.winClose = false;
popupminmax.minM =! true;
}
}
function OnMouseExit ()
{
mouseIsOnIT = 0;
currentToolTipText = “”;
}
function OnGUI()
{
if (currentToolTipText != “”)
{
var x = Event.current.mousePosition.x;
var y = Event.current.mousePosition.y;
GUI.Label (Rect (x-149,y+21,300,60), currentToolTipText, guiStyleBack);
GUI.Label (Rect (x-150,y+20,300,60), currentToolTipText, guiStyleFore);
}
}
i am using this -
guiStyleFore.fontSize = 22;
but its not working
also tried this but neither font nor size working -
i am still hopeful, someone should reply.