Editor GUI class with lots of useful functions and the custom styling used with all tools I develop.
More...
|
static void | UseSkin () |
| This should be the first call in OnGUI() to make sure the custom styles are loaded and ready for use. More...
|
|
static Texture2D | LoadEditorTexture (string fn) |
| Helper for loading a texture. Will print warning message to the console if failed to load the texture. More...
|
|
static Texture2D | LoadTextureResource (string fullResourceName, Assembly assembly) |
| Load embedded texture resources. More...
|
|
static byte[] | GetByteResource (string fullResourceName, Assembly assembly) |
|
static LayerMask | LayerMaskField (string label, LayerMask selected, int width) |
| Shows a Layer Mask field similar to the one in the Inspector More...
|
|
static string | PathField (string path, string label, string dialogTitle, int labelWidth, int buttonWidth) |
| Show a browse button which opens the EditorUtility.SaveFolderPanel) when clicked. The path is shown as text on the button. More...
|
|
static string | FileField (string path, string label, string dialogTitle, string defaultName, string extension, int labelWidth, int buttonWidth) |
| Show a browse button which opens the EditorUtility.SaveFilePanel() when clicked. The path is shown as text on the button. More...
|
|
static string | RelativeFileField (string path, string label, string dialogTitle, string extention, int labelWidth, int buttonWidth) |
| Show a browse button which opens the EditorUtility.OpenFilePanel(. The shown and returned path is a relative path. More...
|
|
static int | Popup (string label, int sel, string[] items) |
| Same as EditorGUILayout.Popup but with added 'clear' button to set selected to -1 More...
|
|
static string | PopupTextField (string label, string val, string[] items) |
| A text field with a little button that allow user to select values from a popup rather than entering them manually into the text field. More...
|
|
static bool | CurveField (plyCurve curve, int width, int height, Color col) |
| Shows a plyCurve. Return true if curve editor should be opened (when user clicked on the field). More...
|
|
static int | AngleField (string label, int angle, int min, int max, Color color, int width, int height, int radius, int maxRadius) |
| Draws a circle or arc. Has a slider to change angle of the arc. More...
|
|
static bool | MetaDataField (plyMetaData metaData, params GUILayoutOption[] layoutOptions) |
| Field for changing plyMetaData value depending on its type. Return true if value changed. More...
|
|
static bool | MetaDataEditor (ref int selectedIdx, ref plyMetaData[] metaData, BasicCallback repaintCallback, GeneralCallback saveCallback, object[] saveArgs) |
|
static bool | ToggleButton (bool active, string label, GUIStyle style, params GUILayoutOption[] options) |
| This toggle does not return the new state but rather if the state has changed (true) or not (false) More...
|
|
static bool | ToggleButton (bool active, GUIContent label, GUIStyle style, params GUILayoutOption[] options) |
| This toggle does not return the new state but rather if the state has changed (true) or not (false) More...
|
|
static bool | ToggleButton (Rect r, bool active, GUIContent label, GUIStyle style) |
| This toggle does not return the new state but rather if the state has changed (true) or not (false) More...
|
|
static bool | LabelButton (string label, string button, int labelWidth, int buttonWidth) |
| Show a button that has a label on the same line. More...
|
|
static void | SectionHeading (string label) |
| Draw a label in a large font with horizontal underline. Layout should be in vertical else this will render wrong. More...
|
|
static void | SectionHeading (string label, bool includeLine) |
| Draw a label in a large font with horizontal underline. Layout should be in vertical else this will render wrong. More...
|
|
static void | HLine (int topSpacing) |
| Used to draw the horizontal underline you would normally get with plyEdGui.Heading(). Layout should be in vertical else this will render wrong. More...
|
|
static void | HLine (int topSpacing, int bottomSpacing) |
| Used to draw the horizontal underline you would normally get with plyEdGui.Heading(). Layout should be in vertical else this will render wrong. More...
|
|
static int | Menu (int selected, string[] menuItems, params GUILayoutOption[] options) |
| Draw a menu (similar to the one in Unity Preferences). If the menuItem's name starts with "-" then that will be a separator. If the "-" is followed by more characters then that separator will be a heading. A null/empty string for menuItem will also cause a separator/space in the menu. More...
|
|
static int | Menu (int selected, GUIContent[] menuItems, params GUILayoutOption[] options) |
| Draw a menu (similar to the one in Unity Preferences). If the menuItem's name starts with "-" then that will be a separator. If the "-" is followed by more characters then that separator will have a heading. A null/empty/none content for menuItem will also cause a separator/space in the menu. More...
|
|
static bool | ItemsList< T > (ref T selected, List< T > items, bool canCopy, bool canRename, bool confirmDelete, bool supportStyleOverride, ResultCallback callback, ref Vector2 scroll, string helpUrl, string emptyLabel, params GUILayoutOption[] options) |
| Draws a List of items. Show buttons to Add, Copy and Delete these items. Returns TRUE when selected item changed. Draws a scrollbar if needed. More...
|
|
static bool | ItemsList< T > (ref T selected, List< T > items, bool canCopy, bool canRename, bool confirmDelete, bool supportStyleOverride, ResultCallback callback, ref Vector2 scroll, string helpUrl, string emptyLabel, bool menuStyle, GUIContent[] extraIcons, BasicCallback[] extraCallbacks, params GUILayoutOption[] options) |
| Draws a List of items. Show buttons to Add, Copy and Delete these items. Returns TRUE when selected item changed. Draws a scrollbar if needed. More...
|
|
static int | SimpleItemList< T > (ref T selected, List< T > items, string heading) |
| Show a toolbar with heading, add and delete buttons, and then the list of items. It uses the Item's "ToString" to get the value to show in the List Return 0: Nothing changed 1: Another Item selected in List 2: The Add button was pressed. You need to handle the actual addition of an item to the list 10: (or greater) An item must be deleted. The returned value is the index of the item plus 10 so use (idx = result - 10) to get index of item to delete More...
|
|
static int | SimpleItemList< T > (ref T selected, List< T > items, string heading, GeneralCallback drawCallback, params GUILayoutOption[] options) |
| Show a toolbar with heading, add and delete buttons, and then the list of items. It calls drawCallback to draw an item in a Horizontal layout. args[0] = index of item to draw Return 0: Nothing changed 1: Another Item selected in List 2: The Add button was pressed. You need to handle the actual addition of an item to the list 10: (or greater) An item must be deleted. The returned value is the index of the item plus 10 so use (idx = result - 10) to get index of item to delete More...
|
|
static bool | SimpleList< T > (ref T selected, List< T > items, string emptyLabel, params GUILayoutOption[] options) |
| Shows a list of items. More...
|
|
static int | SimpleItemList< T > (ref int selected, List< T > items, string heading, GeneralCallback drawCallback, params GUILayoutOption[] options) |
| Show a toolbar with heading, add and delete buttons, and then the list of items. It calls drawCallback to draw an item in a Horizontal layout. args[0] = index of item to draw Return 0: Nothing changed 1: Another Item selected in List 2: The Add button was pressed. You need to handle the actual addition of an item to the list 10: (or greater) An item must be deleted. The returned value is the index of the item plus 10 so use (idx = result - 10) to get index of item to delete More...
|
|
static int | SimpleItemArray (ref int selectedIdx, System.Array items, string heading, GeneralCallback drawCallback, object[] args) |
| Show a toolbar with heading, add and delete buttons, and then the list of items. It updates selectedIdx with the index of the selected item. selectedIdx=-1 means nothing is selected. It calls drawCallback to draw an item in a Horizontal layout with the following args[0] = index of item to draw args[1+] = custom args It Return 0: Nothing changed 1: Another Item selected in List 2: The Add button was pressed. You need to handle the actual addition of an item to the list 10: (or greater) An item must be deleted. The returned value is the index of the item plus 10 so use (idx = result - 10) to get index of item to delete More...
|
|
static void | DrawHorizontalLine (int thickness, int width, Color color, GUIStyle style) |
| Draw a horizontal line. More...
|
|
static void | DrawHorizontalLine (int thickness, int width, Color color, GUIStyle style, int marginTop, int marginBottom) |
| Draw a horizontal line. More...
|
|
static void | DrawVerticalLine (int thickness, int height, Color color, GUIStyle style, int marginLeft, int marginRight) |
| Draw a vertical line. More...
|
|
static void | DrawCurveLine (Rect containedArea, Vector3 startPos, Vector3 endPos, Color color, float thickness, bool drawShadow) |
| Draw a Bezier curve line. More...
|
|
static void | DrawGrid (Rect r, int xSpacing, int ySpacing, int linesPerMajor, Vector2 linesOffset, Color backColor, Color majorLineColor, Color minorLineColor) |
| Draws a Grid. More...
|
|
static void | DrawBlocksGrid (Rect r, int blockSize, Color majorColor, Color minorColor) |
| Draw a grid that consist of altering colored blocks. More...
|
|
static void | ClearFocus () |
|
static void | LookLikeControls () |
|
static void | LookLikeControls (float labelWidth) |
|
static void | LookLikeControls (float labelWidth, float fieldWidth) |
|
|
static GUISkin | Skin = null |
| Skin that includes the custom Styles.
|
|
static Color | DividerColor = new Color(0.35f, 0.35f, 0.35f, 1f) |
|
static Color | GridLineMinorColor = new Color(0f, 0f, 0f, 0.1f) |
|
static Color | GridLineMajorColor = new Color(0f, 0f, 0f, 0.3f) |
|
static Color | ColorTealTrans = new Color(0.002f, 0.515f, 0.507f, 0.45f) |
|
static Color | ColorFuchsiaTrans = new Color(0.714f, 0.429f, 0.718f, 0.45f) |
|
static Color | IconColor = EditorGUIUtility.isProSkin ? new Color(0.705f, 0.705f, 0.705f, 1.000f) : new Color(0.000f, 0.000f, 0.000f, 1.000f) |
|
static GUIStyle | EmptyStyle = new GUIStyle() |
|
static GUIStyle | LargeBoldLabelStyle |
|
static GUIStyle | LargeFALabelStyle |
|
static GUIStyle | TextAreaStyle |
|
static GUIStyle | TextFieldNoLRMarginStyle |
|
static GUIStyle | TextFieldNoRightMarginStyle |
|
static GUIStyle | RightAlignLabelStyle |
|
static GUIStyle | CenterAlignLabelStyle |
|
static GUIStyle | WrappedRichTextLabelStyle |
|
static GUIStyle | RichTextBoldLabelStyle |
|
static GUIStyle | PaddingHelperStyle |
|
static GUIStyle | LRPaddingHelperStyle |
|
static GUIStyle | BoxNoPaddingStyle |
|
static GUIStyle | ButtonLeftStyle |
|
static GUIStyle | ButtonMidStyle |
|
static GUIStyle | ButtonRightStyle |
|
static GUIStyle | IconButtonLeftStyle |
|
static GUIStyle | IconButtonMidStyle |
|
static GUIStyle | IconButtonRightStyle |
|
static GUIStyle | MiniIconButtonLeftStyle |
|
static GUIStyle | MiniIconButtonMidStyle |
|
static GUIStyle | MiniIconButtonRightStyle |
|
static Color | MainToolbarDividerColor = new Color(0f, 0.5f, 0.8f, 1f) |
|
static GUIStyle | MainToolbarStyle |
|
static GUIStyle | MainToolbarButtonLeftStyle |
|
static GUIStyle | MainToolbarButtonMidStyle |
|
static GUIStyle | MainToolbarButtonRightStyle |
|
static GUIStyle | ToolbarStyle |
|
static GUIStyle | ToolbarIconButtonStyle |
|
static GUIStyle | ToolbarButtonStyle |
|
static GUIStyle | ToolbarPopupStyle |
|
static GUIStyle | ToolbarLabelStyle |
|
static GUIStyle | ToolbarHeadStyle |
|
static GUIStyle | ToolbarTextFieldStyle |
|
static GUIStyle | ItemListBoxStyle |
|
static GUIStyle | ItemListHeadStyle |
|
static GUIStyle | ItemListButtonStyle |
|
static GUIStyle | ItemListEntry1Style |
|
static GUIStyle | ItemListEntry2Style |
|
static GUIStyle | ItemListEntrySelectedStyle |
|
static GUIStyle | FlatIconButtonStyle |
|
static GUIStyle | FlatIconButtonSmallStyle |
|
static GUIStyle | MenuBoxStyle |
|
static GUIStyle | MenuItemStyle |
|
static GUIStyle | MenuHeadStyle |
|
static GUIStyle | MenuListItemStyle1 |
|
static GUIStyle | MenuListItemStyle2 |
|
static GUIStyle | MenuListItemMarginStyle1 |
|
static GUIStyle | MenuListItemMarginStyle2 |
|
static GUIStyle | SplitterStyle |
|
static GUIStyle | FlatWhiteStyle |
|
static GUIStyle | HLineStyle |
|
static GUIStyle | InnerShadowStyle |
|
static GUIStyle | AboutLogoAreaStyle |
|
static Texture2D | Texture_ItemListBox |
|
static Texture2D | Texture_ItemListButtonN |
|
static Texture2D | Texture_ItemListButtonA |
|
static Texture2D | Texture_ItemListEntry1 |
|
static Texture2D | Texture_ItemListEntry2 |
|
static Texture2D | Texture_ItemListSelected |
|
static Texture2D | Texture_MainToolButtonSelected |
|
static Texture2D | Texture_MenuBox |
|
static Texture2D | Texture_MenuListItem1 |
|
static Texture2D | Texture_MenuListItem2 |
|
static Texture2D | Texture_MenuItemSelected |
|
static Texture2D | Texture_Splitter |
|
static Texture2D | Texture_InnerShadow |
|
static Texture2D | Texture_ListItemAddButton |
|
static Texture2D | Texture_ListItemRenButton |
|
static Texture2D | Texture_ListItemDelButton |
|
static Texture2D | Texture_ListItemDel2Button |
|
static Texture2D | Texture_ListItemCpyButton |
|
static Texture2D | Texture_ListItemHlpButton |
|
static Texture2D | Texture_ListItemUpButton |
|
static Texture2D | Texture_ListItemDwnButton |
|
static Texture2D | Texture_Bezier |
|
static GUIContent | GC_Add |
|
static GUIContent | GC_Copy |
|
static GUIContent | GC_Delete |
|
static GUIContent | GC_Remove |
|
static GUIContent | GC_Rename |
|
static GUIContent | GC_Help |
|
static GUIContent | GC_ListUp |
|
static GUIContent | GC_ListDown |
|
static GUIContent | GC_Settings |
|
static GUIContent | GC_Left |
|
static GUIContent | GC_Right |
|
static GUIContent | GC_ListItemAddButton |
|
static GUIContent | GC_ListItemDelButton |
|
static GUIContent | GC_ListItemCpyButton |
|
static GUIContent | GC_ListItemRenButton |
|
static GUIContent | GC_ListItemHlpButton |
|
static GUIContent | GC_ListItemUpButton |
|
static GUIContent | GC_ListItemDwnButton |
|
static GUIContent | GC_Heading |
|
Editor GUI class with lots of useful functions and the custom styling used with all tools I develop.