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.timeline@1.2.13/Editor/Tooltip.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.timeline@1.2.13/Editor/Tooltip.cs')
| -rw-r--r-- | Library/PackageCache/com.unity.timeline@1.2.13/Editor/Tooltip.cs | 110 |
1 files changed, 0 insertions, 110 deletions
diff --git a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Tooltip.cs b/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Tooltip.cs deleted file mode 100644 index d88567c..0000000 --- a/Library/PackageCache/com.unity.timeline@1.2.13/Editor/Tooltip.cs +++ /dev/null @@ -1,110 +0,0 @@ -using UnityEngine; - -namespace UnityEditor.Timeline -{ - class Tooltip - { - public GUIStyle style { get; set; } - - public string text { get; set; } - - GUIStyle m_Font; - - public GUIStyle font - { - get - { - if (m_Font != null) - return m_Font; - - if (style != null) - return style; - - // Default Font. - m_Font = new GUIStyle(); - m_Font.font = EditorStyles.label.font; - - return m_Font; - } - set { m_Font = value; } - } - - float m_Pad = 4.0f; - - public float pad - { - get { return m_Pad; } - set { m_Pad = value; } - } - - GUIContent m_TextContent; - - GUIContent textContent - { - get - { - if (m_TextContent == null) - m_TextContent = new GUIContent(); - - m_TextContent.text = text; - - return m_TextContent; - } - } - - Color m_ForeColor = Color.white; - - public Color foreColor - { - get { return m_ForeColor; } - set { m_ForeColor = value; } - } - - Rect m_Bounds; - - public Rect bounds - { - get - { - var size = font.CalcSize(textContent); - m_Bounds.width = size.x + (2.0f * pad); - m_Bounds.height = size.y + 2.0f; - - return m_Bounds; - } - - set { m_Bounds = value; } - } - - public Tooltip(GUIStyle theStyle, GUIStyle font) - { - style = theStyle; - m_Font = font; - } - - public Tooltip() - { - style = null; - m_Font = null; - } - - public void Draw() - { - if (string.IsNullOrEmpty(text)) - return; - - if (style != null) - { - using (new GUIColorOverride(DirectorStyles.Instance.customSkin.colorTooltipBackground)) - GUI.Label(bounds, GUIContent.none, style); - } - - var textBounds = bounds; - textBounds.x += pad; - textBounds.width -= pad; - - using (new GUIColorOverride(foreColor)) - GUI.Label(textBounds, textContent, font); - } - } -} |
