Alt click alternative to middle clicking

This commit is contained in:
Simon Robertshaw 2012-08-24 19:15:22 +01:00
parent a8d4bdeb2d
commit 98da88e34f

View File

@ -1002,6 +1002,8 @@ void GameView::OnMouseMove(int x, int y, int dx, int dy)
void GameView::OnMouseDown(int x, int y, unsigned button) void GameView::OnMouseDown(int x, int y, unsigned button)
{ {
if(altBehaviour)
button = BUTTON_MIDDLE;
if(selectMode!=SelectNone) if(selectMode!=SelectNone)
{ {
if(button==BUTTON_LEFT) if(button==BUTTON_LEFT)
@ -1035,6 +1037,9 @@ void GameView::OnMouseDown(int x, int y, unsigned button)
void GameView::OnMouseUp(int x, int y, unsigned button) void GameView::OnMouseUp(int x, int y, unsigned button)
{ {
if(altBehaviour)
button = BUTTON_MIDDLE;
if(selectMode!=SelectNone) if(selectMode!=SelectNone)
{ {
if(button==BUTTON_LEFT) if(button==BUTTON_LEFT)