MCPcopy Create free account
hub / github.com/Lovrom8/RSMods / HandleMenuFeatures

Function HandleMenuFeatures

DLL/ModManager.cpp:409–433  ·  view source on GitHub ↗

Handles menu-specific features like Guitar Speak and song previews.

Source from the content-addressed store, hash-verified

407 /// Handles menu-specific features like Guitar Speak and song previews.
408 /// </summary>
409 void HandleMenuFeatures(GameLoopState& state) {
410 if (!state.guitarSpeakPresent && Settings::ReturnSettingValue("GuitarSpeak") == "on") {
411 state.guitarSpeakPresent = true;
412 if (!GuitarSpeak::RunGuitarSpeak()) { // If we are in a menu where we don't want to read bad values
413 state.guitarSpeakPresent = false;
414 }
415 }
416
417 if (Settings::ReturnSettingValue("SongPreviews") == "on") {
418 if (!VolumeControl::disabledSongPreviewAudio) {
419 VolumeControl::DisableSongPreviewAudio();
420 }
421 }
422 else if (VolumeControl::disabledSongPreviewAudio) { // User originally wanted song previews off, but now wants them on.
423 VolumeControl::EnableSongPreviewAudio();
424 }
425
426 if (Settings::ReturnSettingValue("ScreenShotScores") == "on" &&
427 GameState::Menus::IsInScoreMenus()) {
428 Keyboard::TakeScreenshot();
429 }
430 else {
431 Keyboard::takenScreenshotOfThisScreen = false;
432 }
433 }
434
435 /// <summary>
436 /// Resets the headstock texture cache when appropriate.

Callers 1

HandleInMenuStateFunction · 0.85

Calls 2

IsInScoreMenusFunction · 0.85
TakeScreenshotFunction · 0.85

Tested by

no test coverage detected