1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-20 07:30:26 +00:00

vr:: fixed the formula checking whether we are pointing at something in the UI

This commit is contained in:
Zeno Rogue 2021-03-07 21:37:16 +01:00
parent a25ca511c3
commit f853016cff

2
vr.cpp
View File

@ -395,7 +395,7 @@ void track_poses() {
px[1] /= -ui_size * ui_size_unit; px[1] /= -ui_size * ui_size_unit;
px[0] += (ui_xmin+ui_xmax) / 2; px[0] += (ui_xmin+ui_xmax) / 2;
px[1] += (ui_ymin+ui_ymax) / 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) { if(targeting_menu) {
mousex = px[0]; mousex = px[0];
mousey = px[1]; mousey = px[1];