vexe / VFW

MIT License
492 stars 67 forks source link

Reverse Indent When Drawing List #108

Open zydeas opened 7 years ago

zydeas commented 7 years ago

I am drawing a list of custom properties using ObjectDrawer<>. I want to have as much horizontal space as possible when the inspector is the smallest width it can be set to. Here's an example (I want the yellow space gone):

Here's the code I'm using to draw that so far:

Thanks for any help you can provide.

vexe commented 7 years ago

It's been a while. I don't think there's a "custom spacing" attribute that you could apply per element (which would be the most ideal thing to have in this case), but have you tried adjusting the "Spacing" variable when you expand the foldout of your BaseBehaviour-inherited script? If that doesn't adjust the right spacing, or you don't want it per-script or global, then the only way would be to add support for custom spacing in the framework itself via a custom attribute. You'd want to look into ObjectDrawer and see how it recursively draw and indent nested members