From 14e0b8646de525af33bf09555a021ee6259e3884 Mon Sep 17 00:00:00 2001 From: Wofsauge Date: Sun, 12 May 2024 23:53:21 +0200 Subject: [PATCH] ItemReminder: Improved automatic overview line hide feature and added mcm option for it --- eid_holdmapdesc.lua | 3 ++- eid_mcm.lua | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/eid_holdmapdesc.lua b/eid_holdmapdesc.lua index c8ceaa6d..c0ccb3d0 100644 --- a/eid_holdmapdesc.lua +++ b/eid_holdmapdesc.lua @@ -657,7 +657,8 @@ function EID:ItemReminderGetDescription() countLines = countLines + numLinebreaks + 2 -- one for the item name, one for initial line end countLines = countLines + math.ceil(countText/EID.Config["TextboxWidth"]) - if countLines < 12 then + local allowedLines = (EID:getScreenSize().Y - EID.Config["YPosition"]) / 14 -- approximate the available screen space + if countLines < allowedLines then tryTrim = false -- dont trim if screen is not filled with a lot of text end end diff --git a/eid_mcm.lua b/eid_mcm.lua index 9f2f636f..9501d0d0 100644 --- a/eid_mcm.lua +++ b/eid_mcm.lua @@ -614,6 +614,7 @@ if MCMLoaded then MCM.AddText("EID", "Reminder", "Item Descriptions") EID:AddNumberSetting("Reminder", "ItemReminderMaxEntriesCount", "Max Entries", 0, 10, {infoText = {"Number of Descriptions possible to be displayed in the Item Reminder feature"}}) + EID:AddNumberSetting("Reminder", "ItemReminderOverviewHideAfterRows", "Overview hide after X rows", 1, 20, {infoText = {"Reduces the length of the description in the overview categorie, if they are to long to display"}}) ---------------------------------------------------------------------------