jbruening / ugui-mvvm

Unity3D uGUI mvvm databinding via the standard IXChanged interfaces used in wpf (INotifyPropertyChanged, INotifyCollectionChanged, etc)
Other
214 stars 41 forks source link

Display property typename in autosuggest field. #18

Closed AdamMitchell-ms closed 5 years ago

AdamMitchell-ms commented 5 years ago

In property path autosuggest field, display the property's type in parens to the right of the property name. There is not a great way to display things in columns here without changing Suggestion to take in multiple display strings and then having AutoSuggestField know how to display them. That didn't seem worth the effort.

So for now I've just used padding spaces plus a tab to line things up. I found that padding to 16 spaces got most strings to fit in the same tabstop. Some very short or long ones won't line up.

image

If you make the inspector window as narrow as it can be, then the property typenames will be rendered out of view, which is equivalent to the behavior prior to this change, so I think it's acceptable.

AdamMitchell-ms commented 5 years ago

@ritijain, This will also help with picking the correct property in a command binding, which you mentioned in pull #14.

AdamMitchell-ms commented 5 years ago

And here's an example of a property name that is too long and causes the property typename to move to the next tabstop. I think this is acceptable. It prioritizes the property name which you need to correctly determine which one you're picking.

image