| 130 | } |
| 131 | |
| 132 | void PauseSection::ExecuteSelected() |
| 133 | { |
| 134 | switch (_items[_selectedIndex].Type) { |
| 135 | case Item::Resume: { |
| 136 | _root->PlaySfx("MenuSelect"_s, 0.6f); |
| 137 | if (auto inGameMenu = runtime_cast<InGameMenu>(_root)) { |
| 138 | inGameMenu->ResumeGame(); |
| 139 | } |
| 140 | break; |
| 141 | } |
| 142 | #if defined(WITH_MULTIPLAYER) |
| 143 | case Item::Spectate: { |
| 144 | _root->PlaySfx("MenuSelect"_s, 0.6f); |
| 145 | if (auto inGameMenu = runtime_cast<InGameMenu>(_root)) { |
| 146 | inGameMenu->ToggleSpectate(); |
| 147 | } |
| 148 | break; |
| 149 | } |
| 150 | #endif |
| 151 | case Item::Options: { |
| 152 | _root->PlaySfx("MenuSelect"_s, 0.6f); |
| 153 | _root->SwitchToSection<OptionsSection>(); |
| 154 | break; |
| 155 | } |
| 156 | case Item::Exit: { |
| 157 | _root->PlaySfx("MenuSelect"_s, 0.6f); |
| 158 | if (auto inGameMenu = runtime_cast<InGameMenu>(_root)) { |
| 159 | inGameMenu->GoToMainMenu(); |
| 160 | } |
| 161 | break; |
| 162 | } |
| 163 | } |
| 164 | } |
| 165 | } |
nothing calls this directly
no test coverage detected