Skip to content

Commit

Permalink
Fixed debugger logo not being used.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tayx94 authored and pixiongames committed Oct 25, 2020
1 parent 3414ec3 commit 4c8e7f2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Editor/GraphyDebuggerEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ public override void OnInspectorGUI()

#region Section -> Logo

if (GraphyEditorStyle.LogoTexture != null)
if (GraphyEditorStyle.DebuggerLogoTexture != null)
{
GUILayout.Label
(
image: GraphyEditorStyle.LogoTexture,
image: GraphyEditorStyle.DebuggerLogoTexture,
style: new GUIStyle(GUI.skin.GetStyle("Label"))
{
alignment = TextAnchor.UpperCenter
Expand Down
14 changes: 11 additions & 3 deletions Editor/GraphyEditorStyle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ internal static class GraphyEditorStyle
{
#region Variables -> Private

private static Texture2D m_logoTexture = null;
private static Texture2D _managerLogoTexture = null;
private static Texture2D _debuggerLogoTexture = null;
private static GUISkin m_skin = null;
private static GUIStyle m_headerStyle1 = null;
private static GUIStyle m_headerStyle2 = null;
Expand All @@ -20,7 +21,8 @@ internal static class GraphyEditorStyle

#region Properties -> Public

public static Texture2D LogoTexture { get { return m_logoTexture; } }
public static Texture2D ManagerLogoTexture { get { return _managerLogoTexture; } }
public static Texture2D DebuggerLogoTexture { get { return _debuggerLogoTexture; } }
public static GUISkin Skin { get { return m_skin; } }
public static GUIStyle HeaderStyle1 { get { return m_headerStyle1; } }
public static GUIStyle HeaderStyle2 { get { return m_headerStyle2; } }
Expand All @@ -32,12 +34,18 @@ internal static class GraphyEditorStyle

static GraphyEditorStyle()
{
m_logoTexture = AssetDatabase.LoadAssetAtPath<Texture2D>
_managerLogoTexture = AssetDatabase.LoadAssetAtPath<Texture2D>
(
"Packages/com.tayx.graphy/Textures/Manager_Logo_" +
(EditorGUIUtility.isProSkin ? "White.png" : "Dark.png")
);

_debuggerLogoTexture = AssetDatabase.LoadAssetAtPath<Texture2D>
(
"Packages/com.tayx.graphy/Textures/Debugger_Logo_" +
(EditorGUIUtility.isProSkin ? "White.png" : "Dark.png")
);

m_skin = AssetDatabase.LoadAssetAtPath<GUISkin>
(
"Packages/com.tayx.graphy/GUI/Graphy.guiskin"
Expand Down
4 changes: 2 additions & 2 deletions Editor/GraphyManagerEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -257,11 +257,11 @@ public override void OnInspectorGUI()

#region Section -> Logo

if (GraphyEditorStyle.LogoTexture != null)
if (GraphyEditorStyle.ManagerLogoTexture != null)
{
GUILayout.Label
(
image: GraphyEditorStyle.LogoTexture,
image: GraphyEditorStyle.ManagerLogoTexture,
style: new GUIStyle(GUI.skin.GetStyle("Label"))
{
alignment = TextAnchor.UpperCenter
Expand Down

0 comments on commit 4c8e7f2

Please sign in to comment.