fix not being able to draw tool lines or boxes, but you can still press ctrl+shift before clicking to use 10x strength
This commit is contained in:
parent
69407a2b57
commit
875ca75b07
@ -1282,13 +1282,15 @@ void GameView::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool
|
|||||||
drawModeReset = false;
|
drawModeReset = false;
|
||||||
else
|
else
|
||||||
drawPoint1 = currentMouse;
|
drawPoint1 = currentMouse;
|
||||||
if (!toolBrush)
|
|
||||||
{
|
|
||||||
if(shift)
|
if(shift)
|
||||||
|
{
|
||||||
|
if (!toolBrush)
|
||||||
drawMode = DrawFill;
|
drawMode = DrawFill;
|
||||||
else
|
else
|
||||||
drawMode = DrawRect;
|
drawMode = DrawPoints;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
drawMode = DrawRect;
|
||||||
}
|
}
|
||||||
enableCtrlBehaviour();
|
enableCtrlBehaviour();
|
||||||
break;
|
break;
|
||||||
@ -1299,13 +1301,15 @@ void GameView::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool
|
|||||||
drawModeReset = false;
|
drawModeReset = false;
|
||||||
else
|
else
|
||||||
drawPoint1 = currentMouse;
|
drawPoint1 = currentMouse;
|
||||||
if (!toolBrush)
|
|
||||||
{
|
|
||||||
if(ctrl)
|
if(ctrl)
|
||||||
|
{
|
||||||
|
if (!toolBrush)
|
||||||
drawMode = DrawFill;
|
drawMode = DrawFill;
|
||||||
else
|
else
|
||||||
drawMode = DrawLine;
|
drawMode = DrawPoints;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
drawMode = DrawLine;
|
||||||
}
|
}
|
||||||
enableShiftBehaviour();
|
enableShiftBehaviour();
|
||||||
break;
|
break;
|
||||||
@ -1766,6 +1770,7 @@ void GameView::enableShiftBehaviour()
|
|||||||
if(!shiftBehaviour)
|
if(!shiftBehaviour)
|
||||||
{
|
{
|
||||||
shiftBehaviour = true;
|
shiftBehaviour = true;
|
||||||
|
if(isMouseDown || (toolBrush && drawMode == DrawPoints))
|
||||||
c->SetToolStrength(10.0f);
|
c->SetToolStrength(10.0f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1811,12 +1816,15 @@ void GameView::enableCtrlBehaviour()
|
|||||||
searchButton->Appearance.TextInactive = searchButton->Appearance.TextHover = ui::Colour(0, 0, 0);
|
searchButton->Appearance.TextInactive = searchButton->Appearance.TextHover = ui::Colour(0, 0, 0);
|
||||||
if (currentSaveType == 2)
|
if (currentSaveType == 2)
|
||||||
((SplitButton*)saveSimulationButton)->SetShowSplit(true);
|
((SplitButton*)saveSimulationButton)->SetShowSplit(true);
|
||||||
|
if(isMouseDown || (toolBrush && drawMode == DrawPoints))
|
||||||
|
{
|
||||||
if(!shiftBehaviour)
|
if(!shiftBehaviour)
|
||||||
c->SetToolStrength(.1f);
|
c->SetToolStrength(.1f);
|
||||||
else
|
else
|
||||||
c->SetToolStrength(10.0f);
|
c->SetToolStrength(10.0f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void GameView::disableCtrlBehaviour()
|
void GameView::disableCtrlBehaviour()
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user