MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / syncGuiToConf

Method syncGuiToConf

source/frontend/StarOptionsMenu.cpp:181–203  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

179}
180
181void 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
205void OptionsMenu::displayControls() {
206 m_paneManager->displayPane(PaneLayer::ModalWindow, m_keybindingsMenu);

Callers

nothing calls this directly

Calls 14

toStringFunction · 0.85
singletonClass · 0.85
setValMethod · 0.80
toIntMethod · 0.80
valMethod · 0.80
setCheckedMethod · 0.80
toBoolMethod · 0.80
optBoolMethod · 0.80
getMethod · 0.45
setTextMethod · 0.45
valueMethod · 0.45
p2pNetworkingServiceMethod · 0.45

Tested by

no test coverage detected