diff --git a/source/duke3d/src/menus.cpp b/source/duke3d/src/menus.cpp index 128742e95..c7b65a6ab 100644 --- a/source/duke3d/src/menus.cpp +++ b/source/duke3d/src/menus.cpp @@ -613,6 +613,7 @@ static MenuEntry_t ME_SCREENSETUP_CROSSHAIRSIZE = MAKE_MENUENTRY( s_Scale, &MF_R static int32_t vpsize; static MenuRangeInt32_t MEO_SCREENSETUP_SCREENSIZE = MAKE_MENURANGE( &vpsize, &MF_Redfont, 0, 0, 0, 1, EnforceIntervals ); +static MenuOption_t MEO_SCREENSETUP_SCREENSIZE_TWO = MAKE_MENUOPTION( &MF_Redfont, &MEOS_OffOn, &vpsize ); static MenuEntry_t ME_SCREENSETUP_SCREENSIZE = MAKE_MENUENTRY( "Status bar:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SCREENSETUP_SCREENSIZE, RangeInt32 ); static MenuRangeInt32_t MEO_SCREENSETUP_TEXTSIZE = MAKE_MENURANGE( &ud.textscale, &MF_Redfont, 100, 400, 0, 16, 2 ); static MenuEntry_t ME_SCREENSETUP_TEXTSIZE = MAKE_MENUENTRY( s_Scale, &MF_Redfont, &MEF_BigOptions_Apply, &MEO_SCREENSETUP_TEXTSIZE, RangeInt32 ); @@ -2046,7 +2047,17 @@ static void Menu_Pre(MenuID_t cm) !(ud.statusbarflags & STATUSBAR_NOFULL) + !(ud.statusbarflags & STATUSBAR_NOSHRINK) * 14; MEO_SCREENSETUP_SCREENSIZE.max = MEO_SCREENSETUP_SCREENSIZE.steps - 1; - MenuEntry_DisableOnCondition(&ME_SCREENSETUP_SCREENSIZE, (MEO_SCREENSETUP_SCREENSIZE.steps < 2)); + if (MEO_SCREENSETUP_SCREENSIZE.steps <= 2 && !(ud.statusbarflags & STATUSBAR_NONONE)) + { + ME_SCREENSETUP_SCREENSIZE.entry = &MEO_SCREENSETUP_SCREENSIZE_TWO; + ME_SCREENSETUP_SCREENSIZE.type = Option; + } + else + { + ME_SCREENSETUP_SCREENSIZE.entry = &MEO_SCREENSETUP_SCREENSIZE; + ME_SCREENSETUP_SCREENSIZE.type = RangeInt32; + } + MenuEntry_HideOnCondition(&ME_SCREENSETUP_SCREENSIZE, (MEO_SCREENSETUP_SCREENSIZE.steps < 2)); vpsize = !(ud.statusbarflags & STATUSBAR_NONONE) + (ud.screen_size >= 4 && !(ud.statusbarflags & STATUSBAR_NOMODERN)) + @@ -3342,6 +3353,8 @@ static int32_t Menu_EntryOptionModify(MenuEntry_t *entry, int32_t newOption) break; } } + else if (entry == &ME_SCREENSETUP_SCREENSIZE) + G_SetViewportShrink((newOption - vpsize) * 4); else if (entry == &ME_SOUND) { if (newOption == 0)