When working with Odin, there was a lot of cases when CollectionDrawer need to be modified more, that it currently allows, but there was no other way to do it than to copy it from sources and modify it directly, creating a lot of copy-paste code, that may break on major Odin update.
I can suggest 2 ways to deal with it:
- Add more options to ListDrawerSettings. This will make it more consistent, but may still restrict user’s options for some cases
- Create custom CollectionDrawer class with a lot of virtual methods to be overridden, that can be extended and called from custom drawers.
Things I usually try to do when I need more collection drawer options:
- I want to draw some property instead of label in the list’s header. It’s possible now by disabling literally everything, but it forces you to manually write all default stuff from the header, including creation of new items.
- When you want to add button on the left of “add” button.
- I had to make a copy to CollectionDrawer to make it possible to draw it as grid. It allowed to draw multiple items in single row: you either set number of columns, on width of single item. It didn’t require much changes from original code, so such thing can be easily implemented to current ListDrawerSettings as option.
- Disable header completely, so you can draw it manually with more options
- Make header multi-lined, so you can fit some extra data there.
- Draw some properties below header (if expanded), but before list items