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

@ -1158,6 +1158,20 @@ void CMenus::Render()
}
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];
const char *pTitle = "";
const char *pExtraText = "";
@ -1852,15 +1866,6 @@ void CMenus::Render()
if(m_Popup == POPUP_NONE)
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)

View file

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