Allow user to change mod indicator color

This commit is contained in:
Valentin Lampriere committed 2022-01-14 12:26:14 +01:00
1 parent d5bb47f840
commit 939f2a7ab2
3 files changed
+30 -2

No files matched your search

+24
View File
@@ -1563,4 +1563,28 @@ if MCMLoaded then
Info = {"Changes the color of error messages like Unknown pills"}
}
)
-- Mod indicator Color
MCM.AddSetting(
"EID",
"Colors",
{
Type = ModConfigMenu.OptionType.NUMBER,
CurrentSetting = function()
return AnIndexOf(colorNameArray, EID.Config["ModIndicatorTextColor"])
end,
Minimum = 0,
Maximum = 1000,
Display = function()
if EID.Config["ModIndicatorTextColor"] == nil then EID.Config["TextColor"] = EID.DefaultConfig["ModIndicatorTextColor"] end
EID.MCMCompat_isDisplayingEIDTab = "Visuals";
return "Mod Indicator: " .. string.gsub(EID.Config["ModIndicatorTextColor"], "Color", "").. " ("..AnIndexOf(colorNameArray, EID.Config["ModIndicatorTextColor"]).."/"..#colorNameArray..")"
end,
OnChange = function(currentNum)
if currentNum == 0 then currentNum = #colorNameArray end
if currentNum > #colorNameArray then currentNum = 1 end
EID.Config["ModIndicatorTextColor"] = colorNameArray[currentNum]
end,
Info = {"Changes the color of mod indicator texts (as long as they are enabled)."}
}
)
end