mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-18 23:10:26 +00:00
vr:: fixed VR UI pointing if the rectangle is changed
This commit is contained in:
parent
ecb01118c1
commit
8ee918c7ee
4
vr.cpp
4
vr.cpp
@ -393,8 +393,8 @@ void track_poses() {
|
|||||||
hyperpoint px = pxo;
|
hyperpoint px = pxo;
|
||||||
px[0] /= ui_size * ui_size_unit;
|
px[0] /= ui_size * ui_size_unit;
|
||||||
px[1] /= -ui_size * ui_size_unit;
|
px[1] /= -ui_size * ui_size_unit;
|
||||||
px[0] += current_display->xsize/2;
|
px[0] += (ui_xmin+ui_xmax) / 2;
|
||||||
px[1] += current_display->ysize/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[1] <= vid.xres && px[1] <= vid.xres;
|
||||||
if(targeting_menu) {
|
if(targeting_menu) {
|
||||||
mousex = px[0];
|
mousex = px[0];
|
||||||
|
Loading…
Reference in New Issue
Block a user