mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-07-19 03:35:04 -04:00
UI: Add setting for Mixer add-on choice
MixrElixr Emotes is the emote-specific portion of MixrElixr, a popular extension for Mixer chat. Disabled by default.
This commit is contained in:
@@ -41,6 +41,8 @@ void OBSBasicSettings::InitStreamPage()
|
||||
ui->bandwidthTestEnable->setVisible(false);
|
||||
ui->twitchAddonDropdown->setVisible(false);
|
||||
ui->twitchAddonLabel->setVisible(false);
|
||||
ui->mixerAddonDropdown->setVisible(false);
|
||||
ui->mixerAddonLabel->setVisible(false);
|
||||
|
||||
int vertSpacing = ui->topStreamLayout->verticalSpacing();
|
||||
|
||||
@@ -67,6 +69,11 @@ void OBSBasicSettings::InitStreamPage()
|
||||
ui->twitchAddonDropdown->addItem(
|
||||
QTStr("Basic.Settings.Stream.TTVAddon.Both"));
|
||||
|
||||
ui->mixerAddonDropdown->addItem(
|
||||
QTStr("Basic.Settings.Stream.MixerAddon.None"));
|
||||
ui->mixerAddonDropdown->addItem(
|
||||
QTStr("Basic.Settings.Stream.MixerAddon.MEE"));
|
||||
|
||||
connect(ui->service, SIGNAL(currentIndexChanged(int)), this,
|
||||
SLOT(UpdateServerList()));
|
||||
connect(ui->service, SIGNAL(currentIndexChanged(int)), this,
|
||||
@@ -112,6 +119,9 @@ void OBSBasicSettings::LoadStream1Settings()
|
||||
|
||||
idx = config_get_int(main->Config(), "Twitch", "AddonChoice");
|
||||
ui->twitchAddonDropdown->setCurrentIndex(idx);
|
||||
|
||||
idx = config_get_int(main->Config(), "Mixer", "AddonChoice");
|
||||
ui->mixerAddonDropdown->setCurrentIndex(idx);
|
||||
}
|
||||
|
||||
UpdateServerList();
|
||||
@@ -189,6 +199,19 @@ void OBSBasicSettings::SaveStream1Settings()
|
||||
if (choiceExists && currentChoice != newChoice)
|
||||
forceAuthReload = true;
|
||||
}
|
||||
if (!!auth && strcmp(auth->service(), "Mixer") == 0) {
|
||||
bool choiceExists = config_has_user_value(
|
||||
main->Config(), "Mixer", "AddonChoice");
|
||||
int currentChoice =
|
||||
config_get_int(main->Config(), "Mixer", "AddonChoice");
|
||||
int newChoice = ui->mixerAddonDropdown->currentIndex();
|
||||
|
||||
config_set_int(main->Config(), "Mixer", "AddonChoice",
|
||||
newChoice);
|
||||
|
||||
if (choiceExists && currentChoice != newChoice)
|
||||
forceAuthReload = true;
|
||||
}
|
||||
|
||||
obs_data_set_string(settings, "key", QT_TO_UTF8(ui->key->text()));
|
||||
|
||||
@@ -309,6 +332,8 @@ void OBSBasicSettings::on_service_currentIndexChanged(int)
|
||||
ui->bandwidthTestEnable->setVisible(false);
|
||||
ui->twitchAddonDropdown->setVisible(false);
|
||||
ui->twitchAddonLabel->setVisible(false);
|
||||
ui->mixerAddonDropdown->setVisible(false);
|
||||
ui->mixerAddonLabel->setVisible(false);
|
||||
|
||||
#ifdef BROWSER_AVAILABLE
|
||||
if (cef) {
|
||||
@@ -467,6 +492,10 @@ void OBSBasicSettings::OnOAuthStreamKeyConnected()
|
||||
ui->twitchAddonLabel->setVisible(true);
|
||||
ui->twitchAddonDropdown->setVisible(true);
|
||||
}
|
||||
if (strcmp(a->service(), "Mixer") == 0) {
|
||||
ui->mixerAddonLabel->setVisible(true);
|
||||
ui->mixerAddonDropdown->setVisible(true);
|
||||
}
|
||||
}
|
||||
|
||||
ui->streamStackWidget->setCurrentIndex((int)Section::StreamKey);
|
||||
|
||||
Reference in New Issue
Block a user