mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Fix demo player hotkeys not working when menu is inactive
The demo player needs to be rendered also when the menu is inactive, to handle the hotkeys for controlling the demo player and to render the play/pause and speed indicators. Closes #8208.
This commit is contained in:
parent
1b77cbc821
commit
717cbef375
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue