mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Merge pull request #8211 from Robyt3/Menus-Demo-Hotkeys-Fix
Fix demo player hotkeys not working when menu is inactive, fix duplicated rendering of popup menus in demo player
This commit is contained in:
commit
c878cc70f4
|
@ -2176,10 +2176,15 @@ void CMenus::OnRender()
|
|||
if(!IsActive())
|
||||
{
|
||||
if(Ui()->ConsumeHotkey(CUi::HOTKEY_ESCAPE))
|
||||
{
|
||||
SetActive(true);
|
||||
Ui()->FinishCheck();
|
||||
Ui()->ClearHotkeys();
|
||||
return;
|
||||
}
|
||||
else if(Client()->State() != IClient::STATE_DEMOPLAYBACK)
|
||||
{
|
||||
Ui()->FinishCheck();
|
||||
Ui()->ClearHotkeys();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
UpdateColors();
|
||||
|
@ -2187,7 +2192,11 @@ void CMenus::OnRender()
|
|||
Ui()->Update();
|
||||
|
||||
Render();
|
||||
RenderTools()->RenderCursor(Ui()->MousePos(), 24.0f);
|
||||
|
||||
if(IsActive())
|
||||
{
|
||||
RenderTools()->RenderCursor(Ui()->MousePos(), 24.0f);
|
||||
}
|
||||
|
||||
// render debug information
|
||||
if(g_Config.m_Debug)
|
||||
|
|
|
@ -750,8 +750,6 @@ void CMenus::RenderDemoPlayer(CUIRect MainView)
|
|||
{
|
||||
RenderDemoPlayerSliceSavePopup(MainView);
|
||||
}
|
||||
|
||||
Ui()->RenderPopupMenus();
|
||||
}
|
||||
|
||||
void CMenus::RenderDemoPlayerSliceSavePopup(CUIRect MainView)
|
||||
|
|
Loading…
Reference in a new issue