mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Hide "Allow unused" button when not using "DDNet" entities.
This commit is contained in:
parent
6fc27bea8c
commit
daa0609252
|
@ -280,15 +280,18 @@ CUI::EPopupMenuFunctionResult CEditor::PopupMenuSettings(void *pContext, CUIRect
|
|||
Selector.VSplitMid(&No, &Yes);
|
||||
|
||||
pEditor->UI()->DoLabel(&Label, "Allow unused", 10.0f, TEXTALIGN_ML);
|
||||
static int s_ButtonNo = 0;
|
||||
static int s_ButtonYes = 0;
|
||||
if(pEditor->DoButton_ButtonDec(&s_ButtonNo, "No", !pEditor->m_AllowPlaceUnusedTiles, &No, 0, "[ctrl+u] Disallow placing unused tiles"))
|
||||
if(pEditor->m_AllowPlaceUnusedTiles != -1)
|
||||
{
|
||||
pEditor->m_AllowPlaceUnusedTiles = false;
|
||||
}
|
||||
if(pEditor->DoButton_ButtonInc(&s_ButtonYes, "Yes", pEditor->m_AllowPlaceUnusedTiles, &Yes, 0, "[ctrl+u] Allow placing unused tiles"))
|
||||
{
|
||||
pEditor->m_AllowPlaceUnusedTiles = true;
|
||||
static int s_ButtonNo = 0;
|
||||
static int s_ButtonYes = 0;
|
||||
if(pEditor->DoButton_ButtonDec(&s_ButtonNo, "No", !pEditor->m_AllowPlaceUnusedTiles, &No, 0, "[ctrl+u] Disallow placing unused tiles"))
|
||||
{
|
||||
pEditor->m_AllowPlaceUnusedTiles = false;
|
||||
}
|
||||
if(pEditor->DoButton_ButtonInc(&s_ButtonYes, "Yes", pEditor->m_AllowPlaceUnusedTiles, &Yes, 0, "[ctrl+u] Allow placing unused tiles"))
|
||||
{
|
||||
pEditor->m_AllowPlaceUnusedTiles = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue