1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-18 23:10:26 +00:00

vr:: refactored vr_enable_button

This commit is contained in:
Zeno Rogue 2022-05-06 19:52:17 +02:00
parent da3584a89d
commit 3f0dc27140

21
vr.cpp
View File

@ -1299,15 +1299,7 @@ EX void show_vr_demos() {
dialog::display();
}
EX void show_vr_settings() {
cmode = sm::SIDE | sm::MAYDARK;
gamescreen(0);
dialog::init(XLAT("VR settings"));
dialog::addItem(XLAT("VR demos"), 'D');
dialog::add_action_push(show_vr_demos);
EX void vr_enable_button() {
dialog::addBoolItem(XLAT("VR enabled"), enabled, 'o');
dialog::add_action([] {
enabled = !enabled;
@ -1318,6 +1310,17 @@ EX void show_vr_settings() {
dialog::addInfo(XLAT("error: ") + error_msg, 0xC00000);
else
dialog::addInfo(XLAT("VR initialized correctly"), 0x00C000);
}
EX void show_vr_settings() {
cmode = sm::SIDE | sm::MAYDARK;
gamescreen(0);
dialog::init(XLAT("VR settings"));
dialog::addItem(XLAT("VR demos"), 'D');
dialog::add_action_push(show_vr_demos);
vr_enable_button();
dialog::addBreak(100);