Hello everyone,
i have this code, and when i press Highscore, the box of main menu is obviously the same.
Is there a way i can make the box look different during being in main menu, and when i open the
Highscore?
GUI.skin = gSkin;
if(ShowMenu)
{
float rectWidth = 500.0f;
float rectHeight = 600.0f;
GUI.BeginGroup(new Rect (Screen.width/2-(rectWidth/2), Screen.height/2-(rectHeight/3), rectWidth, rectHeight));
GUI.Box(new Rect(0,0 , 500 , 400),"");
if(GUI.Button(new Rect(36, 28 , 422 , 80),"", gSkin.GetStyle("Start_Button")))
{
ShowMenu = false;
ShowStart = true;
}
if(GUI.Button(new Rect(36,152 , 423 , 80),"" ,gSkin.GetStyle("Highscore_Button")))
{
ShowScores = true;
ShowMenu = false;
HighscoreList.LoadList();
}
if(GUI.Button(new Rect(35,277 , 425 , 80),"" ,gSkin.GetStyle("Quit_Button")))
{
Application.Quit();
}
GUI.EndGroup();
}
if(ShowScores)
{
float rectWidth = 400.0f;
float rectHeight = 800.0f;
GUI.BeginGroup(new Rect (Screen.width/2-(rectWidth/2), Screen.height/2-(rectHeight/3), rectWidth, rectHeight));
GUI.Box(new Rect(0, 0, 400, 400),"Highscores");
GUI.Label(new Rect(30, 30, 120 , 30),"Name");
GUI.Label(new Rect(110, 30, 120 , 30),"Score");
GUI.Label(new Rect(190, 30, 120 , 30),"Character");
GUI.Label(new Rect(290, 30, 120 , 30),"Time and Date");
float HOffset = 65;
int Position = 1;