summaryrefslogtreecommitdiff
path: root/Valheim_r202102_v0.141.2/Valheim/assembly_valheim/Feedback.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Valheim_r202102_v0.141.2/Valheim/assembly_valheim/Feedback.cs')
-rw-r--r--Valheim_r202102_v0.141.2/Valheim/assembly_valheim/Feedback.cs91
1 files changed, 0 insertions, 91 deletions
diff --git a/Valheim_r202102_v0.141.2/Valheim/assembly_valheim/Feedback.cs b/Valheim_r202102_v0.141.2/Valheim/assembly_valheim/Feedback.cs
deleted file mode 100644
index 05a7db3..0000000
--- a/Valheim_r202102_v0.141.2/Valheim/assembly_valheim/Feedback.cs
+++ /dev/null
@@ -1,91 +0,0 @@
-using UnityEngine;
-using UnityEngine.UI;
-
-public class Feedback : MonoBehaviour
-{
- private static Feedback m_instance;
-
- public Text m_subject;
-
- public Text m_text;
-
- public Button m_sendButton;
-
- public Toggle m_catBug;
-
- public Toggle m_catFeedback;
-
- public Toggle m_catIdea;
-
- private void Awake()
- {
- m_instance = this;
- }
-
- private void OnDestroy()
- {
- if (m_instance == this)
- {
- m_instance = null;
- }
- }
-
- public static bool IsVisible()
- {
- return m_instance != null;
- }
-
- private void LateUpdate()
- {
- m_sendButton.interactable = IsValid();
- if (IsVisible() && (Input.GetKeyDown(KeyCode.Escape) || ZInput.GetButtonDown("JoyMenu")))
- {
- OnBack();
- }
- }
-
- private bool IsValid()
- {
- if (m_subject.text.Length == 0)
- {
- return false;
- }
- if (m_text.text.Length == 0)
- {
- return false;
- }
- return true;
- }
-
- public void OnBack()
- {
- Object.Destroy(base.gameObject);
- }
-
- public void OnSend()
- {
- if (IsValid())
- {
- string category = GetCategory();
- GoogleAnalyticsV4.instance.LogEvent("Feedback_" + category, m_subject.text, m_text.text, 0L);
- Object.Destroy(base.gameObject);
- }
- }
-
- private string GetCategory()
- {
- if (m_catBug.isOn)
- {
- return "Bug";
- }
- if (m_catFeedback.isOn)
- {
- return "Feedback";
- }
- if (m_catIdea.isOn)
- {
- return "Idea";
- }
- return "";
- }
-}