public override void Update(Task caller)
        {
            DaggerfallMessageBox messageBox = CreateCustomMessagePrompt(ParentQuest, id);

            if (messageBox != null)
            {
                Debug.Log("Created messagebox");
                Debug.Log("Adding buttons (" + buttonKeys.Length.ToString() + ")");
                for (int i = 0; i < buttonKeys.Length; i++)
                {
                    Debug.Log("Creating button: " + buttonKeys[i]);
                    messageBox.AddCustomButton(id + i, buttonKeys[i], false);
                }
                Debug.Log("Adding click event");
                messageBox.OnCustomButtonClick += MessageBox_OnCustomButtonClick;
                Debug.Log("Showing messagebox");
                messageBox.Show();
            }
            SetComplete();
        }
Ejemplo n.º 2
0
        private static void ShowMessageBox(string message, bool clickAnywhereToClose = true, string[] buttons = null)
        {
            DaggerfallMessageBox messageBox = new DaggerfallMessageBox(DaggerfallUI.UIManager);

            messageBox.ClickAnywhereToClose        = clickAnywhereToClose;
            messageBox.ParentPanel.BackgroundColor = Color.clear;
            messageBox.ScreenDimColor = new Color32(0, 0, 0, 0);

            messageBox.SetText(message);

            if (buttons != null)
            {
                for (int i = 0; i < buttons.Length; i++)
                {
                    messageBox.AddCustomButton(99 + i, buttons[i], false);
                }
                messageBox.OnCustomButtonClick += Tent_messageBox_OnButtonClick;
            }

            messageBox.Show();
        }