I want to make a button out of the font that I have. I set up the javascript variable
var comicStyle : GUIStyle;
(and in the inspector I’ve edited the font, font size, normal color, and Alignment, everything else is default)
if I use this line of code:
if(GUI.Button(Rect(200, 200, 300, 75), "feedback", comicStyle))
{
print("You Clicked the Feedback button");
}
it draws the words “feedback” on the screen right where I want it, but I can’t click it.
if I remove the style argument from the GUI.Button, like this…
if(GUI.Button(Rect(200, 200, 300, 75), "feedback"))
{
print("You Clicked the Feedback button");
}
it makes a gray button rectangle with the word “feedback” in it, that I can click, and see the print command execute in the console.
My question is, is there something I’m not setting correctly in my style that is allowing this to be “click-able”? or am I totally off?
I can easily make a sprite out of the word, but I’m looking to reduce the amount of images in my game with concerns of file size.
Thanks in advance!!!