public static void RestoreTextColor(TextColorState oldColor) { GUIStyle style = GUI.skin.GetStyle(oldColor.styleName); style.normal.textColor = oldColor.styleColor; GUI.contentColor = oldColor.contentColor; }
public static TextColorState SetTextColor(Color newColor, string styleName) { GUIStyle style = GUI.skin.GetStyle(styleName); TextColorState tcs = new TextColorState(styleName, style.normal.textColor, GUI.contentColor); style.normal.textColor = newColor; GUI.contentColor = newColor; return tcs; }
public static TextColorState SetTextColor(Color newColor, string styleName) { GUIStyle style = GUI.skin.GetStyle(styleName); TextColorState tcs = new TextColorState(styleName, style.normal.textColor, GUI.contentColor); style.normal.textColor = newColor; GUI.contentColor = newColor; return(tcs); }
public static void RestoreTextColor(TextColorState oldColor) { GUIStyle style = GUI.skin.GetStyle(oldColor.styleName); style.normal.textColor = oldColor.styleColor; GUI.contentColor = oldColor.contentColor; }