MCPcopy Create free account
hub / github.com/deathkiller/jazz2-native / SwitchToSectionDirect

Method SwitchToSectionDirect

Sources/Jazz2/UI/Menu/MainMenu.cpp:360–376  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

358 }
359
360 MenuSection* MainMenu::SwitchToSectionDirect(std::unique_ptr<MenuSection> section)
361 {
362 if (!_sections.empty()) {
363 auto& lastSection = _sections.back();
364 lastSection->OnHide();
365 }
366
367 auto& currentSection = _sections.emplace_back(std::move(section));
368 currentSection->OnShow(this);
369
370 if (_contentBounds != Recti::Empty) {
371 Recti clipRectangle = currentSection->GetClipRectangle(_contentBounds);
372 _upscalePass.SetClipRectangle(clipRectangle);
373 }
374
375 return currentSection.get();
376 }
377
378 void MainMenu::LeaveSection()
379 {

Callers

nothing calls this directly

Calls 8

OnHideMethod · 0.80
emplace_backMethod · 0.80
SetClipRectangleMethod · 0.80
emptyMethod · 0.45
backMethod · 0.45
OnShowMethod · 0.45
GetClipRectangleMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected