- Home /
GuiStyle depth
Hi, i'm using different Guistyle in the same function OnGUI(){ ... }
I'd like to have a specific GuiStyle button over an other Guistyle
public var mystyledate : GUIStyle;
public var myStyleNewGame : GUIStyle;
function OnGUI(){
if(GUI.Button(Rect(xnew,ynew,200,100), "New Game", myStyleNewGame)){
........
}
GUI.Button(Rect(xnew,ynew,100,20),date, mystyledate);
I tried mystyledate.depth=-10; but it's not possible.
The only way i found is to write the background button before the top one. But that's not a great solution i think.
Thx
Comment
Your answer
Follow this Question
Related Questions
GUI LABEL behind viewport rect of mini map? 1 Answer
GUIStyle not working on GUI.Button 4 Answers
button drawn last not triggered 0 Answers
GUI.depth factors 1 Answer
GUI.Depth text input/button issues 1 Answer