/// <summary>
    /// Displays the window.
    /// </summary>
    /// <param name="windowID">The window's ID.</param>
    void DisplayWindow(int windowId)
    {
        GUILayout.BeginHorizontal();
        // Email
        GUILayout.Label("Email (optional)");
        email = GUILayout.TextField(email, GUILayout.Width(150));

        GUILayout.FlexibleSpace();

        // Feedback Type
        GUILayout.Label("Type");
        category = GUILayout.TextField(category, GUILayout.Width(150));
        GUILayout.EndHorizontal();

        // Feedback Message
        message = GUILayout.TextArea(message, GUILayout.MinHeight(150));

        // Cancel and Send buttons
        GUILayout.BeginHorizontal();
        GUILayout.FlexibleSpace();

        if (GUILayout.Button("Cancel"))
        {
            state = GUIState.Base;
        }

        if (GUILayout.Button("Send"))
        {
            Debug.Log("Sending feedback...");
            LumosFeedback.Record(message, email, category);
            state = GUIState.Base;
        }
        GUILayout.EndHorizontal();
    }
Ejemplo n.º 2
0
 /// <summary>
 /// Records a feedback message.
 /// </summary>
 /// <param name="message">The message.</param>
 /// <param name="email">The player's email address.</param>
 public static void Feedback(string message, string email)
 {
     LumosFeedback.Record(message, email, null);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Records a feedback message.
 /// </summary>
 /// <param name="message">The message.</param>
 public static void Feedback(string message)
 {
     LumosFeedback.Record(message, null, null);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Records a feedback message.
 /// </summary>
 /// <param name="message">The message.</param>
 /// <param name="email">The player's email address.</param>
 /// <param name="type">The category of feedback.</param>
 public static void Feedback(string message, string email, string type)
 {
     LumosFeedback.Record(message, email, type);
 }
Ejemplo n.º 5
0
    /// <summary>
    /// Displays the window.
    /// </summary>
    /// <param name="windowID">The window's ID.</param>
    static void DisplayWindow(int windowId)
    {
        GUI.BringWindowToFront(windowId);

        GUILayout.BeginHorizontal();

        GUILayout.Label("Email (optional)", GUILayout.ExpandWidth(false));
        email = GUILayout.TextField(email, 320);

        GUILayout.EndHorizontal();
        GUILayout.BeginHorizontal();

        GUILayout.Label("Type", GUILayout.ExpandWidth(false));
        category = GUILayout.TextField(category);

        GUILayout.EndHorizontal();

        if (!sentMessage)
        {
            message = GUILayout.TextArea(message, GUILayout.MinHeight(200));
        }
        else
        {
            GUILayout.BeginHorizontal();

            GUILayout.FlexibleSpace();
            GUILayout.Label("Your message has been sent.");
            GUILayout.FlexibleSpace();

            GUILayout.EndHorizontal();
        }

        GUILayout.BeginHorizontal();

        GUILayout.FlexibleSpace();

        if (!sentMessage)
        {
            if (GUILayout.Button("Cancel"))
            {
                HideDialog();
            }

            if (GUILayout.Button("Send"))
            {
                LumosFeedback.Record(message, email, category);
                message     = "";
                sentMessage = true;
            }
        }
        else
        {
            if (GUILayout.Button("OK"))
            {
                HideDialog();
                sentMessage = false;
            }
        }

        GUILayout.EndHorizontal();
    }