コード例 #1
0
    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;
    }