From 45b039a3e5e0bf4fe19ff7d2aa1ba80032ae6340 Mon Sep 17 00:00:00 2001 From: Andrei Drexler Date: Wed, 27 Dec 2023 10:20:15 +0100 Subject: [PATCH] Add minimum options menu height This fixes the layout for menus with a smaller number of items, such as the new Gyro options menu, for which the title graphic would be rendered below the usual position --- Quake/menu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Quake/menu.c b/Quake/menu.c index d96bd93f9..d82f28ca3 100644 --- a/Quake/menu.c +++ b/Quake/menu.c @@ -3346,6 +3346,9 @@ static void M_Options_UpdateLayout (void) optionsmenu.yofs = 0; height = OPTIONS_LISTOFS + optionsmenu.yofs + optionsmenu.list.numitems * 8; + // Enforce a minimum height, so that if the number of items is relatively small + // the title pic doesn't get drawn below its usual position + height = q_max (height, 192); if (height <= m_height) { optionsmenu.y = (m_top + (m_height - height) / 2) & ~7;