Skip to content

Commit

Permalink
add chat class color option for classic
Browse files Browse the repository at this point in the history
  • Loading branch information
Stanzilla committed Aug 27, 2019
1 parent 32e876a commit e06a58b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .luacheckrc
Expand Up @@ -69,6 +69,8 @@ globals = {
"UIDropDownMenu_CreateInfo",
"UIDropDownMenu_SetSelectedValue",
"UIDropDownMenu_SetWidth",
"WOW_PROJECT_ID",
"WOW_PROJECT_CLASSIC",

-- FrameXML frames

Expand Down
16 changes: 12 additions & 4 deletions basicOptions.lua
Expand Up @@ -8,7 +8,9 @@ local SetCVar = function(...) -- Suppress errors trying to set read-only cvars
return status
end

local IsClassic = select(4, GetBuildInfo()) < 20000
local function IsClassic()
return WOW_PROJECT_ID == WOW_PROJECT_CLASSIC
end

AdvancedInterfaceOptionsSaved = {}
local DBVersion = 3
Expand Down Expand Up @@ -362,7 +364,7 @@ local secureToggle = newCheckbox(AIO, 'secureAbilityToggle')
local luaErrors = newCheckbox(AIO, 'scriptErrors')
local targetDebuffFilter = newCheckbox(AIO, 'noBuffDebuffFilterOnTarget')
local reverseCleanupBags
if not IsClassic then
if not IsClassic() then
reverseCleanupBags = newCheckbox(AIO, 'reverseCleanupBags',
function(self)
return GetSortBagsRightToLeft()
Expand Down Expand Up @@ -445,7 +447,7 @@ secureToggle:SetPoint("TOPLEFT", fadeMap, "BOTTOMLEFT", 0, -4)
luaErrors:SetPoint("TOPLEFT", secureToggle, "BOTTOMLEFT", 0, -4)
targetDebuffFilter:SetPoint("TOPLEFT", luaErrors, "BOTTOMLEFT", 0, -4)
if not IsClassic then
if not IsClassic() then
reverseCleanupBags:SetPoint("TOPLEFT", targetDebuffFilter, "BOTTOMLEFT", 0, -4)
lootLeftmostBag:SetPoint("TOPLEFT", reverseCleanupBags, "BOTTOMLEFT", 0, -4)
enableWoWMouse:SetPoint("TOPLEFT", lootLeftmostBag, "BOTTOMLEFT", 0, -4)
Expand Down Expand Up @@ -542,10 +544,16 @@ SubText_Chat:SetText('These options allow you to modify various chat settings th
local chatMouseScroll = newCheckbox(AIO_Chat, 'chatMouseScroll')
local chatDelay = newCheckbox(AIO_Chat, 'removeChatDelay')
local classColors
if IsClassic() then
classColors = newCheckbox(AIO_Chat, 'chatClassColorOverride')
end
chatDelay:SetPoint('TOPLEFT', SubText_Chat, 'BOTTOMLEFT', 0, -8)
chatMouseScroll:SetPoint('TOPLEFT', chatDelay, 'BOTTOMLEFT', 0, -4)
if IsClassic() then
classColors:SetPoint('TOPLEFT', chatMouseScroll, 'BOTTOMLEFT', 0, -4)
end
-- Floating Combat Text section
local AIO_FCT = CreateFrame('Frame', nil, InterfaceOptionsFramePanelContainer)
AIO_FCT:Hide()
Expand Down
3 changes: 2 additions & 1 deletion cvars.lua
Expand Up @@ -287,7 +287,8 @@ addon.hiddenOptions = {
["showCastableBuffs"] = { prettyName = SHOW_CASTABLE_BUFFS_TEXT, description = OPTION_TOOLTIP_SHOW_CASTABLE_BUFFS, type = "boolean" },
["deselectOnClick"] = { prettyName = nil, description = OPTION_TOOLTIP_GAMEFIELD_DESELECT, type = "boolean" },
["autoQuestProgress"] = { prettyName = nil, description = OPTION_TOOLTIP_AUTO_QUEST_PROGRESS, type = "boolean" },
["UberTooltips"] = { prettyName = USE_UBERTOOLTIPS, description = OPTION_TOOLTIP_USE_UBERTOOLTIPS, type = "boolean" },
["UberTooltips"] = { prettyName = USE_UBERTOOLTIPS, description = OPTION_TOOLTIP_USE_UBERTOOLTIPS, type = "boolean" },
["chatClassColorOverride"] = { prettyName = "Disable Class Colors", description = "Disables Class Colors in Chat", type = "boolean" },
-- Sound
["Sound_EnableAllSound"] = { prettyName = ENABLE_SOUND, description = OPTION_TOOLTIP_ENABLE_SOUND, type = "boolean" },
["Sound_EnableDSPEffects"] = { prettyName = ENABLE_DSP_EFFECTS, description = OPTION_TOOLTIP_ENABLE_DSP_EFFECTS, type = "boolean" },
Expand Down

0 comments on commit e06a58b

Please sign in to comment.