Implement DictionaryPropertyEdit .
This PR implements DictionaryPropertyEdit
for editting exported dictionary properties (#10018 (closed)).
Here's a screenshot:
However there're some usability issues which I really need some help from you guys:
- Changing the
size
field won't work atm as I don't see a way for this to work for a dictionary. So currently there's no way to add/remove new items through the inspector. I think the most common way to handle this is to add a button/widget to add new items, but I don't find a way to add button in inspector/. - Can't handle duplicated keys. If one change a key to be equal to a existing key, the dictionary will actually shrink the dictionary by one. I don't really know how to handle this through the UI. Should duplicate key changes be ignored or report a error? Or I should simply make keys readonly.
- Changing keys will change item order. Maybe this can be fixed by adding data to track item orders.
Most of the problems are related to key editing. Your input on this will be really helpful.