/// <summary> /// Changes the active palettes to the given ones /// (or resets them to the default ones if NULL) /// </summary> public static void ChangePalette(DeColorPalette newColorPalette, DeStylePalette newStylePalette) { if (newColorPalette != null) { colors = newColorPalette; } else { if (_defaultColorPalette == null) { _defaultColorPalette = new DeColorPalette(); } colors = _defaultColorPalette; } if (newStylePalette != null) { styles = newStylePalette; } else { if (_defaultStylePalette == null) { _defaultStylePalette = new DeStylePalette(); } styles = _defaultStylePalette; } styles.Init(); }
/// <summary> /// Call this at the beginning of GUI methods /// </summary> /// <param name="guiColorPalette">Eventual <see cref="DeColorPalette"/> to use</param> /// <param name="guiStylePalette">Eventual <see cref="DeStylePalette"/> to use</param> public static void BeginGUI(DeColorPalette guiColorPalette = null, DeStylePalette guiStylePalette = null) { ChangePalette(guiColorPalette, guiStylePalette); defaultGUIColor = GUI.color; defaultGUIBackgroundColor = GUI.backgroundColor; defaultGUIContentColor = GUI.contentColor; }