void Start() { showGUI = true; boardCapacityGUIText = GameObject.Find("BoardCapacityGUIText").GetComponent <GUIText>(); pageNumber = GameObject.Find("PageInfo").GetComponent <PageNumberScript> (); pageNameScript = GameObject.Find("PageInfo").GetComponent <PageNameScript> (); gp = GameObject.Find("GameProcess").GetComponent <GameProcess>(); playerSetup = GameObject.Find("PlayerSetup").GetComponent <PlayerSetup>(); windowRect5 = new Rect(Screen.width - 315, Screen.height - 270, displayWidth5, displayHeight5); am = GameObject.Find("AudioManager").GetComponent <AudioManager> (); }
void Start() { tempX = 203; tempY = 262; pageNumber = GameObject.Find("PageInfo").GetComponent <PageNumberScript>(); pageNameScript = GameObject.Find("PageInfo").GetComponent <PageNameScript>(); mmg = GameObject.Find("MainMenuGUI").GetComponent <MainMenuGUI> (); // Make some content for the popup list list = new GUIContent[5]; list [0] = new GUIContent("1"); list [1] = new GUIContent("2"); list [2] = new GUIContent("3"); list [3] = new GUIContent("4"); list [4] = new GUIContent("5"); // Make a GUIStyle that has a solid white hover/onHover background to indicate highlighted items listStyle = new GUIStyle(); listStyle.normal.textColor = Color.black; Texture2D bg = new Texture2D(2, 2); Color[] colors = new Color[4]; //Color color; for (int i = 0; i < colors.Length; i++) { colors[i] = new Color((210f / 255f), (159f / 255f), (104f / 255f)); } bg.SetPixels(colors); bg.Apply(); listStyle.normal.background = bg; Texture2D tex = new Texture2D(2, 2); colors = new Color[4]; for (int i = 0; i < colors.Length; i++) { colors[i] = new Color((232f / 255f), (200f / 255f), (152f / 255f)); } tex.SetPixels(colors); tex.Apply(); listStyle.hover.background = tex; listStyle.onHover.background = tex; listStyle.padding.left = listStyle.padding.right = listStyle.padding.top = listStyle.padding.bottom = 4; }
// Use this for initialization void Start() { pageNumber = GameObject.Find("PageInfo").GetComponent <PageNumberScript>(); pageNameScript = GameObject.Find("PageInfo").GetComponent <PageNameScript>(); infoText = string.Empty; challengedPlayerCopy = string.Empty; showGUI = true; am = GameObject.Find("AudioManager").GetComponent <AudioManager> (); gp = GameObject.Find("GameProcess").GetComponent <GameProcess>(); globalChatScript = GameObject.Find("GlobalChat").GetComponent <globalChatScript> (); listOfPlayers = GameObject.Find("ListOfPlayers").GetComponent <ListOfPlayersScript> (); chat = string.Empty; challengePending = false; windowSeparation = 25; windowRect2 = new Rect(Screen.width / 2 - displayWidth2 / 2, Screen.height / 2 - 250, displayWidth2, displayHeight2); windowRect3 = new Rect(Screen.width / 2 - displayWidth2 / 2 - displayWidth2 - windowSeparation, Screen.height / 2 - 200, displayWidth3, displayHeight3); windowRect4 = new Rect(Screen.width / 2 + displayWidth2 / 2 + windowSeparation, Screen.height / 2 - 200, displayWidth4, displayHeight4); space = 10; }