mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 08:24:44 +00:00
big cleanup and locales
This commit is contained in:
+69
-63
@@ -1,12 +1,18 @@
|
||||
local E, L, V, P, G = unpack(ElvUI);
|
||||
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
|
||||
local CH = E:GetModule("Chat");
|
||||
|
||||
--Cache global variables
|
||||
--Lua functions
|
||||
local getn = table.getn
|
||||
--WoW API / Variables
|
||||
local CHAT_LABEL, GENERAL, NONE = CHAT_LABEL, GENERAL, NONE
|
||||
|
||||
E.Options.args.chat = {
|
||||
type = "group",
|
||||
name = L["Chat"],
|
||||
name = CHAT_LABEL,
|
||||
childGroups = "tab",
|
||||
get = function(info) return E.db.chat[ info[getn(info)] ]; end,
|
||||
set = function(info, value) E.db.chat[ info[getn(info)] ] = value; end,
|
||||
get = function(info) return E.db.chat[ info[getn(info)] ] end,
|
||||
set = function(info, value) E.db.chat[ info[getn(info)] ] = value end,
|
||||
args = {
|
||||
intro = {
|
||||
order = 1,
|
||||
@@ -17,18 +23,18 @@ E.Options.args.chat = {
|
||||
order = 2,
|
||||
type = "toggle",
|
||||
name = L["Enable"],
|
||||
get = function(info) return E.private.chat.enable; end,
|
||||
set = function(info, value) E.private.chat.enable = value; E:StaticPopup_Show("PRIVATE_RL"); end
|
||||
get = function(info) return E.private.chat.enable end,
|
||||
set = function(info, value) E.private.chat.enable = value; E:StaticPopup_Show("PRIVATE_RL") end
|
||||
},
|
||||
general = {
|
||||
order = 3,
|
||||
type = "group",
|
||||
name = L["General"],
|
||||
name = GENERAL,
|
||||
args = {
|
||||
header = {
|
||||
order = 0,
|
||||
type = "header",
|
||||
name = L["General"]
|
||||
name = GENERAL
|
||||
},
|
||||
url = {
|
||||
order = 1,
|
||||
@@ -48,11 +54,11 @@ E.Options.args.chat = {
|
||||
name = L["Hyperlink Hover"],
|
||||
desc = L["Display the hyperlink tooltip while hovering over a hyperlink."],
|
||||
set = function(info, value)
|
||||
E.db.chat[ info[getn(info)] ] = value;
|
||||
if(value == true) then
|
||||
CH:EnableHyperlink();
|
||||
E.db.chat[ info[getn(info)] ] = value
|
||||
if value == true then
|
||||
CH:EnableHyperlink()
|
||||
else
|
||||
CH:DisableHyperlink();
|
||||
CH:DisableHyperlink()
|
||||
end
|
||||
end
|
||||
},
|
||||
@@ -62,7 +68,7 @@ E.Options.args.chat = {
|
||||
name = L["Sticky Chat"],
|
||||
desc = L["When opening the Chat Editbox to type a message having this option set means it will retain the last channel you spoke in. If this option is turned off opening the Chat Editbox should always default to the SAY channel."],
|
||||
set = function(info, value)
|
||||
E.db.chat[ info[getn(info)] ] = value;
|
||||
E.db.chat[ info[getn(info)] ] = value
|
||||
end
|
||||
},
|
||||
fade = {
|
||||
@@ -71,8 +77,8 @@ E.Options.args.chat = {
|
||||
name = L["Fade Chat"],
|
||||
desc = L["Fade the chat text when there is no activity."],
|
||||
set = function(info, value)
|
||||
E.db.chat[ info[getn(info)] ] = value;
|
||||
CH:UpdateFading();
|
||||
E.db.chat[ info[getn(info)] ] = value
|
||||
CH:UpdateFading()
|
||||
end
|
||||
},
|
||||
fadeUndockedTabs = {
|
||||
@@ -81,8 +87,8 @@ E.Options.args.chat = {
|
||||
name = L["Fade Undocked Tabs"],
|
||||
desc = L["Fades the text on chat tabs that are not docked at the left or right chat panel."],
|
||||
set = function(self, value)
|
||||
E.db.chat.fadeUndockedTabs = value;
|
||||
CH:UpdateChatTabs();
|
||||
E.db.chat.fadeUndockedTabs = value
|
||||
CH:UpdateChatTabs()
|
||||
end
|
||||
},
|
||||
fadeTabsNoBackdrop = {
|
||||
@@ -91,8 +97,8 @@ E.Options.args.chat = {
|
||||
name = L["Fade Tabs No Backdrop"],
|
||||
desc = L["Fades the text on chat tabs that are docked in a panel where the backdrop is disabled."],
|
||||
set = function(self, value)
|
||||
E.db.chat.fadeTabsNoBackdrop = value;
|
||||
CH:UpdateChatTabs();
|
||||
E.db.chat.fadeTabsNoBackdrop = value
|
||||
CH:UpdateChatTabs()
|
||||
end
|
||||
},
|
||||
chatHistory = {
|
||||
@@ -107,8 +113,8 @@ E.Options.args.chat = {
|
||||
name = L["Use Alt Key"],
|
||||
desc = L["Require holding the Alt key down to move cursor or cycle through messages in the editbox."],
|
||||
set = function(self, value)
|
||||
E.db.chat.useAltKey = value;
|
||||
CH:UpdateSettings();
|
||||
E.db.chat.useAltKey = value
|
||||
CH:UpdateSettings()
|
||||
end
|
||||
},
|
||||
spacer = {
|
||||
@@ -123,9 +129,9 @@ E.Options.args.chat = {
|
||||
desc = L["Prevent the same messages from displaying in chat more than once within this set amount of seconds, set to zero to disable."],
|
||||
min = 0, max = 120, step = 1,
|
||||
set = function(info, value)
|
||||
E.db.chat[ info[getn(info)] ] = value;
|
||||
if(value == 0) then
|
||||
CH:DisableChatThrottle();
|
||||
E.db.chat[ info[getn(info)] ] = value
|
||||
if value == 0 then
|
||||
CH:DisableChatThrottle()
|
||||
end
|
||||
end
|
||||
},
|
||||
@@ -136,7 +142,7 @@ E.Options.args.chat = {
|
||||
desc = L["Number of time in seconds to scroll down to the bottom of the chat window if you are not scrolled down completely."],
|
||||
min = 0, max = 120, step = 5,
|
||||
set = function(info, value)
|
||||
E.db.chat[ info[getn(info)] ] = value;
|
||||
E.db.chat[ info[getn(info)] ] = value
|
||||
end
|
||||
},
|
||||
numAllowedCombatRepeat = {
|
||||
@@ -177,22 +183,22 @@ E.Options.args.chat = {
|
||||
order = 16,
|
||||
type = "toggle",
|
||||
name = L["Custom Timestamp Color"],
|
||||
disabled = function() return not E.db.chat.timeStampFormat == "NONE"; end
|
||||
disabled = function() return not E.db.chat.timeStampFormat == "NONE" end
|
||||
},
|
||||
customTimeColor = {
|
||||
order = 17,
|
||||
type = "color",
|
||||
hasAlpha = false,
|
||||
name = L["Timestamp Color"],
|
||||
disabled = function() return (not E.db.chat.timeStampFormat == "NONE" or not E.db.chat.useCustomTimeColor); end,
|
||||
disabled = function() return (not E.db.chat.timeStampFormat == "NONE" or not E.db.chat.useCustomTimeColor) end,
|
||||
get = function(info)
|
||||
local t = E.db.chat.customTimeColor;
|
||||
local d = P.chat.customTimeColor;
|
||||
return t.r, t.g, t.b, t.a, d.r, d.g, d.b;
|
||||
local t = E.db.chat.customTimeColor
|
||||
local d = P.chat.customTimeColor
|
||||
return t.r, t.g, t.b, t.a, d.r, d.g, d.b
|
||||
end,
|
||||
set = function(info, r, g, b)
|
||||
local t = E.db.chat.customTimeColor;
|
||||
t.r, t.g, t.b = r, g, b;
|
||||
local t = E.db.chat.customTimeColor
|
||||
t.r, t.g, t.b = r, g, b
|
||||
end
|
||||
}
|
||||
}
|
||||
@@ -230,7 +236,7 @@ E.Options.args.chat = {
|
||||
desc = L["List of words to color in chat if found in a message. If you wish to add multiple words you must seperate the word with a comma. To search for your current name you can use %MYNAME%.\n\nExample:\n%MYNAME%, ElvUI, RBGs, Tank"],
|
||||
type = "input",
|
||||
width = "full",
|
||||
set = function(info, value) E.db.chat[ info[getn(info)] ] = value; CH:UpdateChatKeywords(); end
|
||||
set = function(info, value) E.db.chat[ info[getn(info)] ] = value; CH:UpdateChatKeywords() end
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -250,9 +256,9 @@ E.Options.args.chat = {
|
||||
name = L["Lock Positions"],
|
||||
desc = L["Attempt to lock the left and right chat frame positions. Disabling this option will allow you to move the main chat frame anywhere you wish."],
|
||||
set = function(info, value)
|
||||
E.db.chat[ info[getn(info)] ] = value;
|
||||
if(value == true) then
|
||||
CH:PositionChat(true);
|
||||
E.db.chat[ info[getn(info)] ] = value
|
||||
if value == true then
|
||||
CH:PositionChat(true)
|
||||
end
|
||||
end
|
||||
},
|
||||
@@ -260,14 +266,14 @@ E.Options.args.chat = {
|
||||
order = 2,
|
||||
type = "toggle",
|
||||
name = L["Tab Panel Transparency"],
|
||||
set = function(info, value) E.db.chat.panelTabTransparency = value; E:GetModule("Layout"):SetChatTabStyle(); end
|
||||
set = function(info, value) E.db.chat.panelTabTransparency = value; E:GetModule("Layout"):SetChatTabStyle() end
|
||||
},
|
||||
panelTabBackdrop = {
|
||||
order = 3,
|
||||
type = "toggle",
|
||||
name = L["Tab Panel"],
|
||||
desc = L["Toggle the chat tab panel backdrop."],
|
||||
set = function(info, value) E.db.chat.panelTabBackdrop = value; E:GetModule("Layout"):ToggleChatPanels(); end
|
||||
set = function(info, value) E.db.chat.panelTabBackdrop = value; E:GetModule("Layout"):ToggleChatPanels() end
|
||||
},
|
||||
editBoxPosition = {
|
||||
order = 4,
|
||||
@@ -278,14 +284,14 @@ E.Options.args.chat = {
|
||||
["BELOW_CHAT"] = L["Below Chat"],
|
||||
["ABOVE_CHAT"] = L["Above Chat"]
|
||||
},
|
||||
set = function(info, value) E.db.chat[ info[getn(info)] ] = value; CH:UpdateAnchors(); end
|
||||
set = function(info, value) E.db.chat[ info[getn(info)] ] = value; CH:UpdateAnchors() end
|
||||
},
|
||||
panelBackdrop = {
|
||||
order = 5,
|
||||
type = "select",
|
||||
name = L["Panel Backdrop"],
|
||||
desc = L["Toggle showing of the left and right chat panels."],
|
||||
set = function(info, value) E.db.chat.panelBackdrop = value; E:GetModule("Layout"):ToggleChatPanels(); E:GetModule("Chat"):PositionChat(true); E:GetModule("Chat"):UpdateAnchors(); end,
|
||||
set = function(info, value) E.db.chat.panelBackdrop = value; E:GetModule("Layout"):ToggleChatPanels(); E:GetModule("Chat"):PositionChat(true); E:GetModule("Chat"):UpdateAnchors() end,
|
||||
values = {
|
||||
["HIDEBOTH"] = L["Hide Both"],
|
||||
["SHOWBOTH"] = L["Show Both"],
|
||||
@@ -299,9 +305,9 @@ E.Options.args.chat = {
|
||||
name = L["Separate Panel Sizes"],
|
||||
desc = L["Enable the use of separate size options for the right chat panel."],
|
||||
set = function(info, value)
|
||||
E.db.chat.separateSizes = value;
|
||||
E:GetModule("Chat"):PositionChat(true);
|
||||
E:GetModule("Bags"):Layout();
|
||||
E.db.chat.separateSizes = value
|
||||
E:GetModule("Chat"):PositionChat(true)
|
||||
E:GetModule("Bags"):Layout()
|
||||
end
|
||||
},
|
||||
spacer1 = {
|
||||
@@ -315,7 +321,7 @@ E.Options.args.chat = {
|
||||
name = L["Panel Height"],
|
||||
desc = L["PANEL_DESC"],
|
||||
min = 50, max = 600, step = 1,
|
||||
set = function(info, value) E.db.chat.panelHeight = value; E:GetModule("Chat"):PositionChat(true); end
|
||||
set = function(info, value) E.db.chat.panelHeight = value; E:GetModule("Chat"):PositionChat(true) end
|
||||
},
|
||||
panelWidth = {
|
||||
order = 9,
|
||||
@@ -324,13 +330,13 @@ E.Options.args.chat = {
|
||||
desc = L["PANEL_DESC"],
|
||||
min = 50, max = 1000, step = 1,
|
||||
set = function(info, value)
|
||||
E.db.chat.panelWidth = value;
|
||||
E:GetModule("Chat"):PositionChat(true);
|
||||
E.db.chat.panelWidth = value
|
||||
E:GetModule("Chat"):PositionChat(true)
|
||||
local bags = E:GetModule("Bags");
|
||||
if(not E.db.chat.separateSizes) then
|
||||
bags:Layout();
|
||||
if not E.db.chat.separateSizes then
|
||||
bags:Layout()
|
||||
end
|
||||
bags:Layout(true);
|
||||
bags:Layout(true)
|
||||
end
|
||||
},
|
||||
spacer2 = {
|
||||
@@ -344,9 +350,9 @@ E.Options.args.chat = {
|
||||
name = L["Right Panel Height"],
|
||||
desc = L["Adjust the height of your right chat panel."],
|
||||
min = 50, max = 600, step = 1,
|
||||
disabled = function() return not E.db.chat.separateSizes; end,
|
||||
hidden = function() return not E.db.chat.separateSizes; end,
|
||||
set = function(info, value) E.db.chat.panelHeightRight = value; E:GetModule("Chat"):PositionChat(true); end
|
||||
disabled = function() return not E.db.chat.separateSizes end,
|
||||
hidden = function() return not E.db.chat.separateSizes end,
|
||||
set = function(info, value) E.db.chat.panelHeightRight = value; E:GetModule("Chat"):PositionChat(true) end
|
||||
},
|
||||
panelWidthRight = {
|
||||
order = 12,
|
||||
@@ -357,9 +363,9 @@ E.Options.args.chat = {
|
||||
disabled = function() return not E.db.chat.separateSizes end,
|
||||
hidden = function() return not E.db.chat.separateSizes end,
|
||||
set = function(info, value)
|
||||
E.db.chat.panelWidthRight = value;
|
||||
E:GetModule("Chat"):PositionChat(true);
|
||||
E:GetModule("Bags"):Layout();
|
||||
E.db.chat.panelWidthRight = value
|
||||
E:GetModule("Chat"):PositionChat(true)
|
||||
E:GetModule("Bags"):Layout()
|
||||
end
|
||||
},
|
||||
panelBackdropNameLeft = {
|
||||
@@ -369,8 +375,8 @@ E.Options.args.chat = {
|
||||
name = L["Panel Texture (Left)"],
|
||||
desc = L["Specify a filename located inside the World of Warcraft directory. Textures folder that you wish to have set as a panel background.\n\nPlease Note:\n-The image size recommended is 256x128\n-You must do a complete game restart after adding a file to the folder.\n-The file type must be tga format.\n\nExample: Interface\\AddOns\\ElvUI\\media\\textures\\copy\n\nOr for most users it would be easier to simply put a tga file into your WoW folder, then type the name of the file here."],
|
||||
set = function(info, value)
|
||||
E.db.chat[ info[getn(info)] ] = value;
|
||||
E:UpdateMedia();
|
||||
E.db.chat[ info[getn(info)] ] = value
|
||||
E:UpdateMedia()
|
||||
end
|
||||
},
|
||||
panelBackdropNameRight = {
|
||||
@@ -380,8 +386,8 @@ E.Options.args.chat = {
|
||||
name = L["Panel Texture (Right)"],
|
||||
desc = L["Specify a filename located inside the World of Warcraft directory. Textures folder that you wish to have set as a panel background.\n\nPlease Note:\n-The image size recommended is 256x128\n-You must do a complete game restart after adding a file to the folder.\n-The file type must be tga format.\n\nExample: Interface\\AddOns\\ElvUI\\media\\textures\\copy\n\nOr for most users it would be easier to simply put a tga file into your WoW folder, then type the name of the file here."],
|
||||
set = function(info, value)
|
||||
E.db.chat[ info[getn(info)] ] = value;
|
||||
E:UpdateMedia();
|
||||
E.db.chat[ info[getn(info)] ] = value
|
||||
E:UpdateMedia()
|
||||
end
|
||||
}
|
||||
}
|
||||
@@ -390,7 +396,7 @@ E.Options.args.chat = {
|
||||
order = 6,
|
||||
type = "group",
|
||||
name = L["Fonts"],
|
||||
set = function(info, value) E.db.chat[ info[getn(info)] ] = value; CH:SetupChat(); end,
|
||||
set = function(info, value) E.db.chat[ info[getn(info)] ] = value; CH:SetupChat() end,
|
||||
args = {
|
||||
header = {
|
||||
order = 0,
|
||||
@@ -454,7 +460,7 @@ E.Options.args.chat = {
|
||||
classColorMentionsChat = {
|
||||
order = 2,
|
||||
type = "toggle",
|
||||
name = L["Chat"],
|
||||
name = CHAT_LABEL,
|
||||
desc = L["Use class color for the names of players when they are mentioned."],
|
||||
get = function(info) return E.db.chat.classColorMentionsChat end,
|
||||
set = function(info, value) E.db.chat.classColorMentionsChat = value end,
|
||||
@@ -476,7 +482,7 @@ E.Options.args.chat = {
|
||||
type = 'input',
|
||||
get = function(info) return "" end,
|
||||
set = function(info, value)
|
||||
if value == "" or string.gsub(value, "%s+", "") == "" then return; end
|
||||
if value == "" or string.gsub(value, "%s+", "") == "" then return end
|
||||
E.global.chat.classColorMentionExcludedNames[strlower(value)] = value
|
||||
end
|
||||
},
|
||||
@@ -494,4 +500,4 @@ E.Options.args.chat = {
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user