Hi, all the blocks created via plugin use the AutoBlockDescriptor. You cannot add any blocks with a custom descriptor without recompiling OB2’s code. For the dropdown you can simply use an enum
Thanks Ruri for your response, I know we can add a dropdown list like that just with using an enum type, but currently I have two problem with using enum:
Yes I can add an attribute to do this, please open an issue on github and I will add it (if not too hard to implement, it will be included in 0.2.2). Just a question though, why can’t you just add an underscore in front? It doesn’t look that bad in my opinion.
public enum ScreenResolutionInfo
{
_1920x1080,
_1600x900,
_1366x768
}
UPDATE Ok nevermind don’t open the issue I already did it You can use the Description attribute as in the link you posted and it will render the pretty name now.
I know we can put underscore in front to make like others enum, but I think its pretty lame when you open monitor settings or Display resolution in Windows Settings like this
and there’s underscore before every pre-set resolution, and it makes me wonder why they have to put underscore like that ??
Maybe I am not an easy going for design like this, anyways appreciate for your support and how fast you do it.
That would not be an actual enum type then, it would simply be a string with a set of predefined values. I guess this is possible to do as well, even though a bit harder than the other one. Open an issue on github and I will implement it when I have some free time.
Please discuss with me the approach you would take and what you would change before opening a PR, to make sure we’re on the same page before you start coding, thank you!