From f4e2878fed62d2467e3093cd21fe05eb67f781bf Mon Sep 17 00:00:00 2001 From: "E. Almqvist" Date: Sun, 14 Jun 2020 23:06:56 +0200 Subject: [PATCH] More bug fixes that dont work :( --- gamemode/engine/derma/lib/cl_menu_dialogueBox.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gamemode/engine/derma/lib/cl_menu_dialogueBox.lua b/gamemode/engine/derma/lib/cl_menu_dialogueBox.lua index f462939..b02338d 100644 --- a/gamemode/engine/derma/lib/cl_menu_dialogueBox.lua +++ b/gamemode/engine/derma/lib/cl_menu_dialogueBox.lua @@ -56,7 +56,13 @@ function log.setHeightToLines( p, lines, font, add ) add = add || 0 surface.SetFont(font) local _, h = surface.GetTextSize("Quantum") - p:SetHeight((#lines * h) + (#lines * padding_s) + add) + local numLines = #lines + if(numLines > 1) then + p:SetHeight((numLines * h) + (numLines* padding_s) + add) + else + p:SetHeight(h + add) --container is too big, fix this + -- also hello to whoever is reading this. :) + end end local maxW, maxH = 775 * scale, 160 * scale