protected virtual void Awake() { SetCamera(); graphicRaycaster = GetComponent <GraphicRaycaster>(); bgImage = GetComponent <Image>(); contentTransform = transform.Find("ContentPanel"); if (contentTransform == null) { contentTransform = transform.Find("FitPanel/ContentPanel"); } transform.SetAsLastSibling(); bgImage.color = bgColor; SetIgnoreRaycaster(ignoreRaycaster); if (dontDestroyOnLoad) { DontDestroyOnLoad(gameObject); } dialogStatus = DialogStatus.Init; }
public void PlayShow() { if (hideSequence != null) { hideSequence.Kill(); } if (guiControlLocation != null) { showSequence = DOTween.Sequence(); SettingShowEffect(); showSequence.AppendCallback(() => { OnEndShow(); GUIManager.InvokeEvent(dialogName, DialogEvent.Showed); showStatus = DialogStatus.Showed; }); showSequence.Play(); } else { OnEndShow(); GUIManager.InvokeEvent(dialogName, DialogEvent.Showed); showStatus = DialogStatus.Showed; } }
public void PlayHide(GUIDialogBase dialogBase) { if (showSequence != null) { showSequence.Kill(); } if (guiControlLocation != null) { hideSequence = DOTween.Sequence(); SettingHideEffect(); hideSequence.AppendCallback(() => { OnEndHide(); GUIManager.InvokeEvent(dialogName, DialogEvent.Hidden); dialogBase.DestroyDialog(this); }); hideSequence.Play(); showStatus = DialogStatus.Hiding; } else { showStatus = DialogStatus.Hiding; OnEndHide(); GUIManager.InvokeEvent(dialogName, DialogEvent.Hidden); dialogBase.DestroyDialog(this); } }
/* ----------------------------------------------------------------- */ /// /// DialogMessageCommand /// /// <summary> /// メッセージボックスを表示します。 /// </summary> /// /* ----------------------------------------------------------------- */ private void DialogMessageCommand(DialogMessage e, DialogStatus status) { Assert.That(e.Text, Is.Not.Null.And.Not.Empty); Assert.That(e.Title, Is.Not.Null.And.Not.Empty); e.Value = status; }
private static IStory GetResultStory(IStoryRecorder storyRecorder, DialogStatus resultType, Predicate <object> resultPredicate = null, Type exceptionType = null) { var story = storyRecorder.Rewind(); story.AddStoryFrame(new DialogStoryFrame(resultType, resultPredicate, exceptionType)); return(story); }
private void OnTargetUpdated(DialogStatus status) { if (status == DialogStatus.OK) { planner.UpdateOutput(); toogleTarget.GetComponentInChildren <Toggle>().isOn = false; toogleTarget.GetComponentInChildren <Toggle>().interactable = true; } }
public DialogStoryFrame( DialogStatus dialogStatus, Predicate <object> resultPredicate = null, Type exceptionType = null) { this.DialogStatus = dialogStatus; this.ResultPredicate = resultPredicate; this.ExceptionType = exceptionType; }
protected virtual void OnDestroy() { dialogStatus = DialogStatus.None; onDestroy.InvokeGracefully(this); onOpened = null; onClose = null; onDisable = null; onDestroy = null; }
void PSVRCompleted(DialogStatus status, DialogResult result) { Log("PSVR Completed " + status + " " + result); if (result != DialogResult.OK) { HmdSetupDialog.OpenAsync(0, PSVRCompleted); return; } StartCoroutine(SetupPSVR()); }
private void DoClose() { if (destroyOnClose) { gameObject.Destroy(); } else { gameObject.Inactive(); } dialogStatus = DialogStatus.Closed; }
protected virtual void PlayOpenAnimation() { contentTransform.localScale = Vector3.zero; bgImage.color = Vector4.zero; DOTween.Sequence() .SetUpdate(true) .Append(bgImage.DOFade(bgColor.a, openAnimationTime)) .Insert(0, contentTransform.DOScale(Vector3.one, openAnimationTime)) .OnComplete(() => { onOpened.InvokeGracefully(this); dialogStatus = DialogStatus.Opened; }); }
// Detect completion of the HMD dialog and either proceed to setup VR, or throw a warning void OnHmdSetupDialogCompleted(DialogStatus status, DialogResult result) { Debug.LogFormat("OnHmdSetupDialogCompleted: {0}, {1}", status, result); switch (result) { case DialogResult.OK: StartCoroutine(SetupVR()); break; case DialogResult.UserCanceled: Debug.LogWarning("User Cancelled HMD Setup! Retrying.."); SetupHMDDevice(); break; } }
public int Send(DialogStatus value) { var n = 0; using (var src = new Presenter(new SynchronizationContext())) using (src.Subscribe <DialogMessage>(e => e.Value = value)) { 2.Times(i => src.SendMessage(new DialogMessage(), e => n++, e => e.Any(DialogStatus.Ok, DialogStatus.Yes) )); Task.Delay(200).Wait(); } return(n); }
// Detect completion of the HMD dialog and either proceed to setup VR, or throw a warning void OnHmdSetupDialogCompleted(DialogStatus status, DialogResult result) { Debug.LogFormat("OnHmdSetupDialogCompleted: {0}, {1}", status, result); switch (result) { case DialogResult.OK: Debug.Log("------------>>>>>>>>>>> HMD Setup Dialog DialogResult.OK ---> SetupVR"); StartCoroutine(SetupVR()); break; case DialogResult.UserCanceled: Debug.LogWarning("User Cancelled HMD Setup!"); BeginShutdownVR(); break; } }
public int ShowDialog(DialogType type, string text, string okButton = "OK", string cancelButton = "Cancel", CommonDialog.DelegateButtonPressed buttonDelegate = null, CommonDialog.DialogPriority priority = CommonDialog.DialogPriority.Common) { CommonDialog dialog = CreateCommonDialogInstance(DialogNames[( int )type]); if (dialog != null) { DialogStatus status = new DialogStatus(IdCounter++); ButtonDelegate = buttonDelegate; dialog.Show(status.Id, text, okButton, cancelButton, OnButtonPressed, priority); DialogStatusList.Add(status); return(status.Id); } return(-1); }
/// <summary> /// Static function for using in all quests (for smaller code) /// changed: 01.10.05, need mod /// </summary> public static DialogStatus QDS(Mobile questOwner, Character c, BaseQuest bq) { DialogStatus result = DialogStatus.ChatUnAvailable; if (questOwner.Reputation(c) > bq.MinReputation) { if (!c.QuestDone(bq)) // этот квест уже пройден { if (!c.HaveQuest(bq)) // у чара нету этого квеста { if (AllowedTo(bq, c)) // разрешено выдать, подходит ( расса, класс, скилл ) { if (bq.PreviousQuest > 0) // этот квест из серии, необходимо закончить предыдущий { BaseQuest q = World.CreateQuestById(bq.PreviousQuest); if (q != null && c.QuestDone(q)) { result = DialogStatus.SingleQuestAvailable; //предыдущий закончен, этот можно получить } } else // квест одиночный или начальный для серии { result = DialogStatus.SingleQuestAvailable; } } } else // Character have this quest already { ActiveQuest aq = c.FindPlayerQuest(bq); if (aq.Completed) // закончен квест, нужно наградить { result = aq.Repeatable ? DialogStatus.RepeatQuestCompleate : DialogStatus.SingleQuestCompleate; } else if (!QuestForNPC(bq, (BaseNPC)questOwner)) // квест не для этого нпс? { result = DialogStatus.QuestUnCompleate; } } } } return(result); }
protected virtual void OnEnable() { dialogStatus = DialogStatus.Opening; if (playOpenSound) { PlayOpenSound(); } if (playOpenAnimation && contentTransform != null) { PlayOpenAnimation(); } else { onOpened.InvokeGracefully(this); dialogStatus = DialogStatus.Opened; } }
/* ----------------------------------------------------------------- */ /// /// PostClose /// /// <summary> /// Posts the message to close the PDF document. /// </summary> /// /* ----------------------------------------------------------------- */ private void PostClose(CancelEventArgs src, DialogStatus m) { var e = src ?? new CancelEventArgs(); e.Cancel = m == DialogStatus.Cancel; if (e.Cancel) { return; } void close() => Model.Close(m == DialogStatus.Yes); if (src != null) { Track(close, DialogMessage.Create, true); } else { Track(close); } }
public virtual void Close() { if (dialogStatus == DialogStatus.Opened) { onClose.InvokeGracefully(this); if (playCloseSound) { PlayCloseSound(); } dialogStatus = DialogStatus.Closing; if (playCloseAnimation) { PlayCloseAnimation(); } else { DoClose(); } } }
void PSVRCompleted(DialogStatus status, DialogResult result) { Debug.Log("PSVR Completed " + status + " " + result); mHasHmd = (result == DialogResult.OK); PlayStationVRSettings.reprojectionSyncType = PlayStationVRReprojectionSyncType.ReprojectionSyncVsync; PlayStationVRSettings.reprojectionFrameDeltaType = PlayStationVRReprojectionFrameDeltaType.UnityCameraAndHeadRotation; PlayStationVRSettings.minOutputColor = new Color(0.005f, 0.005f, 0.005f); UnityEngine.VR.VRSettings.loadedDevice = UnityEngine.VR.VRDeviceType.PlayStationVR; UnityEngine.VR.VRSettings.showDeviceView = true; // HACK need for force file setting // QualitySettings.antiAliasing = 2; // Delay setting scale UnityEngine.VR.VRSettings.renderScale = 1.4f; // mPS4RenderScale = 2; Application.backgroundLoadingPriority = ThreadPriority.BelowNormal; UnityEngine.VR.VRSettings.enabled = mHasHmd; }
public static void resetStatus(string _status) { var _userID = "test001"; using (SqlConnection conn = new SqlConnection(azConnStr)) { string strSql = @"UPDATE _DialogStatus SET edit_time=@edit_time, status = @status Where user_id = @user_id"; var parameter = new DialogStatus() { status = _status, edit_time = DateTime.Now.ToString("yyyyMMddhhmmss"), user_id = _userID }; conn.Execute(strSql, parameter); } }
protected void resetStatus_Click(object sender, EventArgs e) { var _userID = "test001"; using (SqlConnection conn = new SqlConnection(azConnStr)) { string strSql = @"UPDATE _DialogStatus SET edit_time=@edit_time, status = @status Where user_id = @user_id"; var parameter = new DialogStatus() { status = "0103", user_id = _userID, edit_time = DateTime.Now.ToString("yyyyMMddhhmmss") }; conn.Execute(strSql, parameter); } }
public GQMenuItem( uint menuId, DialogStatus icon, string text ) { _menuId = menuId; _icon = icon; _text = text; }
public void Add( uint menuId, DialogStatus icon, string text ) { list.Add( new GQMenuItem( menuId, icon, text ) ); }
public GQMenu( uint menuId, DialogStatus icon, string text ) { Add( menuId, icon, text ); }
private void EditMeetBtn_Click(object sender, RoutedEventArgs e) { dialogStatus = DialogStatus.Edit; CreateOrEditBtn.Content = "SAVE"; RaiseEvent(new RoutedEventArgs(EditBtnClicked)); }
private void AddMeetBtn_Click(object sender, RoutedEventArgs e) { dialogStatus = DialogStatus.Create; CreateOrEditBtn.Content = "CREATE"; ClearCreateMeetFields(); }
/* ----------------------------------------------------------------- */ /// /// Any /// /// <summary> /// Determines whether to match any of the specified values. /// </summary> /// /// <param name="src">Source value.</param> /// <param name="value">Value to be checked.</param> /// <param name="more">Values to be checked.</param> /// /// <returns>true for match; otherwise false.</returns> /// /* ----------------------------------------------------------------- */ public static bool Any(this DialogStatus src, DialogStatus value, params DialogStatus[] more) => src == value || more.Any(e => e == src);
protected virtual void OnDisable() { dialogStatus = DialogStatus.Disable; onDisable.InvokeGracefully(this); }