UI: Add interact button to source toolbar
This adds a interact button to the source toolbar. It is only shown when source is interactable.
This commit is contained in:
parent
520f1158e1
commit
968a1a6ff0
7 changed files with 50 additions and 0 deletions
|
|
@ -2986,6 +2986,9 @@ void OBSBasic::UpdateContextBar(bool force)
|
|||
const char *id = obs_source_get_unversioned_id(source);
|
||||
uint32_t flags = obs_source_get_output_flags(source);
|
||||
|
||||
ui->sourceInteractButton->setVisible(flags &
|
||||
OBS_SOURCE_INTERACTION);
|
||||
|
||||
if (flags & OBS_SOURCE_CONTROLLABLE_MEDIA) {
|
||||
if (!is_network_media_source(source, id)) {
|
||||
MediaControls *mediaControls =
|
||||
|
|
@ -3066,6 +3069,7 @@ void OBSBasic::UpdateContextBar(bool force)
|
|||
|
||||
ui->sourceFiltersButton->setEnabled(false);
|
||||
ui->sourcePropertiesButton->setEnabled(false);
|
||||
ui->sourceInteractButton->setVisible(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -8483,3 +8487,8 @@ void OBSBasic::on_sourceFiltersButton_clicked()
|
|||
{
|
||||
OpenFilters();
|
||||
}
|
||||
|
||||
void OBSBasic::on_sourceInteractButton_clicked()
|
||||
{
|
||||
on_actionInteract_triggered();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue