Exemple #1
0
    public void Awake()
    {
        Debug.Log("Initializing a new GUIManager.");

        // Cada nuevo GUI manager destruye el anterior para facilitar la creación de modos nuevos
        instance = this;

        GoBackButton.SetActive(false);
        RandomCard.SetActive(false);
        OpenConfigMenuButton.SetActive(true);
        GeneralConfMenu.SetActive(false);
        ConfLang.SetActive(false);
        ConfTypeSentences.SetActive(false);
        ConfNivelPicante.SetActive(false);
        ConfCustomSentences.SetActive(false);
        ConfPlayers.SetActive(false);
        WarningPopup.SetActive(false);
        InfoPopup.SetActive(false);
        LinkPopup.SetActive(false);
        ConditionPopup.SetActive(false);
        ConfMiscelanea.SetActive(false);
        rateAppPopup.SetActive(false);

        Debug.Log("GUIManager initialization successful.");
    }
Exemple #2
0
    void ShowNoConnection()
    {
        WarningPopup.push("Ошибка",
                          "Подключение к устройству отсутствует. Проверьте включено ли устройство и попробуйте подключиться.",
                          "Подключиться",
                          () =>
        {
            if (BluetoothAdapter.isBluetoothEnabled())
            {
                afrController.TryConnect();
            }
            else
            {
                WarningPopup.push("Подключение",
                                  "Bluetooth на устройстве выключен. Включите Bluetooth для подключения к контроллеру опускания зеркал",
                                  "Подключиться",
                                  () =>
                {
                    BluetoothAdapter.askEnableBluetooth();

                    if (BluetoothAdapter.isBluetoothEnabled())
                    {
                        afrController.TryConnect();
                    }
                });
            }
        });
    }
Exemple #3
0
 public void OpenWarningPopup(string textId, string textAtBeggining, string textAtEnd) //Show text on screen to warn about something
 {
     WarningPopup.SetActive(true);
     WarningPopupText.id = textId;
     WarningPopupText.additionalTextToAddAtTheBegginingOfTheText = textAtBeggining;
     WarningPopupText.additionalTextToAddAtTheEndOfTheText       = textAtEnd;
     WarningPopupText.Localize();
 }
Exemple #4
0
    public static WarningPopup push(string titleStr, string infoStr, string btnStr, Action action)
    {
        WarningPopup wp = SceneManager.Instance.PushWin <WarningPopup>().GetComponent <WarningPopup>();

        wp.title.text   = titleStr;
        wp.info.text    = infoStr;
        wp.btnText.text = btnStr;
        wp.action       = action;

        return(wp);
    }
Exemple #5
0
 void Start()
 {
     _WarningPopup = GameObject.Find("Popup Canvas").GetComponent <WarningPopup> ();
 }
Exemple #6
0
 void Awake()
 {
     I = this;
     gameObject.SetActive(false);
 }