mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-02-18 15:04:53 -05:00
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:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user