1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-19 07:20:25 +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(); dialog::display();
} }
EX void show_vr_settings() { EX void vr_enable_button() {
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);
dialog::addBoolItem(XLAT("VR enabled"), enabled, 'o'); dialog::addBoolItem(XLAT("VR enabled"), enabled, 'o');
dialog::add_action([] { dialog::add_action([] {
enabled = !enabled; enabled = !enabled;
@ -1318,6 +1310,17 @@ EX void show_vr_settings() {
dialog::addInfo(XLAT("error: ") + error_msg, 0xC00000); dialog::addInfo(XLAT("error: ") + error_msg, 0xC00000);
else else
dialog::addInfo(XLAT("VR initialized correctly"), 0x00C000); 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); dialog::addBreak(100);