From 0081fa839d73e5080db19da0cd2efdc8303ae78c Mon Sep 17 00:00:00 2001 From: toasterbabe Date: Sat, 29 Apr 2017 16:40:07 +0100 Subject: [PATCH] Search box is now standardised in style, and the menu is jiggered around a little bit for cleanness! https://cdn.discordapp.com/attachments/293238104096112641/310143962440794114/srb20006.png --- src/m_menu.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/m_menu.c b/src/m_menu.c index 97234f199..7e2574669 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -1454,7 +1454,7 @@ menu_t MISC_AddonsDef = &MainDef, MISC_AddonsMenu, M_DrawAddons, - 48, 36, + 50, 28, 0, NULL }; @@ -4620,15 +4620,14 @@ static void M_DrawAddons(void) M_DrawLevelPlatterHeader(y - 16, M_AddonsHeaderPath(), true); - V_DrawString(0, 0, V_ALLOWLOWERCASE, menusearch+1); - +#define numaddonsshown 5 // get bottom... - max = dir_on[menudepthleft] + 5; + max = dir_on[menudepthleft] + numaddonsshown; if (max > (ssize_t)sizedirmenu) max = sizedirmenu; // then top... - i = max - 9; + i = max - (2*numaddonsshown - 1); // then adjust! if (i < 0) @@ -4637,6 +4636,7 @@ static void M_DrawAddons(void) max = sizedirmenu; i = 0; } +#undef numaddonsshown if (i != 0) V_DrawCharacter(19, y+4, '\x1A', false); @@ -4673,6 +4673,15 @@ static void M_DrawAddons(void) if (max != (ssize_t)sizedirmenu) V_DrawCharacter(19, y-12, '\x1B', false); + + y = BASEVIDHEIGHT - currentMenu->y; + + V_DrawSmallScaledPatch(x-(26 + 16), y + 4, 0, addonsp[EXT_SEARCH]); + M_DrawTextBox(x - 26, y, MAXSTRINGLENGTH, 1); + V_DrawString(x - 18, y + 8, V_ALLOWLOWERCASE, menusearch+1); + if (skullAnimCounter < 4) + V_DrawCharacter(x - 18 + V_StringWidth(menusearch+1, 0), y + 8, + '_' | 0x80, false); } static void M_AddonExec(INT32 ch)