libobs,UI: Add bool list and radio button list to properties #7833
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Adds
OBS_COMBO_FORMAT_BOOL
to combo formats, making it possible to have bool values in a properties list (dropdown).Adds
OBS_COMBO_TYPE_RADIO
, which displays a properties list as radio buttons instead of as a combobox. For the API user, input and output behaves the same asOBS_COMBO_TYPE_LIST
.Hypothetical case of how this would look (this isn't the actual use case, which will follow in a second separated PR to make reviewing easier.):
Technically, these changes are unrelated, but one modifies each other, making it simpler to have them combined (cause the radio type also needs bool support if that would be merged first, so I'd have to fix conflicts from my own PR).
Motivation and Context
Having radio buttons in properties would be beneficial for some use cases, and a year ago at least was something on Warchamp's wishlist.
I then made this branch about half a year ago, then forgot it.
This is preparation for a second PR which I will open shortly.
How Has This Been Tested?
Tested with the properties of the ft2-text source, as well as the browser source (see screenshot above). Also tested with a properties view in encoder settings.
Types of changes
Checklist: