mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
check if quadpoint is selected and not if quad is selected
fixes #7199 (partially?)
This commit is contained in:
parent
e8a657fcae
commit
3f21597b6c
|
@ -1257,20 +1257,20 @@ CUI::EPopupMenuFunctionResult CEditor::PopupPoint(void *pContext, CUIRect View,
|
||||||
if(Prop == PROP_POS_X)
|
if(Prop == PROP_POS_X)
|
||||||
{
|
{
|
||||||
for(int v = 0; v < 4; v++)
|
for(int v = 0; v < 4; v++)
|
||||||
if(pEditor->IsQuadSelected(v))
|
if(pEditor->IsQuadPointSelected(v))
|
||||||
pQuad->m_aPoints[v].x = i2fx(fx2i(pQuad->m_aPoints[v].x) + NewVal - X);
|
pQuad->m_aPoints[v].x = i2fx(fx2i(pQuad->m_aPoints[v].x) + NewVal - X);
|
||||||
}
|
}
|
||||||
else if(Prop == PROP_POS_Y)
|
else if(Prop == PROP_POS_Y)
|
||||||
{
|
{
|
||||||
for(int v = 0; v < 4; v++)
|
for(int v = 0; v < 4; v++)
|
||||||
if(pEditor->IsQuadSelected(v))
|
if(pEditor->IsQuadPointSelected(v))
|
||||||
pQuad->m_aPoints[v].y = i2fx(fx2i(pQuad->m_aPoints[v].y) + NewVal - Y);
|
pQuad->m_aPoints[v].y = i2fx(fx2i(pQuad->m_aPoints[v].y) + NewVal - Y);
|
||||||
}
|
}
|
||||||
else if(Prop == PROP_COLOR)
|
else if(Prop == PROP_COLOR)
|
||||||
{
|
{
|
||||||
for(int v = 0; v < 4; v++)
|
for(int v = 0; v < 4; v++)
|
||||||
{
|
{
|
||||||
if(pEditor->IsQuadSelected(v))
|
if(pEditor->IsQuadPointSelected(v))
|
||||||
{
|
{
|
||||||
pQuad->m_aColors[v].r = (NewVal >> 24) & 0xff;
|
pQuad->m_aColors[v].r = (NewVal >> 24) & 0xff;
|
||||||
pQuad->m_aColors[v].g = (NewVal >> 16) & 0xff;
|
pQuad->m_aColors[v].g = (NewVal >> 16) & 0xff;
|
||||||
|
@ -1282,13 +1282,13 @@ CUI::EPopupMenuFunctionResult CEditor::PopupPoint(void *pContext, CUIRect View,
|
||||||
else if(Prop == PROP_TEX_U)
|
else if(Prop == PROP_TEX_U)
|
||||||
{
|
{
|
||||||
for(int v = 0; v < 4; v++)
|
for(int v = 0; v < 4; v++)
|
||||||
if(pEditor->IsQuadSelected(v))
|
if(pEditor->IsQuadPointSelected(v))
|
||||||
pQuad->m_aTexcoords[v].x = f2fx(fx2f(pQuad->m_aTexcoords[v].x) + (NewVal - TextureU) / 1024.0f);
|
pQuad->m_aTexcoords[v].x = f2fx(fx2f(pQuad->m_aTexcoords[v].x) + (NewVal - TextureU) / 1024.0f);
|
||||||
}
|
}
|
||||||
else if(Prop == PROP_TEX_V)
|
else if(Prop == PROP_TEX_V)
|
||||||
{
|
{
|
||||||
for(int v = 0; v < 4; v++)
|
for(int v = 0; v < 4; v++)
|
||||||
if(pEditor->IsQuadSelected(v))
|
if(pEditor->IsQuadPointSelected(v))
|
||||||
pQuad->m_aTexcoords[v].y = f2fx(fx2f(pQuad->m_aTexcoords[v].y) + (NewVal - TextureV) / 1024.0f);
|
pQuad->m_aTexcoords[v].y = f2fx(fx2f(pQuad->m_aTexcoords[v].y) + (NewVal - TextureV) / 1024.0f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue