Commit 6370e8de authored by Simpy's avatar Simpy 🐹

11.42

parent d58ebf4d
<Bindings>
<Binding name="Raid Marker" runOnUp="true" category="BINDING_HEADER_ELVUI">
RaidMark_HotkeyPressed(keystate)
</Binding>
<Binding name="Toggle Chat (Left)" runOnUp="false" category="BINDING_HEADER_ELVUI">
HideLeftChat()
</Binding>
<Binding name="Toggle Chat (Right)" runOnUp="false" category="BINDING_HEADER_ELVUI">
HideRightChat()
</Binding>
<Binding name="Toggle Chat (Both)" runOnUp="false" category="BINDING_HEADER_ELVUI">
HideBothChat()
</Binding>
<Binding name='Raid Marker' runOnUp='true' category='BINDING_HEADER_ELVUI'>
RaidMark_HotkeyPressed(keystate)
</Binding>
<Binding name='Toggle Chat (Left)' runOnUp='false' category='BINDING_HEADER_ELVUI'>
HideLeftChat()
</Binding>
<Binding name='Toggle Chat (Right)' runOnUp='false' category='BINDING_HEADER_ELVUI'>
HideRightChat()
</Binding>
<Binding name='Toggle Chat (Both)' runOnUp='false' category='BINDING_HEADER_ELVUI'>
HideBothChat()
</Binding>
</Bindings>
......@@ -57,8 +57,8 @@ end
do -- other non-english locales require this
E.UnlocalizedClasses = {}
for k,v in pairs(_G.LOCALIZED_CLASS_NAMES_MALE) do E.UnlocalizedClasses[v] = k end
for k,v in pairs(_G.LOCALIZED_CLASS_NAMES_FEMALE) do E.UnlocalizedClasses[v] = k end
for k, v in pairs(_G.LOCALIZED_CLASS_NAMES_MALE) do E.UnlocalizedClasses[v] = k end
for k, v in pairs(_G.LOCALIZED_CLASS_NAMES_FEMALE) do E.UnlocalizedClasses[v] = k end
function E:UnlocalizedClassName(className)
return (className and className ~= '') and E.UnlocalizedClasses[className]
......
......@@ -25,7 +25,6 @@ t:SetPoint("CENTER")
t:FontTemplate(nil, 20)
E:SetUpAnimGroup(t, "Number", 10, 5)
local b = CreateFrame("BUTTON", nil, UIParent)
b:SetPoint("CENTER", 0, -100)
b:SetTemplate()
......
......@@ -7,11 +7,10 @@ local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, Private
local UF = E:GetModule('UnitFrames')
local AB = E:GetModule('ActionBars')
--Lua functions
local _G = _G
local pairs = pairs
local twipe, tinsert = wipe, tinsert
--WoW API / Variables
local CreateFrame = CreateFrame
local DoEmote = DoEmote
local GetCVar, SetCVar = GetCVar, SetCVar
......@@ -87,18 +86,18 @@ do
end
for _, bar in pairs(AB.handledBars) do
for i=1, #bar.buttons do
for i = 1, #bar.buttons do
tinsert(self.massiveShakeObjects, bar.buttons[i])
end
end
if ElvUI_StanceBar then
for i=1, #ElvUI_StanceBar.buttons do
for i = 1, #ElvUI_StanceBar.buttons do
tinsert(self.massiveShakeObjects, ElvUI_StanceBar.buttons[i])
end
end
for i=1, NUM_PET_ACTION_SLOTS do
for i = 1, NUM_PET_ACTION_SLOTS do
local button = _G['PetActionButton'..i]
if button then
tinsert(self.massiveShakeObjects, button)
......
......@@ -2,11 +2,10 @@ local E, L, V, P, G = unpack(select(2, ...)) --Import: Engine, Locales, PrivateD
local DT = E:GetModule('DataTexts')
local AB = E:GetModule('ActionBars')
--Lua functions
local _G = _G
local tonumber, type, pairs, select = tonumber, type, pairs, select
local lower, split, format, wipe, next = strlower, strsplit, format, wipe, next
--WoW API / Variables
local lower, split, format, wipe, next, print = strlower, strsplit, format, wipe, next, print
local debugprofilestop = debugprofilestop
local EnableAddOn = EnableAddOn
local GetAddOnCPUUsage = GetAddOnCPUUsage
......@@ -71,13 +70,6 @@ function E:LuaError(msg)
end
end
function E:BGStats()
DT.ForceHideBGStats = nil
DT:LoadDataTexts()
E:Print(L["Battleground datatexts will now show again if you are inside a battleground."])
end
local function OnCallback(command)
_G.MacroEditBox:GetScript('OnEvent')(_G.MacroEditBox, 'EXECUTE_CHAT_LINE', command)
end
......@@ -160,14 +152,16 @@ function E:GetCPUImpact()
local ms_passed = debugprofilestop() - debugTimer
UpdateAddOnCPUUsage()
local per, passed =
((num_frames == 0 and 0) or (GetAddOnCPUUsage('ElvUI') / num_frames)),
((num_frames == 0 and 0) or (ms_passed / num_frames))
local per, passed = ((num_frames == 0 and 0) or (GetAddOnCPUUsage('ElvUI') / num_frames)), ((num_frames == 0 and 0) or (ms_passed / num_frames))
self:Print(format(cpuImpactMessage, per and per > 0 and format('%.3f', per) or 0, passed and passed > 0 and format('%.3f', passed) or 0))
toggleMode = false
end
end
function E:EHelp()
print(L["EHELP_COMMANDS"])
end
local BLIZZARD_ADDONS = {
'Blizzard_AchievementUI',
'Blizzard_AdventureMap',
......@@ -277,7 +271,8 @@ function E:LoadCommands()
---- Note: showall, delay, and minCalls will default if not set
---- arg1 can be 'all' this will scan all registered modules!
self:RegisterChatCommand('bgstats', 'BGStats')
self:RegisterChatCommand('hdt', DT.HyperDT)
self:RegisterChatCommand('bgstats', DT.ToggleBattleStats)
self:RegisterChatCommand('hellokitty', 'HelloKittyToggle')
self:RegisterChatCommand('hellokittyfix', 'HelloKittyFix')
self:RegisterChatCommand('harlemshake', 'HarlemShakeToggle')
......@@ -288,6 +283,8 @@ function E:LoadCommands()
self:RegisterChatCommand('cleanguild', 'MassGuildKick')
self:RegisterChatCommand('enableblizzard', 'EnableBlizzardAddOns')
self:RegisterChatCommand('estatus', 'ShowStatusReport')
self:RegisterChatCommand('ehelp', 'EHelp')
self:RegisterChatCommand('ecommands', 'EHelp')
-- self:RegisterChatCommand('aprilfools', '') --Don't need this until next april fools
if E.private.actionbar.enable then
......
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local S = E:GetModule('Skins')
--Lua functions
local _G = _G
local unpack, sort, gsub, wipe = unpack, sort, gsub, wipe
local strupper, ipairs, tonumber = strupper, ipairs, tonumber
local floor, select, type, min = floor, select, type, min
local pairs, tinsert, tContains = pairs, tinsert, tContains
local strsplit = strsplit
--WoW API / Variables
local hooksecurefunc = hooksecurefunc
local EnableAddOn = EnableAddOn
local LoadAddOn = LoadAddOn
local GetAddOnMetadata = GetAddOnMetadata
local GetAddOnInfo = GetAddOnInfo
local GameTooltip = GameTooltip
local CreateFrame = CreateFrame
local IsAddOnLoaded = IsAddOnLoaded
local InCombatLockdown = InCombatLockdown
......@@ -25,6 +23,8 @@ local ERR_NOT_IN_COMBAT = ERR_NOT_IN_COMBAT
local RESET = RESET
-- GLOBALS: ElvUIMoverPopupWindow, ElvUIMoverNudgeWindow, ElvUIMoverPopupWindowDropDown
local ConfigTooltip = CreateFrame("GameTooltip", "ElvUIConfigTooltip", E.UIParent, "GameTooltipTemplate")
local grid
E.ConfigModeLayouts = {
'ALL',
......@@ -594,17 +594,17 @@ function E:Config_StopMoving()
end
local function Config_ButtonOnEnter(self)
if GameTooltip:IsForbidden() or not self.desc then return end
if ConfigTooltip:IsForbidden() or not self.desc then return end
GameTooltip:SetOwner(self, "ANCHOR_TOPRIGHT", 0, 2)
GameTooltip:AddLine(self.desc, 1, 1, 1, true)
GameTooltip:Show()
ConfigTooltip:SetOwner(self, "ANCHOR_TOPRIGHT", 0, 2)
ConfigTooltip:AddLine(self.desc, 1, 1, 1, true)
ConfigTooltip:Show()
end
local function Config_ButtonOnLeave()
if GameTooltip:IsForbidden() then return end
if ConfigTooltip:IsForbidden() then return end
GameTooltip:Hide()
ConfigTooltip:Hide()
end
local function Config_StripNameColor(name)
......@@ -837,8 +837,8 @@ function E:Config_CloseWindow()
ACD:Close('ElvUI')
end
if not GameTooltip:IsForbidden() then
GameTooltip:Hide()
if not ConfigTooltip:IsForbidden() then
ConfigTooltip:Hide()
end
end
......@@ -853,8 +853,8 @@ function E:Config_OpenWindow()
end
end
if not GameTooltip:IsForbidden() then
GameTooltip:Hide()
if not ConfigTooltip:IsForbidden() then
ConfigTooltip:Hide()
end
end
......@@ -909,7 +909,7 @@ function E:Config_WindowOpened(frame)
E:Elasticize(frame.leftHolder.LogoTop, 128, 64)
E:Elasticize(frame.leftHolder.LogoBottom, 128, 64)
local unskinned = not E.private.skins.ace3.enable
local unskinned = not E.private.skins.ace3Enable
local offset = unskinned and 14 or 8
local version = frame.topHolder.version
E:Config_SaveOldPosition(version)
......@@ -1114,7 +1114,7 @@ function E:ToggleOptionsUI(msg)
end
end
local unskinned = not E.private.skins.ace3.enable
local unskinned = not E.private.skins.ace3Enable
if unskinned then
for i=1, frame:GetNumRegions() do
local region = select(i, frame:GetRegions())
......
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local AB = E:GetModule('ActionBars')
--Lua functions
local next, ipairs, pairs = next, ipairs, pairs
local floor, tinsert = floor, tinsert
--WoW API / Variables
local GetTime = GetTime
local CreateFrame = CreateFrame
local hooksecurefunc = hooksecurefunc
......
This diff is collapsed.
This diff is collapsed.
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
--Lua functions
local _G = _G
local tinsert = tinsert
--WoW API / Variables
local CreateFrame = CreateFrame
local ToggleFrame = ToggleFrame
local GetCursorPosition = GetCursorPosition
......@@ -14,7 +12,6 @@ local BUTTON_WIDTH = 135
local function OnClick(btn)
btn.func()
btn:GetParent():Hide()
end
......@@ -38,11 +35,11 @@ function E:DropDown(list, frame, xOffset, yOffset)
xOffset = xOffset or 0
yOffset = yOffset or 0
for i=1, #frame.buttons do
for i = 1, #frame.buttons do
frame.buttons[i]:Hide()
end
for i=1, #list do
for i = 1, #list do
if not frame.buttons[i] then
frame.buttons[i] = CreateFrame('Button', nil, frame)
......
This diff is collapsed.
This diff is collapsed.
<Ui xmlns="http://www.blizzard.com/wow/ui/">
<Ui xmlns='http://www.blizzard.com/wow/ui/'>
<Script file='Patch.lua'/>
<Script file='Core.lua'/>
<Script file='Math.lua'/>
......
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
--Lua functions
local select = select
local pairs = pairs
--WoW API / Variables
local Enum = Enum
local IsFalling = IsFalling
local CreateFrame = CreateFrame
......
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
--Lua functions
local tinsert, tremove, next, wipe, ipairs = tinsert, tremove, next, wipe, ipairs
local select, tonumber, type, unpack, strmatch = select, tonumber, type, unpack, strmatch
local modf, atan2, ceil, floor, abs, sqrt, mod = math.modf, atan2, ceil, floor, abs, sqrt, mod
local format, strsub, strupper, gsub, gmatch = format, strsub, strupper, gsub, gmatch
local tostring, pairs, utf8sub, utf8len = tostring, pairs, string.utf8sub, string.utf8len
--WoW API / Variables
local CreateFrame = CreateFrame
local UnitPosition = UnitPosition
local GetPlayerFacing = GetPlayerFacing
......@@ -16,21 +15,21 @@ local C_Timer_After = C_Timer.After
E.ShortPrefixValues = {}
E.ShortPrefixStyles = {
['TCHINESE'] = {{1e8,'億'}, {1e4,'萬'}},
['CHINESE'] = {{1e8,'亿'}, {1e4,'万'}},
['ENGLISH'] = {{1e12,'T'}, {1e9,'B'}, {1e6,'M'}, {1e3,'K'}},
['GERMAN'] = {{1e12,'Bio'}, {1e9,'Mrd'}, {1e6,'Mio'}, {1e3,'Tsd'}},
['KOREAN'] = {{1e8,'억'}, {1e4,'만'}, {1e3,'천'}},
['METRIC'] = {{1e12,'T'}, {1e9,'G'}, {1e6,'M'}, {1e3,'k'}}
TCHINESE = {{1e8,'億'}, {1e4,'萬'}},
CHINESE = {{1e8,'亿'}, {1e4,'万'}},
ENGLISH = {{1e12,'T'}, {1e9,'B'}, {1e6,'M'}, {1e3,'K'}},
GERMAN = {{1e12,'Bio'}, {1e9,'Mrd'}, {1e6,'Mio'}, {1e3,'Tsd'}},
KOREAN = {{1e8,'억'}, {1e4,'만'}, {1e3,'천'}},
METRIC = {{1e12,'T'}, {1e9,'G'}, {1e6,'M'}, {1e3,'k'}}
}
E.GetFormattedTextStyles = {
['CURRENT'] = '%s',
['CURRENT_MAX'] = '%s - %s',
['CURRENT_PERCENT'] = '%s - %.1f%%',
['CURRENT_MAX_PERCENT'] = '%s - %s | %.1f%%',
['PERCENT'] = '%.1f%%',
['DEFICIT'] = '-%s',
CURRENT = '%s',
CURRENT_MAX = '%s - %s',
CURRENT_PERCENT = '%s - %.1f%%',
CURRENT_MAX_PERCENT = '%s - %s | %.1f%%',
PERCENT = '%.1f%%',
DEFICIT = '-%s',
}
function E:BuildPrefixValues()
......@@ -54,7 +53,7 @@ function E:ShortValue(value, dec)
local abs_value = value<0 and -value or value
local decimal = dec and format('%%.%df', tonumber(dec) or 0)
for i=1, #E.ShortPrefixValues do
for i = 1, #E.ShortPrefixValues do
if abs_value >= E.ShortPrefixValues[i][1] then
if decimal then
return format(decimal..E.ShortPrefixValues[i][2], value / E.ShortPrefixValues[i][1])
......@@ -90,7 +89,7 @@ end
function E:TextGradient(text, ...)
local msg, len, idx = '', utf8len(text), 0
for i=1, len do
for i = 1, len do
local x = utf8sub(text, i, i)
if strmatch(x, '%s') then
msg = msg .. x
......@@ -367,6 +366,8 @@ E.TimeFormats = { -- short / indicator color
[4] = {'%.1fs', '%.1f%ss|r'},
[5] = {'%d:%02d', '%d%s:|r%02d'}, --mmss
[6] = {'%d:%02d', '%d%s:|r%02d'}, --hhmm
[7] = {'%dm %02ds', '%d%sm|r %02d%ss|r'}, --mmss2
[8] = {'%dh %02dm', '%d%sh|r %02d%sm|r'}, --hhmm2
}
for _, x in pairs(E.TimeFormats) do
......@@ -440,9 +441,9 @@ end
--Money text formatting, code taken from Scrooge by thelibrarian ( http://www.wowace.com/addons/scrooge/ )
local COLOR_COPPER, COLOR_SILVER, COLOR_GOLD = '|cffeda55f', '|cffc7c7cf', '|cffffd700'
local ICON_COPPER = '|TInterface\\MoneyFrame\\UI-CopperIcon:12:12|t'
local ICON_SILVER = '|TInterface\\MoneyFrame\\UI-SilverIcon:12:12|t'
local ICON_GOLD = '|TInterface\\MoneyFrame\\UI-GoldIcon:12:12|t'
local ICON_COPPER = [[|TInterface\MoneyFrame\UI-CopperIcon:12:12|t]]
local ICON_SILVER = [[|TInterface\MoneyFrame\UI-SilverIcon:12:12|t]]
local ICON_GOLD = [[|TInterface\MoneyFrame\UI-GoldIcon:12:12|t]]
function E:FormatMoney(amount, style, textonly)
local coppername = textonly and L["copperabbrev"] or ICON_COPPER
local silvername = textonly and L["silverabbrev"] or ICON_SILVER
......
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local MC = E:GetModule('ModuleCopy')
--Lua functions
local pairs, next, type = pairs, next, type
local format, error = format, error
-- GLOBALS: ElvDB
--This table to reserve settings names in E.global.profileCopy. Used in export/imports functions
--Pligins can add own values for their internal settings for safechecks here
--Plugins can add own values for their internal settings for safechecks here
MC.InternalOptions = {
selected = true,
movers = true,
......@@ -22,27 +21,19 @@ function MC:CreateModuleConfigGroup(Name, section, pluginSection)
type = 'group',
name = Name,
args = {
header = {
order = 0,
type = 'header',
name = Name,
},
header = E.Libs.ACH:Header(Name, 0),
general = {
order = 1,
type = 'toggle',
name = L["General"],
},
PreButtonSpacer = {
order = 200,
type = 'description',
name = "",
},
spacer = E.Libs.ACH:Spacer(-4),
import = {
order = 201,
order = -3,
type = 'execute',
name = L["Import Now"],
func = function()
E.PopupDialogs.MODULE_COPY_CONFIRM.text = format(L["You are going to copy settings for |cffD3CF00\"%s\"|r from |cff4beb2c\"%s\"|r profile to your current |cff4beb2c\"%s\"|r profile. Are you sure?"], Name, E.global.profileCopy.selected, ElvDB.profileKeys[E.myname..' - '..E.myrealm])
E.PopupDialogs.MODULE_COPY_CONFIRM.text = format(L["You are going to copy settings for |cffD3CF00\"%s\"|r from |cff4beb2c\"%s\"|r profile to your current |cff4beb2c\"%s\"|r profile. Are you sure?"], Name, E.global.profileCopy.selected, ElvDB.profileKeys[E.mynameRealm])
E.PopupDialogs.MODULE_COPY_CONFIRM.OnAccept = function()
MC:ImportFromProfile(section, pluginSection)
end
......@@ -50,11 +41,11 @@ function MC:CreateModuleConfigGroup(Name, section, pluginSection)
end,
},
export = {
order = 202,
order = -2,
type = 'execute',
name = L["Export Now"],
func = function()
E.PopupDialogs.MODULE_COPY_CONFIRM.text = format(L["You are going to copy settings for |cffD3CF00\"%s\"|r from your current |cff4beb2c\"%s\"|r profile to |cff4beb2c\"%s\"|r profile. Are you sure?"], Name, ElvDB.profileKeys[E.myname..' - '..E.myrealm], E.global.profileCopy.selected)
E.PopupDialogs.MODULE_COPY_CONFIRM.text = format(L["You are going to copy settings for |cffD3CF00\"%s\"|r from your current |cff4beb2c\"%s\"|r profile to |cff4beb2c\"%s\"|r profile. Are you sure?"], Name, ElvDB.profileKeys[E.mynameRealm], E.global.profileCopy.selected)
E.PopupDialogs.MODULE_COPY_CONFIRM.OnAccept = function()
MC:ExportToProfile(section, pluginSection)
end
......@@ -65,34 +56,26 @@ function MC:CreateModuleConfigGroup(Name, section, pluginSection)
}
if pluginSection then
config.args.general.hidden = function(info) return E.global.profileCopy[pluginSection][section][ info[#info] ] == nil end
config.args.general.get = function(info) return E.global.profileCopy[pluginSection][section][ info[#info] ] end
config.args.general.set = function(info, value) E.global.profileCopy[pluginSection][section][ info[#info] ] = value end
config.get = function(info) return E.global.profileCopy[pluginSection][section][ info[#info] ] end
config.set = function(info, value) E.global.profileCopy[pluginSection][section][ info[#info] ] = value end
else
config.args.general.hidden = function(info) return E.global.profileCopy[section][ info[#info] ] == nil end
config.args.general.get = function(info) return E.global.profileCopy[section][ info[#info] ] end
config.args.general.set = function(info, value) E.global.profileCopy[section][ info[#info] ] = value end
config.get = function(info) return E.global.profileCopy[section][ info[#info] ] end
config.set = function(info, value) E.global.profileCopy[section][ info[#info] ] = value end
end
return config
end
function MC:CreateMoversConfigGroup()
local config = {
header = {
order = 0,
type = 'header',
name = L["On screen positions for different elements."],
},
PreButtonSpacer = {
order = 200,
type = 'description',
name = "",
},
header = E.Libs.ACH:Header(L["On screen positions for different elements."], 0),
spacer = E.Libs.ACH:Spacer(200),
import = {
order = 201,
type = 'execute',
name = L["Import Now"],
func = function()
E.PopupDialogs.MODULE_COPY_CONFIRM.text = format(L["You are going to copy settings for |cffD3CF00\"%s\"|r from |cff4beb2c\"%s\"|r profile to your current |cff4beb2c\"%s\"|r profile. Are you sure?"], L["Movers"], E.global.profileCopy.selected, ElvDB.profileKeys[E.myname..' - '..E.myrealm])