private void OnGUI()
    {
        GUI.depth   = (int)guiDepth;
        GUI.skin    = GUISkinFinder.Instance.GetGUISkin();
        GUI.enabled = !DialogManager.Instance.IsModal;
        GUI.Box(new Rect(0f, 0f, (float)Screen.width, (float)Screen.height), string.Empty);
        GUI.BeginGroup(new Rect((float)((Screen.width - 760) / 2), (float)((Screen.height - 600) / 2), 760f, 600f));
        crdGuide.x    = (760f - crdGuide.width) / 2f;
        crdNickname.x = (760f - crdNickname.width) / 2f;
        crdOk.x       = (760f - crdOk.width) / 2f;
        string text = string.Format(StringMgr.Instance.Get("GUIDE_PLAYER_INFO"), minNickname, maxNickname);

        GUI.Label(crdGuide, text, "MiddleCenterLabel");
        nickName = GUI.TextField(crdNickname, nickName, maxNickname);
        nickName = nickName.Replace(" ", string.Empty);
        nickName = nickName.Replace("\t", string.Empty);
        nickName = nickName.Replace("\n", string.Empty);
        if (BuildOption.Instance.IsAxeso5)
        {
            nickName = RemoveSpecialCharacters(nickName);
        }
        if (GlobalVars.Instance.MyButton(crdOk, StringMgr.Instance.Get("OK"), "BtnAction") && CheckInput() && (areYouSure == null || !areYouSure.Yes))
        {
            areYouSure = (AreYouSure)DialogManager.Instance.Popup(DialogManager.DIALOG_INDEX.ARE_YOU_SURE, exclusive: true);
            if (areYouSure != null)
            {
                areYouSure.InitDialog(AreYouSure.SURE.CREATE_CHARACTER, nickName);
            }
        }
        GUI.EndGroup();
        GUI.enabled = true;
    }
    public void DeleteInteractingObject()
    {
        if (interactionAndUpgradeOptions.interacting != null)
        {
            //GameObject.Destroy(interactionAndUpgradeOptions.interacting.gameObject);
            CloseInteraction();

            var a = interactionAndUpgradeOptions.interacting.gameObject;
            AreYouSure.RequestConfirm(() => { GameObject.Destroy(a); }, OpenInteraction);
        }
    }
Esempio n. 3
0
 private void Awake()
 {
     _this = this;
 }
 private void Start()
 {
     areYouSure = null;
 }