1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-20 23:50:27 +00:00

vr:: warning and auto-change when using incorrect headset modes in 2D geometries

This commit is contained in:
Zeno Rogue 2021-02-06 23:14:35 +01:00
parent 55faf74d38
commit 7c5691a131

13
vr.cpp
View File

@ -1247,7 +1247,12 @@ EX void show_vr_settings() {
dialog::add_action_push(show_vr_demos); dialog::add_action_push(show_vr_demos);
dialog::addBoolItem_action(XLAT("VR enabled"), enabled, 'o'); dialog::addBoolItem(XLAT("VR enabled"), enabled, 'o');
dialog::add_action([] {
enabled = !enabled;
if(enabled && GDIM == 2 && among(hsm, eHeadset::holonomy, eHeadset::reference))
hsm = eHeadset::model_viewing;
});
if(!enabled) if(!enabled)
dialog::addBreak(100); dialog::addBreak(100);
else if(failed) else if(failed)
@ -1257,7 +1262,11 @@ EX void show_vr_settings() {
dialog::addBreak(100); dialog::addBreak(100);
add_edit(hsm); add_edit(eyes); add_edit(cscr); add_edit(hsm);
if(enabled && GDIM == 2 && among(hsm, eHeadset::holonomy, eHeadset::reference))
dialog::addInfo("(this setting is for 3D geometries only, use 'model viewing' instead)");
add_edit(eyes);
add_edit(cscr);
dialog::addSelItem(XLAT("absolute unit in meters"), fts(absolute_unit_in_meters), 'a'); dialog::addSelItem(XLAT("absolute unit in meters"), fts(absolute_unit_in_meters), 'a');
dialog::add_action([] { dialog::add_action([] {