mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-27 09:54:36 +02:00
ignore mouse button 4/5 when drawing, fixes #626
perhaps in the future we'll add a use to these
This commit is contained in:
@@ -1198,10 +1198,12 @@ void GameView::OnMouseDown(int x, int y, unsigned button)
|
|||||||
// update tool index, set new "last" tool so GameView can detect certain tools properly
|
// update tool index, set new "last" tool so GameView can detect certain tools properly
|
||||||
if (button == SDL_BUTTON_LEFT)
|
if (button == SDL_BUTTON_LEFT)
|
||||||
toolIndex = 0;
|
toolIndex = 0;
|
||||||
if (button == SDL_BUTTON_RIGHT)
|
else if (button == SDL_BUTTON_RIGHT)
|
||||||
toolIndex = 1;
|
toolIndex = 1;
|
||||||
if (button == SDL_BUTTON_MIDDLE)
|
else if (button == SDL_BUTTON_MIDDLE)
|
||||||
toolIndex = 2;
|
toolIndex = 2;
|
||||||
|
else
|
||||||
|
return;
|
||||||
Tool *lastTool = c->GetActiveTool(toolIndex);
|
Tool *lastTool = c->GetActiveTool(toolIndex);
|
||||||
c->SetLastTool(lastTool);
|
c->SetLastTool(lastTool);
|
||||||
UpdateDrawMode();
|
UpdateDrawMode();
|
||||||
|
Reference in New Issue
Block a user