public void OnGUI(Rect rect, Colors.NoteColorCollection colors) { DrawNoteBackground(rect, colors.main); GUILayout.BeginArea(GetTextAreaRect(rect)); EditorGUILayout.BeginVertical(); GUI.skin = Assets.Styles.Skin; _scroll = EditorGUILayout.BeginScrollView(_scroll); EditorGUI.BeginChangeCheck(); if (_isTooMuchText) { GUI.enabled = false; } Assets.Styles.TextArea.fontSize = InstantEditorEditorSettings.FontSize; _text = EditorGUILayout.TextArea(_text, Assets.Styles.TextArea); if (EditorGUI.EndChangeCheck()) { _onTextUpdated(_text); } EditorGUILayout.EndScrollView(); GUI.skin = null; EditorGUILayout.EndVertical(); GUILayout.EndArea(); GUI.enabled = true; }
public void OnGUI(Rect rect, Colors.NoteColorCollection colors) { ///////// // //if (InstantEditorEditorSettings.EditorColor.Value == NoteColor.DarkUnityPro) //{ /////Debug.LogWarning("YEAH FUNCIONÓ!"); // // Seteo color de Letra: Blaquecino, por tener fondo negruzco: // //GUI.contentColor = colors._miColorDeLetraPersonalizadoNormal; // // Cambia color del estilo a LETRAS BLANCAS, PORQUE FONDO ES NEGRO: // Assets.Styles.TextArea.normal.textColor = colors._miColorDeLetraPersonalizadoNormal; Assets.Styles.TooBigMessageText.normal.textColor = colors._miColorDeLetraPersonalizadoNormal; //}//End if ///////// var headerRect = GetHeaderRect(rect); GUIUtils.ColorRect(headerRect, colors.header, Color.clear); EditorGUILayout.LabelField(_isFileTooBig ? TooMuchTextMessage : _title, Assets.Styles.HeaderFileNameText); if (!_isFileTooBig) { DrawSaveButton(headerRect); DrawRestoreButton(headerRect); } DrawColorPickerButton(headerRect); }
public void OnGUI(Rect rect, Colors.NoteColorCollection colors) { var headerRect = GetHeaderRect(rect); GUIUtils.ColorRect(headerRect, colors.header, Color.clear); EditorGUILayout.LabelField(_isFileTooBig ? TooMuchTextMessage : _title, Assets.Styles.HeaderFileNameText); if (!_isFileTooBig) { DrawSaveButton(headerRect); DrawRestoreButton(headerRect); } DrawColorPickerButton(headerRect); }