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

Method SwitchToSectionDirect

Sources/Jazz2/UI/Menu/InGameMenu.cpp:286–302  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

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