| 179 | } |
| 180 | |
| 181 | void OptionsMenu::syncGuiToConf() { |
| 182 | m_instrumentSlider->setVal(m_localChanges.get("instrumentVol").toInt(), false); |
| 183 | m_instrumentLabel->setText(toString(m_instrumentSlider->val())); |
| 184 | |
| 185 | m_sfxSlider->setVal(m_localChanges.get("sfxVol").toInt(), false); |
| 186 | m_sfxLabel->setText(toString(m_sfxSlider->val())); |
| 187 | |
| 188 | m_musicSlider->setVal(m_localChanges.get("musicVol").toInt(), false); |
| 189 | m_musicLabel->setText(toString(m_musicSlider->val())); |
| 190 | |
| 191 | m_tutorialMessagesButton->setChecked(m_localChanges.get("tutorialMessages").toBool()); |
| 192 | m_clientIPJoinableButton->setChecked(m_localChanges.get("clientIPJoinable").toBool()); |
| 193 | m_clientP2PJoinableButton->setChecked(m_localChanges.get("clientP2PJoinable").toBool()); |
| 194 | m_allowAssetsMismatchButton->setChecked(m_localChanges.get("allowAssetsMismatch").toBool()); |
| 195 | m_headRotationButton->setChecked(m_localChanges.get("humanoidHeadRotation").optBool().value(true)); |
| 196 | |
| 197 | auto appController = GuiContext::singleton().applicationController(); |
| 198 | if (!appController->p2pNetworkingService()) { |
| 199 | m_p2pJoinableLabel->setColor(Color::DarkGray); |
| 200 | m_clientP2PJoinableButton->setEnabled(false); |
| 201 | m_clientP2PJoinableButton->setChecked(false); |
| 202 | } |
| 203 | } |
| 204 | |
| 205 | void OptionsMenu::displayControls() { |
| 206 | m_paneManager->displayPane(PaneLayer::ModalWindow, m_keybindingsMenu); |
nothing calls this directly
no test coverage detected