Пример #1
0
 public void OnCreditsPressed()
 {
     CreditsMenu.Show();
 }
Пример #2
0
 private static void OnCreditsClick()
 {
     CreditsMenu.Show();
 }
Пример #3
0
    void OnGUI()
    {
        GUI.depth = 10;
        GUI.skin  = MainMenuSkin;
        GUI.BeginGroup(new Rect(0, 0, Screen.width, Screen.height));
        GUI.DrawTexture(new Rect(0, 0, Screen.width, Screen.height), Background);

        if (Application.platform != RuntimePlatform.IPhonePlayer && GUI.Button(new Rect(Screen.width / 25, Screen.height / 25, Properties.BackButtonSize, Properties.BackButtonSize), Properties.BackButton))
        {
            DialogBox.DialogBoxButtons = DialogBoxButtons.YES_NO;
            DialogBox.DialogText       = LanguageManager.getString("PROMPT_EXIT");
            DialogBox.CallbackObject   = gameObject;
            DialogBox.Show();
        }

        float offset = Screen.height / 20;

        GUI.DrawTexture(new Rect(Screen.width / 2 - LOGO_SIZE, offset, LOGO_SIZE * 2, LOGO_SIZE), Logo);

        offset += LOGO_SIZE + offset;

        float button_size = Screen.width / 3 * 2;

        if (UserInteraction.InGame)
        {
            if (GUI.Button(new Rect(Screen.width / 2 - button_size / 2, offset, button_size, Properties.TEXT_HEIGHT * 2), LanguageManager.getString("CNTNE")))
            {
                PlayerStats.Show();
                Hide();
            }
            offset += Properties.TEXT_HEIGHT * 3;
        }

        if (GUI.Button(new Rect(Screen.width / 2 - button_size / 2, offset, button_size, Properties.TEXT_HEIGHT * 2), LanguageManager.getString("SNGPLYR")))
        {
            Hide();
            SinglePlayerCreationMenu.Show();
        }

        offset += Properties.TEXT_HEIGHT * 3;

        if (GUI.Button(new Rect(Screen.width / 2 - button_size / 2, offset, button_size, Properties.TEXT_HEIGHT * 2), LanguageManager.getString("MLTPLYR")))
        {
            TrumpSelection.Hide();
            ScoreBoard.Hide();
            Properties.ActiveGameType = GameType.MultiPlayer;
            MultiplayerObjects.gameObject.SetActive(true);
            LoginScreen.Show();
            UserInteraction.InGame = false;
            Hide();
        }

        offset += Properties.TEXT_HEIGHT * 3;
        if (GUI.Button(new Rect(Screen.width / 2 - button_size / 2, offset, button_size, Properties.TEXT_HEIGHT * 2), LanguageManager.getString("CRDTSBTN")))
        {
            Hide();
            CreditsMenu.Show();
        }

        offset += Properties.TEXT_HEIGHT * 3;
        if (GUI.Button(new Rect(Screen.width / 2 - button_size / 2, offset, button_size, Properties.TEXT_HEIGHT * 2), LanguageManager.getString("STNGS")))
        {
            Hide();
            SettingsMenu.BackMenu = this.GetType();
            SettingsMenu.Show();
        }

        GUI.EndGroup();
    }