|
Hello~ I'm trying to change Texture's color. I can do it by Creating a GUI Texture and setting color wanted to the Texture in Inspector window. Problem is, I have some GUI buttons created in JavaScript. I could use two Textures (one for normal, one for active) to make the button change when I click on it. But now, I want to use only one Texture to achieve this. So I think the best way is change the color of the Texture when I click on it. Some people said that we could implement this by using GUISkin or GUIStyle, I think the second method is using two different Textures,, So.. Can any one please tell me how I can work this out?. Thanks! ^.^
(comments are locked)
|
|
If it's "GUI Texture" as in GUITexture, then do Thanks! I meant a texture as drawn in OnGUI,,It's exactly what I'm looking for , But Unfortunately I still have no idea with how to use GUI.color to implement button's color changing when I clicked on.. I use "GUIStyle.normal.background = texture1; GUIStyle.active.background = texture2; GUI.Button(Rect (blah) ,"", GUIStyle)" .. I think the method using GUI.color doesn't make sence in this way.. What do you think, Eric?
Apr 19 '10 at 12:42 AM
Jin
@Jin, set a boolean if the button is clicked and use the boolean to change the color or not.
Apr 19 '10 at 01:22 AM
Eric5h5
Thanks Eric~ Thank you very much!
Apr 19 '10 at 01:54 AM
Jin
(comments are locked)
|
