From b0732d03d5ea426c4ac35b4e1c90500ee20d07e9 Mon Sep 17 00:00:00 2001 From: jazz mickle Date: Sun, 13 Jan 2019 17:11:36 +0100 Subject: [PATCH] Add summaries to DrawEnumGrid and DrawPartialEnumGrid --- Scripts/UI/SabreGUILayout.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Scripts/UI/SabreGUILayout.cs b/Scripts/UI/SabreGUILayout.cs index 5be2d14f..8de28a88 100644 --- a/Scripts/UI/SabreGUILayout.cs +++ b/Scripts/UI/SabreGUILayout.cs @@ -305,6 +305,11 @@ public static GUIStyle FormatStyle(Color textColor, int fontSize, FontStyle font } } + /// + /// Displays a list of enum buttons. + /// + /// The active value enum. + /// The enum selected when the user clicks one of the buttons. public static T DrawEnumGrid(T value, params GUILayoutOption[] options) where T : struct, IConvertible { if (!typeof(T).IsEnum) @@ -347,6 +352,12 @@ public static T DrawEnumGrid(T value, params GUILayoutOption[] options) where return value; } + /// + /// Displays a list of enum buttons, using only the provided enums. + /// + /// The active value enum. + /// The visible enum values. + /// The enum selected when the user clicks one of the buttons. public static T DrawPartialEnumGrid(T value, T[] enabled, params GUILayoutOption[] options) where T : struct, IConvertible { if (!typeof(T).IsEnum)