Added colorblind mode
This commit is contained in:
1 parent
2f07c40633
commit
6e72f7edd9
4 files changed
+25
-1
No files matched your search
@@ -896,6 +896,9 @@ function EID:getColor(str, baseKColor)
|
|||||||
else
|
else
|
||||||
if EID.InlineColors[strTrimmed] then colorFunc = nil end
|
if EID.InlineColors[strTrimmed] then colorFunc = nil end
|
||||||
color = EID.InlineColors[strTrimmed] or color
|
color = EID.InlineColors[strTrimmed] or color
|
||||||
|
if EID.Config["ColorblindMode"] > 0 then
|
||||||
|
color = EID.ColorBlindColors[EID.Config["ColorblindMode"]][strTrimmed] or color
|
||||||
|
end
|
||||||
end
|
end
|
||||||
isColorMarkup = type(EID.InlineColors[strTrimmed]) ~= type(nil)
|
isColorMarkup = type(EID.InlineColors[strTrimmed]) ~= type(nil)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -91,6 +91,10 @@ EID.UserConfig = {
|
|||||||
-- Current warnings are: Achievements are locked, outdated game version, and potentially having inaccurate modded Bag of Crafting recipes
|
-- Current warnings are: Achievements are locked, outdated game version, and potentially having inaccurate modded Bag of Crafting recipes
|
||||||
-- Default = false
|
-- Default = false
|
||||||
["DisableStartOfRunWarnings"] = false,
|
["DisableStartOfRunWarnings"] = false,
|
||||||
|
-- ColorblindMode
|
||||||
|
-- Values: 0 = Off, 1 = Protanopia (red weak), 2 = Deuteranopia (green weak), 3 = Tritanopia (blue weak)
|
||||||
|
-- Default = 0
|
||||||
|
["ColorblindMode"] = 0,
|
||||||
|
|
||||||
---------- Co-op / Multiple Descriptions -----------
|
---------- Co-op / Multiple Descriptions -----------
|
||||||
|
|
||||||
@@ -496,6 +500,7 @@ EID.DefaultConfig = {
|
|||||||
["YPosition"] = 45,
|
["YPosition"] = 45,
|
||||||
["LineHeight"] = 11,
|
["LineHeight"] = 11,
|
||||||
["DisplayMode"] = "default",
|
["DisplayMode"] = "default",
|
||||||
|
["ColorblindMode"] = 0,
|
||||||
["LocalModeSize"] = 0.5,
|
["LocalModeSize"] = 0.5,
|
||||||
["LocalModeCentered"] = true,
|
["LocalModeCentered"] = true,
|
||||||
["MarkupSize"] = "default",
|
["MarkupSize"] = "default",
|
||||||
|
|||||||
+14
-1
@@ -746,7 +746,20 @@ EID.InlineColors = {
|
|||||||
return color
|
return color
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
EID.ColorBlindColors = {
|
||||||
|
{ -- Protanopia
|
||||||
|
["ColorBagComplete"] = KColor(0.2, 0.2, 1, 0.6), -- blue-ish
|
||||||
|
["ColorBagOverfill"] = KColor(1, 0, 0, 0.6), -- red
|
||||||
|
},
|
||||||
|
{ -- Deuteranopia
|
||||||
|
["ColorBagComplete"] = KColor(0.2, 0.2, 1, 0.6), -- blue-ish
|
||||||
|
["ColorBagOverfill"] = KColor(1, 0, 0, 0.6), -- red
|
||||||
|
},
|
||||||
|
{ -- Tritanopia
|
||||||
|
--["ColorBagComplete"] = KColor(0, 1, 0, 0.6), -- no changes needed
|
||||||
|
--["ColorBagOverfill"] = KColor(1, 0.5, 0.1, 0.6), -- no changes needed
|
||||||
|
}
|
||||||
|
}
|
||||||
-- Data table for a trinket's ability to be doubled/tripled by Mom's Box or being Golden
|
-- Data table for a trinket's ability to be doubled/tripled by Mom's Box or being Golden
|
||||||
-- Due to only a few exceptions needing special rules, most of these are just a single number, which will be found in the description and multiplied
|
-- Due to only a few exceptions needing special rules, most of these are just a single number, which will be found in the description and multiplied
|
||||||
-- Exceptions will use a table to figure out what to do with them:
|
-- Exceptions will use a table to figure out what to do with them:
|
||||||
|
|||||||
@@ -535,6 +535,9 @@ if MCMLoaded then
|
|||||||
-- Transparency
|
-- Transparency
|
||||||
local transparencies = {0.1, 0.175, 0.25, 0.3, 0.4, 0.5, 0.6, 0.75, 0.8, 0.9, 1}
|
local transparencies = {0.1, 0.175, 0.25, 0.3, 0.4, 0.5, 0.6, 0.75, 0.8, 0.9, 1}
|
||||||
EID:AddScrollSetting("Visuals", "Transparency", "Transparency", transparencies)
|
EID:AddScrollSetting("Visuals", "Transparency", "Transparency", transparencies)
|
||||||
|
-- Color blind
|
||||||
|
local colorBlindModes = {[0] = "Off", "Protanopia (red weak)", "Deuteranopia (green weak)", "Tritanopia (blue weak)"}
|
||||||
|
EID:AddNumberSetting("Visuals", "ColorblindMode", "Colorblind Mode", 0, #colorBlindModes, {displayTable = colorBlindModes, infoText = "Changes some colors to enable colorblind people to use some features of the mod easier."})
|
||||||
|
|
||||||
MCM.AddSpace("EID", "Visuals")
|
MCM.AddSpace("EID", "Visuals")
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user