Merge pull request #8029 from Robyt3/Menus-RenderPopupFullscreen-Function

Extract `CMenus::RenderPopupFullscreen` function
This commit is contained in:
heinrich5991 2024-02-28 22:39:29 +00:00 committed by GitHub
commit 9620a9d3d9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 700 additions and 694 deletions

View file

@ -1157,6 +1157,20 @@ void CMenus::Render()
} }
} }
else else
{
RenderPopupFullscreen(Screen);
}
UI()->RenderPopupMenus();
// Handle this escape hotkey after popup menus
if(!m_ShowStart && Client()->State() == IClient::STATE_OFFLINE && UI()->ConsumeHotkey(CUI::HOTKEY_ESCAPE))
{
m_ShowStart = true;
}
}
void CMenus::RenderPopupFullscreen(CUIRect Screen)
{ {
char aBuf[1536]; char aBuf[1536];
const char *pTitle = ""; const char *pTitle = "";
@ -1854,15 +1868,6 @@ void CMenus::Render()
UI()->SetActiveItem(nullptr); UI()->SetActiveItem(nullptr);
} }
UI()->RenderPopupMenus();
// Handle this escape hotkey after popup menus
if(!m_ShowStart && Client()->State() == IClient::STATE_OFFLINE && UI()->ConsumeHotkey(CUI::HOTKEY_ESCAPE))
{
m_ShowStart = true;
}
}
#if defined(CONF_VIDEORECORDER) #if defined(CONF_VIDEORECORDER)
void CMenus::PopupConfirmDemoReplaceVideo() void CMenus::PopupConfirmDemoReplaceVideo()
{ {

View file

@ -420,6 +420,7 @@ protected:
// found in menus.cpp // found in menus.cpp
void Render(); void Render();
void RenderPopupFullscreen(CUIRect Screen);
#if defined(CONF_VIDEORECORDER) #if defined(CONF_VIDEORECORDER)
void PopupConfirmDemoReplaceVideo(); void PopupConfirmDemoReplaceVideo();
#endif #endif