private void Update() { if (popup != null) { Dialog[] array = popup.ToArray(); for (int i = 0; i < array.Length; i++) { array[i].Update(); } } if (next != DIALOG_INDEX.NUM && !IsModal) { Dialog dialog = Popup(next, exclusive: true); if (dialog != null && next == DIALOG_INDEX.MEMO) { MemoDialog memoDialog = (MemoDialog)dialog; if (memoDialog != null) { memoDialog.InitDialog(); memoDialog.ReplyTitle(param1); } } next = DIALOG_INDEX.NUM; } }
public void CloseAll(DIALOG_INDEX id) { while (popup.Count > 0) { popup.Pop()?.OnClose(id); } }
public Dialog GetDialogAlways(DIALOG_INDEX id) { if (DIALOG_INDEX.CREATE_ROOM <= id && (int)id < silo.Length) { return(silo[(int)id]); } return(null); }
public bool IsSelfModal(DIALOG_INDEX id) { if (popup.Count == 1 && IsPopup(id)) { return(true); } return(false); }
public bool IsPopup(DIALOG_INDEX id) { foreach (Dialog item in popup) { if (item.ID == id) { return(true); } } return(false); }
public Dialog GetDialog(DIALOG_INDEX id) { Dialog[] array = popup.ToArray(); for (int i = 0; i < array.Length; i++) { if (array[i] != null && array[i].ID == id) { return(array[i]); } } return(null); }
public Dialog Popup(DIALOG_INDEX id, bool exclusive) { Dialog dialog = silo[(int)id]; if (dialog != null) { if (exclusive) { CloseAll(id); } ErasePopup(dialog); dialog.OnPopup(); popup.Push(dialog); } return(dialog); }
public void Push(DIALOG_INDEX id, string _param1 = "") { next = id; param1 = _param1; }