diff options
| author | Andrew Lee <alee14498@protonmail.com> | 2020-08-20 23:40:50 -0400 |
|---|---|---|
| committer | Andrew Lee <alee14498@protonmail.com> | 2020-08-20 23:40:50 -0400 |
| commit | 3af4c218c0e70167db23a6303d2af30aff37d2fe (patch) | |
| tree | 927f29edcf54ab562f40f3d1c6cb69287c7f5980 /Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/StatusView.cs | |
| parent | b6daed0af784f4e9bc13329dd87c671b06ee1c65 (diff) | |
| download | Project-Sandbox-3af4c218c0e70167db23a6303d2af30aff37d2fe.tar.gz Project-Sandbox-3af4c218c0e70167db23a6303d2af30aff37d2fe.tar.bz2 Project-Sandbox-3af4c218c0e70167db23a6303d2af30aff37d2fe.zip | |
Removed a bunch of stuff; Changes
Diffstat (limited to 'Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/StatusView.cs')
| -rw-r--r-- | Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/StatusView.cs | 88 |
1 files changed, 0 insertions, 88 deletions
diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/StatusView.cs b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/StatusView.cs deleted file mode 100644 index 9b50e7a..0000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/StatusView.cs +++ /dev/null @@ -1,88 +0,0 @@ -using System; -using UnityEditor; -using UnityEngine; - -#if UNITY_2019_1_OR_NEWER -using UnityEngine.UIElements; -#else -using UnityEngine.Experimental.UIElements; -using UnityEngine.Experimental.UIElements.StyleEnums; -#endif - -namespace UnityEditor.Collaboration -{ - internal class StatusView : VisualElement - { - Image m_Image; - Label m_Message; - Button m_Button; - Action m_Callback; - - public Texture icon - { - get { return m_Image.image; } - set - { - m_Image.image = value; - m_Image.visible = value != null; - // Until "display: hidden" is added, this is the only way to hide an element - m_Image.style.height = value != null ? 150 : 0; - } - } - - public string message - { - get { return m_Message.text; } - set - { - m_Message.text = value; - m_Message.visible = value != null; - } - } - - public string buttonText - { - get { return m_Button.text; } - set - { - m_Button.text = value; - UpdateButton(); - } - } - - public Action callback - { - get { return m_Callback; } - set - { - m_Callback = value; - UpdateButton(); - } - } - - public StatusView() - { - name = "StatusView"; - - this.StretchToParentSize(); - - m_Image = new Image() { name = "StatusIcon", visible = false, style = { height = 0f }}; - m_Message = new Label() { name = "StatusMessage", visible = false}; - m_Button = new Button(InternalCallaback) { name = "StatusButton", visible = false}; - - Add(m_Image); - Add(m_Message); - Add(m_Button); - } - - private void UpdateButton() - { - m_Button.visible = m_Button.text != null && m_Callback != null; - } - - private void InternalCallaback() - { - m_Callback(); - } - } -} |
