diff --git a/src/blackgui/components/logincomponent.cpp b/src/blackgui/components/logincomponent.cpp index a0187611e..401d092cd 100644 --- a/src/blackgui/components/logincomponent.cpp +++ b/src/blackgui/components/logincomponent.cpp @@ -53,6 +53,7 @@ using namespace BlackConfig; using namespace BlackMisc; using namespace BlackMisc::Aviation; +using namespace BlackMisc::Audio; using namespace BlackMisc::Network; using namespace BlackMisc::Simulation; using namespace BlackCore; @@ -95,8 +96,11 @@ namespace BlackGui connect(ui->tb_MappingWizard, &QToolButton::clicked, this, &CLoginComponent::mappingWizard); connect(&m_networkSetup, &CNetworkSetup::setupChanged, this, &CLoginComponent::reloadSetup, Qt::QueuedConnection); - ui->comp_FsdDetails->showEnableInfo(true); - ui->comp_FsdDetails->setFsdSetupEnabled(false); + ui->form_FsdDetails->showEnableInfo(true); + ui->form_FsdDetails->setFsdSetupEnabled(false); + + ui->form_Voice->showEnableInfo(true); + ui->form_Voice->setVoiceSetupEnabled(false); ui->lblp_AircraftCombinedType->setToolTips("ok", "wrong"); ui->lblp_AirlineIcao->setToolTips("ok", "wrong"); @@ -260,12 +264,18 @@ namespace BlackGui currentServer.setUser(user); // FSD setup, then override - if (ui->comp_FsdDetails->isFsdSetupEnabled()) + if (ui->form_FsdDetails->isFsdSetupEnabled()) { - const CFsdSetup fsd = ui->comp_FsdDetails->getValue(); + const CFsdSetup fsd = ui->form_FsdDetails->getValue(); currentServer.setFsdSetup(fsd); } + if (ui->form_Voice->isVoiceSetupEnabled()) + { + const CVoiceSetup voice = ui->form_Voice->getValue(); + currentServer.setVoiceSetup(voice); + } + ui->frp_CurrentServer->setServer(currentServer); sGui->getIContextOwnAircraft()->updateOwnAircraftPilot(currentServer.getUser()); @@ -273,6 +283,11 @@ namespace BlackGui ownAircraft = sGui->getIContextOwnAircraft()->getOwnAircraft(); // Login + if (sGui->getIContextAudio()) + { + sGui->getIContextAudio()->setVoiceSetup(currentServer.getVoiceSetup()); + } + msg = sGui->getIContextNetwork()->connectToNetwork(currentServer, mode); if (msg.isSuccess()) { diff --git a/src/blackgui/components/logincomponent.ui b/src/blackgui/components/logincomponent.ui index b07f6a7d2..c603bba37 100644 --- a/src/blackgui/components/logincomponent.ui +++ b/src/blackgui/components/logincomponent.ui @@ -89,7 +89,7 @@ QTabWidget::North - 0 + 2 @@ -241,17 +241,29 @@ 3 - - - QFrame::NoFrame - - - QFrame::Plain - - - 0 - - + + + + + + + Voice + + + + 3 + + + 6 + + + 3 + + + 3 + + + @@ -704,6 +716,24 @@ + + BlackGui::Editors::CServerForm + QFrame +
blackgui/editors/serverform.h
+ 1 +
+ + BlackGui::Editors::CFsdSetupForm + QFrame +
blackgui/editors/fsdsetupform.h
+ 1 +
+ + BlackGui::Editors::CVoiceSetupForm + QFrame +
blackgui/editors/voicesetupform.h
+ 1 +
BlackGui::Components::CModelMatcherLogEnable QFrame @@ -715,12 +745,6 @@ QLabel
blackgui/ticklabel.h
- - BlackGui::Editors::CFsdSetupForm - QFrame -
blackgui/editors/fsdsetupform.h
- 1 -
BlackGui::Components::CDbAircraftIcaoSelectorComponent QFrame @@ -738,12 +762,6 @@ QComboBox
blackgui/components/serverlistselector.h
- - BlackGui::Editors::CServerForm - QFrame -
blackgui/editors/serverform.h
- 1 -
BlackGui::CLoginModeButtons QFrame