Consider adding TermsPopup patch to future release

More
6 years 8 months ago - 6 years 8 months ago #2377 by michael
First off, thanks for providing source code to developers! I2 Localization rocks!

I updated the TermsPopup attribute by allowing it to accept an optional "filter" parameter, and updated the associated PropertyDrawer to support the filtering. See the attached patch file for details.

By default, everything operates as used to. When adding a filter to the attribute, the contents of the popup exclude any terms that do not match the filter.

For example, the following allows the popup to only include terms containing "/Help/".
[TermsPopup("/Help/")]
public string message;



I also wrapped the GUI control with EditorGUI.BeginProperty and EditorGUI.EndProperty calls, so that the Popup is handled correctly by the Inspector. Note in the following image how the Message property label is drawn using the bold font, because it differs from the prefab. It also features a tooltip. Neither of these occur without the patch.



Thanks!

The patch should be attached to this post. It can also be found here: TermsPopup patch

Use the v2 patch. The original patch includes a file that had line endings changed from Win to Unix, so the entire file appeared changed. The v2 patch only includes actual changes.
Attachments:
Last edit: 6 years 8 months ago by michael. Reason: Updated the images.

Please Log in or Create an account to join the conversation.

More
6 years 8 months ago #2379 by Frank
Hi,
Thanks a lot for the suggestion!!
I will review the patch and add it to the next release.

Thanks!
Frank

Are you :-) Give I2L 5 stars!
Are you :-( Please lets us know how to improve it!
To get the betas as soon as they are ready, check this out

Please Log in or Create an account to join the conversation.

Time to create page: 0.163 seconds
Template by JoomlaShine