perf: cache menu title translation (#524)

This commit is contained in:
Eva
2023-04-25 09:35:32 +02:00
committed by GitHub
parent 3c70ffd927
commit 398947d931

View File

@@ -799,7 +799,7 @@ function Menu:render()
if draw_title then
local title_ay = ay - self.item_height
local title_height = self.item_height - 3
menu.ass_safe_title = t(menu.ass_safe_title or ass_escape(menu.title))
menu.ass_safe_title = menu.ass_safe_title or ass_escape(t(menu.title))
-- Background
ass:rect(ax + 2, title_ay, bx - 2, title_ay + title_height, {