MCPcopy Create free account
hub / github.com/ddnet/ddnet / UpdateMusicState

Method UpdateMusicState

src/game/client/components/menus.cpp:944–951  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

942}
943
944void CMenus::UpdateMusicState()
945{
946 const bool ShouldPlay = Client()->State() == IClient::STATE_OFFLINE && g_Config.m_SndEnable && g_Config.m_SndMusic;
947 if(ShouldPlay && !GameClient()->m_Sounds.IsPlaying(SOUND_MENU))
948 GameClient()->m_Sounds.Enqueue(CSounds::CHN_MUSIC, SOUND_MENU);
949 else if(!ShouldPlay && GameClient()->m_Sounds.IsPlaying(SOUND_MENU))
950 GameClient()->m_Sounds.Stop(SOUND_MENU);
951}
952
953void CMenus::PopupMessage(const char *pTitle, const char *pMessage, const char *pButtonLabel, int NextPopup, FPopupButtonCallback pfnButtonCallback)
954{

Callers 1

Calls 5

EnqueueMethod · 0.80
ClientFunction · 0.50
StateMethod · 0.45
IsPlayingMethod · 0.45
StopMethod · 0.45

Tested by

no test coverage detected