public override void OnInspectorGUI() { serializedObject.Update(); EditorGUILayout.PropertyField(m_SizeMode); if (m_SizeMode.enumValueIndex == 0) { EditorGUILayout.PropertyField(m_Size); } InspectorFields.GraphicColorMultiField("Icon", o => o.GetComponent <VectorImage>()); serializedObject.ApplyModifiedProperties(); }
private bool ExternalPropertiesSection() { RectTransform circleRectTransformValue = m_CircleRectTransform.objectReferenceValue as RectTransform; if (circleRectTransformValue == null) { return(false); } if (circleRectTransformValue.childCount == 0) { return(false); } return(InspectorFields.GraphicColorField("Circle", circleRectTransformValue.GetChild(0).GetComponent <Graphic>())); }
private bool OtherButtonsSection() { bool result = false; EditorGUI.indentLevel++; EditorGUILayout.PropertyField(m_Buttons, new GUIContent("References"), true); EditorGUI.indentLevel--; if (m_MaterialAppBar.buttons == null) { return(false); } for (int i = 0; i < m_MaterialAppBar.buttons.Length; i++) { Utils.SetBoolValueIfTrue(ref result, InspectorFields.MaterialButtonField(m_MaterialAppBar.buttons[i])); } return(result); }
private bool ExternalPropertiesSection() { bool result = false; RectTransform barRectTransform = m_BarRectTransform.objectReferenceValue as RectTransform; if (barRectTransform != null) { Utils.SetBoolValueIfTrue(ref result, InspectorFields.GraphicColorField("Bar", barRectTransform.GetComponent <Graphic>())); } Image backgroundImage = m_BackgroundImage.objectReferenceValue as Image; if (backgroundImage != null) { Utils.SetBoolValueIfTrue(ref result, InspectorFields.GraphicColorField("Background", backgroundImage)); } return(result); }
private bool ExternalPropertiesSection() { bool result = false; Func <GameObject, Graphic> getTitleTextFunc = go => { MaterialAppBar appBar = go.GetComponent <MaterialAppBar>(); return(appBar == null ? null : appBar.titleText); }; Func <GameObject, Graphic> getPanelGraphicFunc = go => { MaterialAppBar appBar = go.GetComponent <MaterialAppBar>(); return(appBar == null ? null : appBar.panelGraphic); }; Utils.SetBoolValueIfTrue(ref result, InspectorFields.GraphicColorMultiField("Title Text", getTitleTextFunc, m_TitleText.objectReferenceValue as Graphic)); Utils.SetBoolValueIfTrue(ref result, InspectorFields.GraphicColorMultiField("Panel Graphic", getPanelGraphicFunc, m_PanelGraphic.objectReferenceValue as Graphic)); return(result); }
private bool ExternalPropertiesSection() { return(InspectorFields.MaterialButtonMultiField(go => go.GetComponent <MaterialButton>(), m_SelectedMaterialButton)); }