mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-15 11:45:48 +00:00
vr:: better quickkeys for model viewing
This commit is contained in:
parent
38653fdc00
commit
f63d06b648
46
vr.cpp
46
vr.cpp
@ -1658,18 +1658,40 @@ auto hookvr = addHook(vr_quickmenu_extensions, 100, [] {
|
|||||||
dialog::add_action([] { camera_speed /= 1.2; println(hlog, "camera_speed = ", camera_speed); });
|
dialog::add_action([] { camera_speed /= 1.2; println(hlog, "camera_speed = ", camera_speed); });
|
||||||
#if CAP_VR
|
#if CAP_VR
|
||||||
if(vr::active()) {
|
if(vr::active()) {
|
||||||
dialog::addSelItem(XLAT("increase absolute unit"), 'a', fts(vrhr::absolute_unit_in_meters));
|
if(in_perspective()) {
|
||||||
dialog::add_action([] {
|
dialog::addSelItem(XLAT("increase absolute unit"), 'a', fts(vrhr::absolute_unit_in_meters));
|
||||||
vrhr::absolute_unit_in_meters *= 1.2;
|
dialog::add_action([] {
|
||||||
walking::eye_level *= 1.2;
|
vrhr::absolute_unit_in_meters *= 1.2;
|
||||||
println(hlog, "vr absolute unit set to ", vrhr::absolute_unit_in_meters);
|
walking::eye_level *= 1.2;
|
||||||
});
|
println(hlog, "vr absolute unit set to ", vrhr::absolute_unit_in_meters);
|
||||||
dialog::addSelItem(XLAT("increase absolute unit"), 'z', fts(vrhr::absolute_unit_in_meters));
|
});
|
||||||
dialog::add_action([] {
|
dialog::addSelItem(XLAT("decrease absolute unit"), 'z', fts(vrhr::absolute_unit_in_meters));
|
||||||
vrhr::absolute_unit_in_meters /= 1.2;
|
dialog::add_action([] {
|
||||||
walking::eye_level /= 1.2;
|
vrhr::absolute_unit_in_meters /= 1.2;
|
||||||
println(hlog, "vr absolute unit set to ", vrhr::absolute_unit_in_meters);
|
walking::eye_level /= 1.2;
|
||||||
});
|
println(hlog, "vr absolute unit set to ", vrhr::absolute_unit_in_meters);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
dialog::addSelItem(XLAT("increase model size"), 'a', fts(pconf.vr_scale_factor));
|
||||||
|
dialog::add_action([] {
|
||||||
|
pconf.vr_scale_factor *= 1.2;
|
||||||
|
println(hlog, "vr scale factor set to ", pconf.vr_scale_factor);
|
||||||
|
});
|
||||||
|
dialog::addSelItem(XLAT("decrease model size"), 'z', fts(pconf.vr_scale_factor));
|
||||||
|
dialog::add_action([] {
|
||||||
|
pconf.vr_scale_factor *= 1.2;
|
||||||
|
println(hlog, "vr scale factor set to ", pconf.vr_scale_factor);
|
||||||
|
});
|
||||||
|
dialog::addBoolItem(XLAT("increase Z-shift"), 'c', fts(pconf.vr_zshift));
|
||||||
|
dialog::add_action([] {
|
||||||
|
pconf.vr_zshift += 0.5;
|
||||||
|
});
|
||||||
|
dialog::addBoolItem(XLAT("decrease Z-shift"), 'd', fts(pconf.vr_zshift));
|
||||||
|
dialog::add_action([] {
|
||||||
|
pconf.vr_zshift -= 0.5;
|
||||||
|
});
|
||||||
|
}
|
||||||
dialog::addBoolItem(XLAT("always show HUD"), 'x', always_show_hud);
|
dialog::addBoolItem(XLAT("always show HUD"), 'x', always_show_hud);
|
||||||
dialog::add_action([] {
|
dialog::add_action([] {
|
||||||
always_show_hud = !always_show_hud;
|
always_show_hud = !always_show_hud;
|
||||||
|
Loading…
Reference in New Issue
Block a user