mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Right click: Don't remove selection of layers
This commit is contained in:
parent
581de44580
commit
02f6e7081a
|
@ -3443,18 +3443,21 @@ void CEditor::RenderLayers(CUIRect ToolBox, CUIRect View)
|
|||
if(int Result = DoButton_Ex(m_Map.m_lGroups[g]->m_lLayers[i], aBuf, Checked, &Button,
|
||||
BUTTON_CONTEXT, "Select layer. Shift click to select multiple.", CUI::CORNER_R, FontSize))
|
||||
{
|
||||
if(Result == 1 && (Input()->KeyIsPressed(KEY_LSHIFT) || Input()->KeyIsPressed(KEY_RSHIFT)) && m_SelectedGroup == g)
|
||||
{
|
||||
if(!m_lSelectedLayers.remove(i))
|
||||
m_lSelectedLayers.add(i);
|
||||
}
|
||||
else if(!(Input()->KeyIsPressed(KEY_LSHIFT) || Input()->KeyIsPressed(KEY_RSHIFT)))
|
||||
{
|
||||
m_SelectedGroup = g;
|
||||
SelectLayer(i);
|
||||
}
|
||||
static CLayerPopupContext s_LayerPopupContext = {};
|
||||
if(Result == 2)
|
||||
if(Result == 1)
|
||||
{
|
||||
if((Input()->KeyIsPressed(KEY_LSHIFT) || Input()->KeyIsPressed(KEY_RSHIFT)) && m_SelectedGroup == g)
|
||||
{
|
||||
if(!m_lSelectedLayers.remove(i))
|
||||
m_lSelectedLayers.add(i);
|
||||
}
|
||||
else if(!(Input()->KeyIsPressed(KEY_LSHIFT) || Input()->KeyIsPressed(KEY_RSHIFT)))
|
||||
{
|
||||
m_SelectedGroup = g;
|
||||
SelectLayer(i);
|
||||
}
|
||||
}
|
||||
else if(Result == 2)
|
||||
{
|
||||
if(m_lSelectedLayers.size() > 1)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue