Пример #1
0
    private void SetupMenu()
    {
        int cursx = PD.prevMainMenuLocationX, cursy = PD.prevMainMenuLocationY;

        if (cursx < 0)
        {
            if (PD.IsFirstTime())
            {
                cursx = 1; cursy = 2;
            }
            else
            {
                cursx = 0;
            }
        }
        cursor = GetMenuCursor(2, 5, null, -0.5f, -1.32f, 0.2f, 0.2f, cursx, cursy);
        cursor.SetVisibility(false);
        float menuX = 0.0f, topy = 0.35f, dx = 0.8f, bottomdy = 1.2f;

        menuButtons          = new GameObject[9];
        menuButtonHighlights = new GameObject[9];
        texts = new TextMesh[9];
        AddButton(0, menuX - dx, topy, GetXmlValue(top, "quickplay"));
        AddButton(1, menuX + dx, topy, GetXmlValue(top, "versus"));
        AddButton(2, menuX - dx, topy - 0.3f, GetXmlValue(top, "arcade"));
        AddButton(3, menuX + dx, topy - 0.3f, GetXmlValue(top, "campaign"));
        AddButton(4, menuX - dx, topy - 0.6f, GetXmlValue(top, "challenge"));
        AddButton(5, menuX + dx, topy - 0.6f, GetXmlValue(top, PD.IsFirstTime()?"t_tutorial":"training"));
        AddButton(6, menuX - dx, topy - 0.9f, GetXmlValue(top, "playerdata"));
        AddButton(7, menuX + dx, topy - 0.9f, GetXmlValue(top, "options"));
        AddButton(8, menuX, topy - bottomdy, GetXmlValue(top, "quit"));
    }