diff options
author | epoch <epoch@hacking.allowed.org> | 2020-08-16 16:44:48 -0500 |
---|---|---|
committer | epoch <epoch@hacking.allowed.org> | 2020-08-16 16:44:48 -0500 |
commit | 2a5c038b9ffc03fe49f0c29585ec333df7ff8907 (patch) | |
tree | 2baecc987577c3bea6c090f18c5361d1055acb04 /src | |
parent | 3f85bff904cfeccd704b014fee8a4ee33982fdd7 (diff) | |
download | hackvr-2a5c038b9ffc03fe49f0c29585ec333df7ff8907.tar.gz hackvr-2a5c038b9ffc03fe49f0c29585ec333df7ff8907.zip |
used a defined constant instead of a magic constant. also put an idea in a comment for middle-drag to move camera instead of just rotate. dunno
Diffstat (limited to 'src')
-rw-r--r-- | src/mouse_x11.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/mouse_x11.c b/src/mouse_x11.c index 623dd68..78926f9 100644 --- a/src/mouse_x11.c +++ b/src/mouse_x11.c @@ -99,11 +99,18 @@ int mouse_event_handler() {//this returns HVM_ key + for buttondown and - for bu //this /was/ using a 2 for the mousemap index... so 2 is "right" in hackvr. if(gra_global.mousemap[MOUSE_SECONDARY] == 1) {//if "right" click is held down gr=get_group_relative(global.user); - gr->r.x.d=gra_global.oldcamera.x.d + (gra_global.mouse.y - gra_global.dragstart[2].y); - gr->r.y.d=gra_global.oldcamera.y.d + (gra_global.mouse.x - gra_global.dragstart[2].x); + gr->r.x.d=gra_global.oldcamera.x.d + (gra_global.mouse.y - gra_global.dragstart[MOUSE_SECONDARY].y); + gr->r.y.d=gra_global.oldcamera.y.d + (gra_global.mouse.x - gra_global.dragstart[MOUSE_SECONDARY].x); //global.camera.r.x.d=gra_global.oldcamera.x.d + (gra_global.mouse.y - gra_global.dragstart[2].y); //global.camera.r.y.d=gra_global.oldcamera.y.d + (gra_global.mouse.x - gra_global.dragstart[2].x); } + /* dunno if I really want to do this. + if(gra_global.mousemap[MOUSE_TERTIARY] == 1) {//if we're holding down middle-click + //need to move forward or sideways based on + gr->r.x = gra_global.oldcmaera.gra_global.dragstart[MOUSE_TERTIARY].x// + gr->r.y = // + gr->r.z = // + }*/ //do we need to redraw on mouse movement? //probably. redrawplzkthx=1; |