Allow user to change mod indicator color
This commit is contained in:
1 parent
d5bb47f840
commit
939f2a7ab2
3 files changed
+30
-2
No files matched your search
@@ -134,6 +134,9 @@ EID.UserConfig = {
|
||||
-- Set the mod indicator display
|
||||
-- Default = "Both"
|
||||
["ModIndicatorDisplay"] = "Both",
|
||||
-- Set the mod indicator text color
|
||||
-- Default = "ColorLightOrange"
|
||||
["ModIndicatorTextColor"] = "ColorLightOrange",
|
||||
|
||||
-------TRANSFORMATIONS---------
|
||||
|
||||
@@ -355,6 +358,7 @@ EID.DefaultConfig = {
|
||||
["ItemNameColor"] = "ColorEIDObjName",
|
||||
["ShowQuality"] = true,
|
||||
["ModIndicatorDisplay"] = "Both",
|
||||
["ModIndicatorTextColor"] = "ColorLightOrange",
|
||||
["ShowObjectID"] = false,
|
||||
["TransformationText"] = true,
|
||||
["TransformationIcons"] = true,
|
||||
|
||||
@@ -376,9 +376,9 @@ function EID:printDescription(desc)
|
||||
|
||||
if desc.ModName then
|
||||
if EID.Config["ModIndicatorDisplay"] == "Both" or EID.Config["ModIndicatorDisplay"] == "Name only" then
|
||||
curName = curName .. " {{ColorWhite}}" .. EID.ModIndicator[desc.ModName].Name
|
||||
curName = curName .. " {{"..EID.Config["ModIndicatorTextColor"].."}}" .. EID.ModIndicator[desc.ModName].Name
|
||||
end
|
||||
if EID.Config["ModIndicatorDisplay"] == "Both" or EID.Config["ModIndicatorDisplay"] == "Icon only" and EID.ModIndicator[desc.ModName].Icon then
|
||||
if (EID.Config["ModIndicatorDisplay"] == "Both" or EID.Config["ModIndicatorDisplay"] == "Icon only") and EID.ModIndicator[desc.ModName].Icon then
|
||||
curName = curName .. "{{".. EID.ModIndicator[desc.ModName].Icon .."}}"
|
||||
end
|
||||
end
|
||||
|
||||
@@ -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
|
||||
Reference in new issue
Block a user