/// <summary> /// Draws and responds to an enum picker for the port plate type /// </summary> private PortPlateType DrawPortPlateTypePicker(int widgetIndex) { EdgeworkConfiguration config = (EdgeworkConfiguration)serializedObject.targetObject; THWidget widget = config.Widgets[widgetIndex]; widget.PortPlateType = (PortPlateType)EditorGUILayout.EnumPopup("Port Plate Type", widget.PortPlateType, GUILayout.MinWidth(200)); return(widget.PortPlateType); }
/// <summary> /// Draws and responds to an enum picker for the battery type /// </summary> private BatteryType DrawBatteryTypePicker(int widgetIndex) { EdgeworkConfiguration config = (EdgeworkConfiguration)serializedObject.targetObject; THWidget widget = config.Widgets[widgetIndex]; widget.BatteryType = (BatteryType)EditorGUILayout.EnumPopup("Battery Count", widget.BatteryType, GUILayout.MinWidth(200)); return(widget.BatteryType); }
/// <summary> /// Draws and responds to an enum picker for the indicator state /// </summary> private IndicatorState DrawIndicatorStatePicker(int widgetIndex) { EdgeworkConfiguration config = (EdgeworkConfiguration)serializedObject.targetObject; THWidget widget = config.Widgets[widgetIndex]; widget.IndicatorState = (IndicatorState)EditorGUILayout.EnumPopup("Indicator State", widget.IndicatorState, GUILayout.MinWidth(200)); return(widget.IndicatorState); }
/// <summary> /// Draws and responds to an enum picker for the widget type /// </summary> private WidgetType DrawWidgetTypePicker(int widgetIndex) { EdgeworkConfiguration config = (EdgeworkConfiguration)serializedObject.targetObject; THWidget widget = config.Widgets[widgetIndex]; widget.Type = (WidgetType)EditorGUILayout.EnumPopup(widget.Type, GUILayout.MinWidth(120)); return(widget.Type); }