| 284 | } |
| 285 | |
| 286 | MenuSection* InGameMenu::SwitchToSectionDirect(std::unique_ptr<MenuSection> section) |
| 287 | { |
| 288 | if (!_sections.empty()) { |
| 289 | auto& lastSection = _sections.back(); |
| 290 | lastSection->OnHide(); |
| 291 | } |
| 292 | |
| 293 | auto& currentSection = _sections.emplace_back(std::move(section)); |
| 294 | currentSection->OnShow(this); |
| 295 | |
| 296 | if (_contentBounds != Recti::Empty) { |
| 297 | Recti clipRectangle = currentSection->GetClipRectangle(_contentBounds); |
| 298 | _root->_upscalePass.SetClipRectangle(clipRectangle); |
| 299 | } |
| 300 | |
| 301 | return currentSection.get(); |
| 302 | } |
| 303 | |
| 304 | void InGameMenu::LeaveSection() |
| 305 | { |
nothing calls this directly
no test coverage detected