Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libobs,UI: Add bool list and radio button list to properties #7833

Merged
merged 2 commits into from
May 20, 2023

Conversation

gxalpha
Copy link
Member

@gxalpha gxalpha commented Nov 22, 2022

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 as OBS_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.):

Bildschirm­foto 2022-11-22 um 17 52 45 Bildschirm­foto 2022-11-22 um 17 53 11

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

  • New feature (non-breaking change which adds functionality)
  • Tweak (non-breaking change to improve existing functionality)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

@gxalpha gxalpha added Enhancement Improvement to existing functionality UI/UX Anything to do with changes or additions to UI/UX elements. labels Nov 22, 2022
@RealIndrit
Copy link

RealIndrit commented Nov 23, 2022

The idea of radio button list is cool, but I don't really know if they are good for lists with more than 4-5 buttons, at some point the list of radio buttons is just too much and makes the window look bloated. Personally I prefer the look of the drop down list for the permission setting. But I still see potentional good usage of the radio button list in other instances of use cases.

@gxalpha
Copy link
Member Author

gxalpha commented Nov 23, 2022

I don't really know if they are good for lists with more than 4-5 buttons, at some point the list of radio buttons is just too much and makes the window look bloated. Personally I prefer the look of the drop down list for the permission setting

As mentioned, this isn't the actual use case.

You can find a real use case of this in #7835

@RealIndrit
Copy link

I don't really know if they are good for lists with more than 4-5 buttons, at some point the list of radio buttons is just too much and makes the window look bloated. Personally I prefer the look of the drop down list for the permission setting

As mentioned, this isn't the actual use case.

You can find a real use case of this in #7835

Just realized, my bad, completely missed that part 😂.

@CodeYan01
Copy link
Contributor

I think these should be added to reference-properties.rst

@gxalpha
Copy link
Member Author

gxalpha commented Dec 1, 2022

Fixed.

@RytoEX RytoEX added this to the OBS Studio 29.1 milestone Dec 3, 2022
@Lain-B Lain-B merged commit ad9fd6c into obsproject:master May 20, 2023
@gxalpha gxalpha deleted the properties_list_radio_v2 branch May 20, 2023 23:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Improvement to existing functionality UI/UX Anything to do with changes or additions to UI/UX elements.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants