Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Small Request] Rich text for ReorderableListPropertyDrawer #189

Closed
Samhayne opened this issue Nov 2, 2020 · 3 comments
Closed

[Small Request] Rich text for ReorderableListPropertyDrawer #189

Samhayne opened this issue Nov 2, 2020 · 3 comments

Comments

@Samhayne
Copy link

Samhayne commented Nov 2, 2020

Hey @dbrizov :)
Sometimes it's the small things.

Would you mind enabling rich text for the ReorderableList LabelField?

Changing the label code like this in ReorderableListPropertyDrawer.cs...

GUIStyle style = EditorStyles.boldLabel;
style.richText = true;
EditorGUI.LabelField(r, string.Format("{0}: {1}", label.text, property.arraySize), style /*EditorStyles.boldLabel*/);
HandleDragAndDrop(r, reorderableList);

allowed me to do this:

image

..when combined with a
[Label("GameObjects to <color=green>INCLUDE</color>")]
attribute.

@dbrizov
Copy link
Owner

dbrizov commented Nov 2, 2020

That's a great idea. I will :)

@Samhayne
Copy link
Author

Samhayne commented Nov 5, 2020

Rich text support for button texts would also be nice. :)

Added it for me in NaughtyEditorGUI.cs:

if (GUILayout.Button(buttonText, new GUIStyle(GUI.skin.button) {richText = true}))

@dbrizov
Copy link
Owner

dbrizov commented Jan 11, 2021

Added into the v2 branch: aa20fa3

@dbrizov dbrizov closed this as completed Jan 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants