I am using the code listed below to simulate a computer terminal (think Black Ops computer) however whenever I transfer the game to my other computer which has a larger screen size/resolution, the GUI gets mucked up. I was thinking of displaying the GUI in absolute pixels however I am unsure as to how I can do that with my script. Thanks in advance!
var visible;
var controlTexture : Texture2D;
var gameCode : String = "1234";
var stringToEdit : String;
var buttonMessage : String = "Enter Command";
var pladas : String = "/test";
var practice : String = "/practice";
var zombies : String = "/zombies";
var instructions : String = "/help";
function OnGUI(){
if( visible )
{
stringToEdit = GUI.TextField (Rect (400, 500, 70, 25), stringToEdit, 10);
if(stringToEdit == "1234"){
buttonMessage = "Begin Game";
}else
if(stringToEdit == "/help"){
buttonMessage = "Instructions";
}else
if(stringToEdit == "/zombies"){
buttonMessage = "Unleash the Horde!";
}else
if(stringToEdit == "/test"){
buttonMessage = "Secret";
}else
if(stringToEdit == "/practice"){
buttonMessage = "Begin Training";
}else{
buttonMessage = "Enter Command";
}
if(GUI.Button(Rect(500, 500, 135, 25), buttonMessage) && stringToEdit == "1234"){
Application.LoadLevel (1);
}else
if(GUI.Button(Rect(500, 500, 135, 25), buttonMessage) && stringToEdit == "/zombies"){
Application.LoadLevel ("Zombies");
}else
if(GUI.Button(Rect(500, 500, 135, 25), buttonMessage) && stringToEdit == "/test"){
Application.LoadLevel ("Test");
}else
if(GUI.Button(Rect(500, 500,135, 25), buttonMessage) && stringToEdit == "/help"){
Application.LoadLevel ("Walkthrough");
}else
if(GUI.Button(Rect(500, 500, 135, 25), buttonMessage) && stringToEdit == "/practice"){
Application.LoadLevel ("Practice");
}
}
}
function Update(){
if(Input.GetKeyDown(KeyCode.M))
{
visible = !visible;
}
}