private void CreateInfoPane(float x, float y) { GameObject infoPane = GetGameObject(new Vector3(x, y), "infoPane", Resources.Load <Sprite>(SpritePaths.BigOptionInfoBox)); FontData font = PD.mostCommonFont.Clone(); font.scale = 0.06f; TextMesh headerText = GetMeshText(new Vector3(x, y + 1.7f), "honk", font); font.scale = 0.04f; TextMesh infoPaneTextCenter = GetMeshText(new Vector3(x, y + 1.2f), "honk", font); TextMesh infoPaneTextLeft = GetMeshText(new Vector3(x - 1.0f, y + 1.2f), "honk", font); TextMesh infoPaneTextRight = GetMeshText(new Vector3(x + 1.0f, y + 1.2f), "honk", font); font.scale = 0.035f; TextMesh infoPaneTextFunFact = GetMeshText(new Vector3(x, y + 1.2f), "honk", font); navigationArrows = gameObject.AddComponent <OptionsSelector>(); navigationArrows.Setup(x - 2.35f, y - 1.6f, 0.0f, true); navigationArrows.SetWidth(4.7f); navigationArrows.UpdatePosition(0); soundTest = gameObject.AddComponent <SoundTest>(); soundTest.Setup(0.7f, 0.6f, infoPane); soundTest.ToggleVisibility(false); List <XmlNode> bios = GetFilteredBiosList(); GameObject characters = GetGameObject(new Vector3(x - 1.4f, y), "BioChar", null, false, "HUD"); GameObject goBack = GetGoBackImage(x, y); writer = new PlayerDataTextWriter(headerText, infoPaneTextCenter, infoPaneTextLeft, infoPaneTextRight, infoPaneTextFunFact, bios, GetXMLHead(), characters, goBack, PD); bioCount = bios.Count - 1; }
private void UpdatePanel(int pos) { switch (pos) { case 6: writer.SetToTotalPanel(); ToggleBioInfo(false); soundTest.ToggleVisibility(false); break; case 5: writer.SetToHighScorePanel(PersistData.GT.QuickPlay); ToggleBioInfo(false); soundTest.ToggleVisibility(false); break; case 4: writer.SetToHighScorePanel(PersistData.GT.Arcade); ToggleBioInfo(false); soundTest.ToggleVisibility(false); break; case 3: writer.SetToHighScorePanel(PersistData.GT.Campaign); ToggleBioInfo(false); soundTest.ToggleVisibility(false); break; case 2: writer.SetToBiosPanel(charIdx, PD); ToggleBioInfo(true); soundTest.ToggleVisibility(false); break; case 1: writer.SetToSoundTest(); ToggleBioInfo(false); soundTest.ToggleVisibility(true); break; case 0: writer.SetToBackPanel(GetFunFactText()); ToggleBioInfo(false); soundTest.ToggleVisibility(false); break; } }