Closed oxysoft closed 7 years ago
I have added several new modifiers to the Obj
enum that allow me to do this quite easily.
NoHeader
: hide the header of a fieldShowPicker
: show the picker which I set to hide by default nowAlwaysExpand
: make a field expanded at all time and that cannot be unexpandedNoIndent
: disable indentation for fields contained by the member. I have alsoAnd also a single Inline
modifiers which combines AlwaysExpand
, NoHeader
and NoIndent
to achieve what I wanted in this issue. I'm not sure I want to do a pull request to implement these into VFW since I'm not very familiar with the VFW internals and the code that I wrote to achieve the aboves is not very pretty.
p.s. VFW is a gift from the heavens, and is so much more powerful than what Unity provides us by default. I wanted to gouge my eyes out when I had to write custom drawers a few months ago and saw that not only could I not just work with the bare objects and had to use SerializedProperties instead, but also that I had to calculate the rectangles myself to draw shit because you cannot use EditorGUILayout. This is such a piece of shit API, and I'm so thankful for what you've enabled with VFW
I was able to do something like this with some of my own attributes and changes to VFW listed above.
The fact that I can do all of this with just attributes blows my mind
I have something like this which I expose from a class which is a ScriptableObject
where SkillProc is another Serializable.
proc
has to be expanded whereas it would be cleaner if I could inline it at the same level asname
. Is this possible?Thanks