mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Merge pull request #7342 from Robyt3/Demo-Render-Slice-Disable
Disable demo slice button while demo is being rendered
This commit is contained in:
commit
c4a6955fb1
|
@ -678,10 +678,15 @@ void CMenus::RenderDemoPlayer(CUIRect MainView)
|
|||
GameClient()->m_Tooltips.DoToolTip(&s_SliceEndButton, &Button, Localize("Mark the end of a cut (right click to reset)"));
|
||||
|
||||
// slice save button
|
||||
#if defined(CONF_VIDEORECORDER)
|
||||
const bool SliceEnabled = IVideo::Current() == nullptr;
|
||||
#else
|
||||
const bool SliceEnabled = true;
|
||||
#endif
|
||||
ButtonBar.VSplitLeft(Margins, nullptr, &ButtonBar);
|
||||
ButtonBar.VSplitLeft(ButtonbarHeight, &Button, &ButtonBar);
|
||||
static CButtonContainer s_SliceSaveButton;
|
||||
if(DoButton_FontIcon(&s_SliceSaveButton, FONT_ICON_ARROW_UP_RIGHT_FROM_SQUARE, 0, &Button, IGraphics::CORNER_ALL))
|
||||
if(DoButton_FontIcon(&s_SliceSaveButton, FONT_ICON_ARROW_UP_RIGHT_FROM_SQUARE, 0, &Button, IGraphics::CORNER_ALL, SliceEnabled) && SliceEnabled)
|
||||
{
|
||||
char aDemoName[IO_MAX_PATH_LENGTH];
|
||||
DemoPlayer()->GetDemoName(aDemoName, sizeof(aDemoName));
|
||||
|
|
Loading…
Reference in a new issue