示例#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.");
    }
示例#2
0
    void ShowNoConnection()
    {
        WarningPopup.push("Ошибка",
                          "Подключение к устройству отсутствует. Проверьте включено ли устройство и попробуйте подключиться.",
                          "Подключиться",
                          () =>
        {
            if (BluetoothAdapter.isBluetoothEnabled())
            {
                afrController.TryConnect();
            }
            else
            {
                WarningPopup.push("Подключение",
                                  "Bluetooth на устройстве выключен. Включите Bluetooth для подключения к контроллеру опускания зеркал",
                                  "Подключиться",
                                  () =>
                {
                    BluetoothAdapter.askEnableBluetooth();

                    if (BluetoothAdapter.isBluetoothEnabled())
                    {
                        afrController.TryConnect();
                    }
                });
            }
        });
    }
示例#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();
 }
示例#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);
    }
示例#5
0
 void Start()
 {
     _WarningPopup = GameObject.Find("Popup Canvas").GetComponent <WarningPopup> ();
 }
示例#6
0
 void Awake()
 {
     I = this;
     gameObject.SetActive(false);
 }