/// <summary>Initializes the struct with default values.</summary> public static GUIContentImages Default() { GUIContentImages value = new GUIContentImages(); value.normal = null; value.hover = null; value.active = null; value.focused = null; value.normalOn = null; value.hoverOn = null; value.activeOn = null; value.focusedOn = null; return(value); }
private static extern void Internal_getEditorToggleIcon(EditorToggleIcon icon, out GUIContentImages __output);
private static extern void Internal_getAnimationWindowIcon(AnimationWindowIcon icon, out GUIContentImages __output);
private static extern void Internal_getSceneWindowIcon(SceneWindowIcon icon, out GUIContentImages __output);
private void OnInitialize() { GUILayoutY layout = GUI.AddLayoutY(); GUILayoutX titleLayout = layout.AddLayoutX(); GUIContentImages infoImages = new GUIContentImages( EditorBuiltin.GetLogMessageIcon(LogMessageIcon.Info, 16, false), EditorBuiltin.GetLogMessageIcon(LogMessageIcon.Info, 16, true)); GUIContentImages warningImages = new GUIContentImages( EditorBuiltin.GetLogMessageIcon(LogMessageIcon.Warning, 16, false), EditorBuiltin.GetLogMessageIcon(LogMessageIcon.Warning, 16, true)); GUIContentImages errorImages = new GUIContentImages( EditorBuiltin.GetLogMessageIcon(LogMessageIcon.Error, 16, false), EditorBuiltin.GetLogMessageIcon(LogMessageIcon.Error, 16, true)); GUIToggle infoBtn = new GUIToggle(new GUIContent(infoImages), EditorStyles.Button, GUIOption.FixedHeight(TITLE_HEIGHT)); GUIToggle warningBtn = new GUIToggle(new GUIContent(warningImages), EditorStyles.Button, GUIOption.FixedHeight(TITLE_HEIGHT)); GUIToggle errorBtn = new GUIToggle(new GUIContent(errorImages), EditorStyles.Button, GUIOption.FixedHeight(TITLE_HEIGHT)); GUIToggle detailsBtn = new GUIToggle(new LocEdString("Show details"), EditorStyles.Button, GUIOption.FixedHeight(TITLE_HEIGHT)); GUIButton clearBtn = new GUIButton(new LocEdString("Clear"), GUIOption.FixedHeight(TITLE_HEIGHT)); GUIToggle clearOnPlayBtn = new GUIToggle(new LocEdString("Clear on play"), EditorStyles.Button, GUIOption.FixedHeight(TITLE_HEIGHT)); titleLayout.AddElement(infoBtn); titleLayout.AddElement(warningBtn); titleLayout.AddElement(errorBtn); titleLayout.AddFlexibleSpace(); titleLayout.AddElement(detailsBtn); titleLayout.AddElement(clearBtn); titleLayout.AddElement(clearOnPlayBtn); infoBtn.Value = filter.HasFlag(EntryFilter.Info); warningBtn.Value = filter.HasFlag(EntryFilter.Warning); errorBtn.Value = filter.HasFlag(EntryFilter.Error); clearOnPlayBtn.Value = EditorSettings.GetBool(CLEAR_ON_PLAY_KEY, true); infoBtn.OnToggled += x => { if (x) { SetFilter(filter | EntryFilter.Info); } else { SetFilter(filter & ~EntryFilter.Info); } }; warningBtn.OnToggled += x => { if (x) { SetFilter(filter | EntryFilter.Warning); } else { SetFilter(filter & ~EntryFilter.Warning); } }; errorBtn.OnToggled += x => { if (x) { SetFilter(filter | EntryFilter.Error); } else { SetFilter(filter & ~EntryFilter.Error); } }; detailsBtn.OnToggled += ToggleDetailsPanel; clearBtn.OnClick += ClearLog; clearOnPlayBtn.OnToggled += ToggleClearOnPlay; GUILayoutX mainLayout = layout.AddLayoutX(); listView = new GUIListView <ConsoleGUIEntry, ConsoleEntryData>(Width, ListHeight, ENTRY_HEIGHT, mainLayout); detailsSeparator = new GUITexture(Builtin.WhiteTexture, GUIOption.FixedWidth(SEPARATOR_WIDTH)); detailsArea = new GUIScrollArea(ScrollBarType.ShowIfDoesntFit, ScrollBarType.NeverShow); mainLayout.AddElement(detailsSeparator); mainLayout.AddElement(detailsArea); detailsSeparator.Active = false; detailsArea.Active = false; detailsSeparator.SetTint(SEPARATOR_COLOR); Refresh(); Debug.OnAdded += OnEntryAdded; }
/// <summary>Constructs content with a string, an image and a tooltip.</summary> public GUIContent(LocString text, GUIContentImages image, LocString tooltip) { this.text = text; this.images = image; this.tooltip = tooltip; }
/// <summary>Constructs content with a string and an image.</summary> public GUIContent(LocString text, GUIContentImages image) { this.text = text; this.images = image; this.tooltip = null; }
/// <summary>Constructs content with an image and a tooltip.</summary> public GUIContent(GUIContentImages image, LocString tooltip) { this.text = null; this.images = image; this.tooltip = tooltip; }
/// <summary>Constructs content with just an image.</summary> public GUIContent(GUIContentImages image) { this.text = null; this.images = image; this.tooltip = null; }