mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-24 01:00:25 +00:00
vr:: fixed the formula checking whether we are pointing at something in the UI
This commit is contained in:
parent
a25ca511c3
commit
f853016cff
2
vr.cpp
2
vr.cpp
@ -395,7 +395,7 @@ void track_poses() {
|
||||
px[1] /= -ui_size * ui_size_unit;
|
||||
px[0] += (ui_xmin+ui_xmax) / 2;
|
||||
px[1] += (ui_ymin+ui_ymax) / 2;
|
||||
targeting_menu = px[0] >= 0 && px[1] >= 0 && px[1] <= vid.xres && px[1] <= vid.xres;
|
||||
targeting_menu = px[0] >= 0 && px[1] >= 0 && px[0] <= vid.xres && px[1] <= vid.yres;
|
||||
if(targeting_menu) {
|
||||
mousex = px[0];
|
||||
mousey = px[1];
|
||||
|
Loading…
Reference in New Issue
Block a user