From 591d370ea4fa65300256a7484ef9e2fa3acb95cd Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Tue, 12 Jul 2022 14:41:54 +0200 Subject: [PATCH] centering menus is now configurable --- config.cpp | 3 +++ graph.cpp | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/config.cpp b/config.cpp index b0cf7439..456d800e 100644 --- a/config.cpp +++ b/config.cpp @@ -749,6 +749,8 @@ EX void initConfig() { param_i(menu_darkening, "menu_darkening", 2) -> editable(0, 8, 1, "menu map darkening", "A larger number means darker game map in the background. Set to 8 to disable the background.", 'd') -> set_sets([] { dialog::bound_low(0); dialog::bound_up(8); dialog::dialogflags |= sm::DARKEN; }); + param_b(centered_menus, "centered_menus", false) + -> editable("centered menus in widescreen", 'c'); param_b(startanims::enabled, "startanim", true) -> editable("start animations", 's'); @@ -1860,6 +1862,7 @@ EX void configureInterface() { }); add_edit(menu_darkening); + add_edit(centered_menus); add_edit(startanims::enabled); dialog::addBreak(50); diff --git a/graph.cpp b/graph.cpp index 0639c3dc..160e3254 100644 --- a/graph.cpp +++ b/graph.cpp @@ -5212,7 +5212,7 @@ EX void calcparam() { } else { bool ok = !vrhr::active(); - if(vid.xres > vid.yres * 4/3+16 && (cmode & sm::SIDE) && ok) + if(vid.xres > vid.yres * 4/3+16 && (cmode & sm::SIDE) && ok && !((cmode & sm::MAYDARK) && centered_menus)) current_display->sidescreen = true; #if CAP_TOUR if(tour::on && (tour::slides[tour::currentslide].flags & tour::SIDESCREEN) && ok) @@ -5324,6 +5324,7 @@ extern bool wclick; EX bool just_refreshing; EX int menu_darkening = 2; +EX bool centered_menus = false; EX void gamescreen() {