conworlds

diff src/main.cc @ 3:a797e426e309

minor changes
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 19 Aug 2014 11:01:04 +0300
parents 879194e4b1f0
children 3c36bc28c6c2
line diff
     1.1 --- a/src/main.cc	Fri Apr 25 05:44:09 2014 +0300
     1.2 +++ b/src/main.cc	Tue Aug 19 11:01:04 2014 +0300
     1.3 @@ -89,7 +89,22 @@
     1.4  
     1.5  static void mouse(int bn, int st, int x, int y)
     1.6  {
     1.7 -	game_mouse(bn - GLUT_LEFT_BUTTON, st == GLUT_DOWN, x, y);
     1.8 +	switch(bn) {
     1.9 +	case GLUT_RIGHT_BUTTON + 1:
    1.10 +		if(st == GLUT_DOWN) {
    1.11 +			game_mwheel(1);
    1.12 +		}
    1.13 +		break;
    1.14 +
    1.15 +	case GLUT_RIGHT_BUTTON + 2:
    1.16 +		if(st == GLUT_DOWN) {
    1.17 +			game_mwheel(-1);
    1.18 +		}
    1.19 +		break;
    1.20 +
    1.21 +	default:
    1.22 +		game_mouse(bn - GLUT_LEFT_BUTTON, st == GLUT_DOWN, x, y);
    1.23 +	}
    1.24  }
    1.25  
    1.26  static void motion(int x, int y)