Commit 966a7016 authored by Simpy's avatar Simpy 🐹

12.00

parents 3b6bfede 3ea99068
......@@ -30,7 +30,6 @@ local UnitIsMercenary = UnitIsMercenary
local UnitStat = UnitStat
local C_PetBattles_IsInBattle = C_PetBattles.IsInBattle
local C_PvP_IsRatedBattleground = C_PvP.IsRatedBattleground
local C_UIWidgetManager_GetStatusBarWidgetVisualizationInfo = C_UIWidgetManager.GetStatusBarWidgetVisualizationInfo
local FACTION_HORDE = FACTION_HORDE
local FACTION_ALLIANCE = FACTION_ALLIANCE
local ERR_NOT_IN_COMBAT = ERR_NOT_IN_COMBAT
......@@ -48,7 +47,7 @@ function E:ClassColor(class, usePriestColor)
color.colorStr = 'ff'..color.colorStr
end
if (usePriestColor and class == 'PRIEST') and tonumber(color.colorStr, 16) > tonumber(E.PriestColors.colorStr, 16) then
if usePriestColor and class == 'PRIEST' and tonumber(color.colorStr, 16) > tonumber(E.PriestColors.colorStr, 16) then
return E.PriestColors
else
return color
......@@ -206,36 +205,6 @@ do
end
end
do
function E:GetWidgetInfoID(guid)
return E.global.nameplate.widgetMap[guid]
end
function E:SetWidgetInfoID(guid, widgetID)
if widgetID then
E.global.nameplate.widgetMap[guid] = widgetID
end
end
E.MaxWidgetInfoRank = 30
function E:GetWidgetInfoBase(widgetID)
local widget = widgetID and C_UIWidgetManager_GetStatusBarWidgetVisualizationInfo(widgetID)
if not widget then return end
local cur = widget.barValue - widget.barMin
local toNext = widget.barMax - widget.barMin
local total = widget.barValue
local rank, maxRank
if widget.overrideBarText then
rank = tonumber(strmatch(widget.overrideBarText, '%d+'))
maxRank = rank == E.MaxWidgetInfoRank
end
return cur, toNext, total, rank, maxRank
end
end
do
local Masque = E.Libs.Masque
local MasqueGroupState = {}
......@@ -320,7 +289,7 @@ do
if module == 'all' then
for moduName, modu in pairs(self.modules) do
for funcName, func in pairs(modu) do
if (funcName ~= 'GetModule') and (type(func) == 'function') then
if funcName ~= 'GetModule' and type(func) == 'function' then
CPU_USAGE[moduName..':'..funcName] = GetFunctionCPUUsage(func, true)
end
end
......
......@@ -21,14 +21,14 @@ end
--TEST
--[[local t = UIParent:CreateFontString(nil, 'OVERLAY', 'GameTooltipText')
t:SetText(0)
t:SetPoint('CENTER')
t:Point('CENTER')
t:FontTemplate(nil, 20)
E:SetUpAnimGroup(t, 'Number', 10, 5)
local b = CreateFrame('BUTTON', nil, UIParent)
b:SetPoint('CENTER', 0, -100)
b:Point('CENTER', 0, -100)
b:SetTemplate()
b:SetSize(40,30)
b:Size(40,30)
b:EnableMouse(true)
b:SetScript('OnClick', function()
if t:GetText() == 10 then
......
......@@ -124,19 +124,19 @@ do
end
local function OnUpdate(self, elapsed)
if(self.elapsed and self.elapsed > 0.1) then
if self.elapsed and self.elapsed > 0.1 then
self.tex:SetTexCoord((self.curFrame - 1) * 0.1, 0, (self.curFrame - 1) * 0.1, 1, self.curFrame * 0.1, 0, self.curFrame * 0.1, 1)
if(self.countUp) then
if self.countUp then
self.curFrame = self.curFrame + 1
else
self.curFrame = self.curFrame - 1
end
if(self.curFrame > 10) then
if self.curFrame > 10 then
self.countUp = false
self.curFrame = 9
elseif(self.curFrame < 1) then
elseif self.curFrame < 1 then
self.countUp = true
self.curFrame = 2
end
......@@ -154,7 +154,7 @@ do
--Store old settings
local t = self.db.tempSettings
local c = self.db.general.backdropcolor
if(self:HelloKittyFixCheck()) then
if self:HelloKittyFixCheck() then
E:HelloKittyFix()
else
self.oldEnableAllSound = GetCVar('Sound_EnableAllSound')
......@@ -216,13 +216,13 @@ do
function E:RestoreHelloKitty()
--Store old settings
self.db.general.kittys = false
if(_G.HelloKittyLeft) then
if _G.HelloKittyLeft then
_G.HelloKittyLeft:Hide()
_G.HelloKittyRight:Hide()
end
if not(self.db.tempSettings) then return end
if(self:HelloKittyFixCheck()) then
if self:HelloKittyFixCheck() then
self:HelloKittyFix()
self.db.tempSettings = nil
return
......@@ -260,17 +260,17 @@ do
end
function E:CreateKittys()
if(_G.HelloKittyLeft) then
if _G.HelloKittyLeft then
_G.HelloKittyLeft:Show()
_G.HelloKittyRight:Show()
return
end
local helloKittyLeft = CreateFrame('Frame', 'HelloKittyLeft', _G.UIParent)
helloKittyLeft:SetSize(120, 128)
helloKittyLeft:Size(120, 128)
helloKittyLeft:SetMovable(true)
helloKittyLeft:EnableMouse(true)
helloKittyLeft:RegisterForDrag('LeftButton')
helloKittyLeft:SetPoint('BOTTOMLEFT', _G.LeftChatPanel, 'BOTTOMRIGHT', 2, -4)
helloKittyLeft:Point('BOTTOMLEFT', _G.LeftChatPanel, 'BOTTOMRIGHT', 2, -4)
helloKittyLeft.tex = helloKittyLeft:CreateTexture(nil, 'OVERLAY')
helloKittyLeft.tex:SetAllPoints()
helloKittyLeft.tex:SetTexture(E.Media.Textures.HelloKitty)
......@@ -283,11 +283,11 @@ do
helloKittyLeft:SetScript('OnUpdate', OnUpdate)
local helloKittyRight = CreateFrame('Frame', 'HelloKittyRight', _G.UIParent)
helloKittyRight:SetSize(120, 128)
helloKittyRight:Size(120, 128)
helloKittyRight:SetMovable(true)
helloKittyRight:EnableMouse(true)
helloKittyRight:RegisterForDrag('LeftButton')
helloKittyRight:SetPoint('BOTTOMRIGHT', _G.RightChatPanel, 'BOTTOMLEFT', -2, -4)
helloKittyRight:Point('BOTTOMRIGHT', _G.RightChatPanel, 'BOTTOMLEFT', -2, -4)
helloKittyRight.tex = helloKittyRight:CreateTexture(nil, 'OVERLAY')
helloKittyRight.tex:SetAllPoints()
helloKittyRight.tex:SetTexture(E.Media.Textures.HelloKitty)
......@@ -303,8 +303,8 @@ do
--When it bugged out for a user the command '/hellokittyfix' attempted to restore the changed settings to default
function E:HelloKittyFixCheck(secondCheck)
local t = self.db.tempSettings
if(not t and not secondCheck) then t = self.db.general end
if(t and t.backdropcolor)then
if not t and not secondCheck then t = self.db.general end
if t and t.backdropcolor then
return self:Round(t.backdropcolor.r, 2) == 0.87 and self:Round(t.backdropcolor.g, 2) == 0.3 and self:Round(t.backdropcolor.b, 2) == 0.74
end
end
......@@ -336,7 +336,7 @@ do
self.db.unitframe.colors.auraBarBuff = {r = c.r, g = c.g, b = c.b}
self.db.unitframe.colors.transparentAurabars = false
if(_G.HelloKittyLeft) then
if _G.HelloKittyLeft then
_G.HelloKittyLeft:Hide()
_G.HelloKittyRight:Hide()
self.db.general.kittys = nil
......@@ -348,7 +348,7 @@ do
end
function E:HelloKittyToggle()
if(_G.HelloKittyLeft and _G.HelloKittyLeft:IsShown()) then
if _G.HelloKittyLeft and _G.HelloKittyLeft:IsShown() then
self:RestoreHelloKitty()
else
self:StaticPopup_Show('HELLO_KITTY')
......
......@@ -19,9 +19,9 @@ local GetNumGuildMembers = GetNumGuildMembers
local GuildControlGetNumRanks = GuildControlGetNumRanks
local GuildControlGetRankName = GuildControlGetRankName
local GuildUninvite = GuildUninvite
local ReloadUI = ReloadUI
local ResetCPUUsage = ResetCPUUsage
local SendChatMessage = SendChatMessage
local ReloadUI = ReloadUI
local SetCVar = SetCVar
local UpdateAddOnCPUUsage = UpdateAddOnCPUUsage
-- GLOBALS: ElvUIGrid, ElvDB
......@@ -43,7 +43,7 @@ function E:LuaError(msg)
if switch == 'on' or switch == '1' then
for i=1, GetNumAddOns() do
local name = GetAddOnInfo(i)
if (name ~= 'ElvUI' and name ~= 'ElvUI_OptionsUI') and E:IsAddOnEnabled(name) then
if name ~= 'ElvUI' and name ~= 'ElvUI_OptionsUI' and E:IsAddOnEnabled(name) then
DisableAddOn(name, E.myname)
ElvDB.LuaErrorDisabledAddOns[name] = i
end
......@@ -77,7 +77,7 @@ end
function E:DelayScriptCall(msg)
local secs, command = msg:match('^(%S+)%s+(.*)$')
secs = tonumber(secs)
if (not secs) or (#command == 0) then
if not secs or (#command == 0) then
self:Print('usage: /in <seconds> <command>')
self:Print('example: /in 1.5 /say hi')
else
......
This diff is collapsed.
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
local AB = E:GetModule('ActionBars')
local LSM = E.Libs.LSM
local next, ipairs, pairs = next, ipairs, pairs
local floor, tinsert = floor, tinsert
......@@ -150,7 +151,7 @@ function E:Cooldown_Options(timer, db, parent)
end
if fonts and fonts.enable then
timer.customFont = E.Libs.LSM:Fetch('font', fonts.font)
timer.customFont = LSM:Fetch('font', fonts.font)
timer.customFontSize = fonts.fontSize
timer.customFontOutline = fonts.fontOutline
else
......@@ -169,7 +170,7 @@ function E:CreateCooldownTimer(parent)
parent.timer = timer
local text = timer:CreateFontString(nil, 'OVERLAY')
text:SetPoint('CENTER', 1, 1)
text:Point('CENTER', 1, 1)
text:SetJustifyH('CENTER')
timer.text = text
......@@ -205,7 +206,7 @@ end
E.RegisteredCooldowns = {}
function E:OnSetCooldown(start, duration)
if (not self.forceDisabled) and (start and duration) and (duration > MIN_DURATION) then
if not self.forceDisabled and (start and duration) and (duration > MIN_DURATION) then
local timer = self.timer or E:CreateCooldownTimer(self)
timer.start = start
timer.duration = duration
......@@ -265,7 +266,7 @@ end
function E:UpdateCooldownOverride(module)
local cooldowns = (module and E.RegisteredCooldowns[module])
if (not cooldowns) or not next(cooldowns) then return end
if not cooldowns or not next(cooldowns) then return end
local blizzText
for _, parent in ipairs(cooldowns) do
......@@ -290,7 +291,7 @@ function E:UpdateCooldownOverride(module)
cd.text:FontTemplate(cd.customFont, cd.customFontSize, cd.customFontOutline)
elseif parent.CooldownOverride == 'auras' then
-- parent.auraType defined in `A:UpdateHeader` and `A:CreateIcon`
local font = E.Libs.LSM:Fetch('font', db.font)
local font = LSM:Fetch('font', db.font)
if font and parent.auraType then
local fontSize = db[parent.auraType] and db[parent.auraType].durationFontSize
if fontSize then
......
This diff is collapsed.
......@@ -5,7 +5,7 @@ local LibCompress = E.Libs.Compress
local LibBase64 = E.Libs.Base64
local _G = _G
local tonumber, type, gsub, pcall, loadstring = tonumber, type, gsub, pcall, loadstring
local tonumber, type, gsub, pairs, pcall, loadstring = tonumber, type, gsub, pairs, pcall, loadstring
local len, format, split, find = strlen, format, strsplit, strfind
local CreateFrame = CreateFrame
......@@ -34,10 +34,10 @@ function D:Initialize()
self.statusBar:CreateBackdrop()
self.statusBar:SetStatusBarTexture(E.media.normTex)
self.statusBar:SetStatusBarColor(0.95, 0.15, 0.15)
self.statusBar:SetSize(250, 18)
self.statusBar:Size(250, 18)
self.statusBar.text = self.statusBar:CreateFontString(nil, 'OVERLAY')
self.statusBar.text:FontTemplate()
self.statusBar.text:SetPoint('CENTER')
self.statusBar.text:Point('CENTER')
self.statusBar:Hide()
E:RegisterStatusBar(self.statusBar)
end
......
......@@ -59,28 +59,28 @@ function E:DropDown(list, frame, xOffset, yOffset)
end
frame.buttons[i]:Show()
frame.buttons[i]:SetHeight(BUTTON_HEIGHT)
frame.buttons[i]:SetWidth(BUTTON_WIDTH)
frame.buttons[i]:Height(BUTTON_HEIGHT)
frame.buttons[i]:Width(BUTTON_WIDTH)
frame.buttons[i].text:SetText(list[i].text)
frame.buttons[i].func = list[i].func
frame.buttons[i]:SetScript('OnClick', OnClick)
if i == 1 then
frame.buttons[i]:SetPoint('TOPLEFT', frame, 'TOPLEFT', PADDING, -PADDING)
frame.buttons[i]:Point('TOPLEFT', frame, 'TOPLEFT', PADDING, -PADDING)
else
frame.buttons[i]:SetPoint('TOPLEFT', frame.buttons[i-1], 'BOTTOMLEFT')
frame.buttons[i]:Point('TOPLEFT', frame.buttons[i-1], 'BOTTOMLEFT')
end
end
frame:SetHeight((#list * BUTTON_HEIGHT) + PADDING * 2)
frame:SetWidth(BUTTON_WIDTH + PADDING * 2)
frame:Height((#list * BUTTON_HEIGHT) + PADDING * 2)
frame:Width(BUTTON_WIDTH + PADDING * 2)
local UIScale = _G.UIParent:GetScale()
local x, y = GetCursorPosition()
x = x/UIScale
y = y/UIScale
frame:ClearAllPoints()
frame:SetPoint('TOPLEFT', _G.UIParent, 'BOTTOMLEFT', x + xOffset, y + yOffset)
frame:Point('TOPLEFT', _G.UIParent, 'BOTTOMLEFT', x + xOffset, y + yOffset)
ToggleFrame(frame)
end
......@@ -5,6 +5,7 @@ local _G = _G
local strmatch = strmatch
local function SetFont(obj, font, size, style, sr, sg, sb, sa, sox, soy, r, g, b)
if not obj then return end
obj:SetFont(font, size, style)
if sr and sg and sb then obj:SetShadowColor(sr, sg, sb, sa) end
if sox and soy then obj:SetShadowOffset(sox, soy) end
......@@ -27,11 +28,9 @@ function E:UpdateBlizzardFonts()
if E.private.general.replaceNameFont then _G.UNIT_NAME_FONT = NAMEFONT end
if E.private.general.replaceCombatFont then _G.DAMAGE_TEXT_FONT = COMBAT end
if E.private.general.replaceBlizzFonts then
--_G.NAMEPLATE_FONT = NAMEFONT
_G.STANDARD_TEXT_FONT = NORMAL
--_G.NAMEPLATE_FONT = NAMEFONT
--SetFont(_G.NumberFontNormal, LSM:Fetch('font', 'Homespun'), 10, 'MONOCHROMEOUTLINE', 1, 1, 1, 0, 0, 0)
--SetFont(_G.GameFontNormalSmall, NORMAL, 12, nil, nil, nil, nil, nil, nil, nil, unpack(E.media.rgbvaluecolor))
SetFont(_G.AchievementFont_Small, NORMAL, E.db.general.fontSize) -- Achiev dates
SetFont(_G.BossEmoteNormalHuge, NORMAL, 24) -- Talent Title
SetFont(_G.ChatBubbleFont, BUBBLE, E.private.general.chatBubbleFontSize, E.private.general.chatBubbleFontOutline)
......@@ -51,8 +50,9 @@ function E:UpdateBlizzardFonts()
SetFont(_G.Game15Font_o1, NORMAL, 15) -- CharacterStatsPane (ItemLevelFrame)
SetFont(_G.Game16Font, NORMAL, 16) -- Added in 7.3.5 used for ?
SetFont(_G.Game18Font, NORMAL, 18) -- MissionUI Bonus Chance
SetFont(_G.Game24Font, NORMAL, 24) -- Garrison Mission level (in detail frame)
SetFont(_G.Game24Font, NORMAL, 24) -- Garrison Mission level (in detail frame)
SetFont(_G.Game30Font, NORMAL, 30) -- Mission Level
SetFont(_G.Game40Font, NORMAL, 40)
SetFont(_G.Game42Font, NORMAL, 42) -- PVP Stuff
SetFont(_G.Game46Font, NORMAL, 46) -- Added in 7.3.5 used for ?
SetFont(_G.Game48Font, NORMAL, 48)
......@@ -64,6 +64,7 @@ function E:UpdateBlizzardFonts()
SetFont(_G.GameFontHighlightMedium, NORMAL, 15) -- Fix QuestLog Title mouseover
SetFont(_G.GameFontHighlightSmall2, NORMAL, E.db.general.fontSize) -- Skill or Recipe description on TradeSkill frame
SetFont(_G.GameFontNormalHuge2, NORMAL, 24) -- Mythic weekly best dungeon name
SetFont(_G.GameFontNormalLarge, NORMAL, 16)
SetFont(_G.GameFontNormalLarge2, NORMAL, 15) -- Garrison Follower Names
SetFont(_G.GameFontNormalMed1, NORMAL, 14) -- WoW Token Info
SetFont(_G.GameFontNormalMed2, NORMAL, E.db.general.fontSize*1.1) -- Quest tracker
......@@ -97,7 +98,7 @@ function E:UpdateBlizzardFonts()
SetFont(_G.SubZoneTextFont, NORMAL, 24, MONOCHROME..'OUTLINE') -- World Map(SubZone)
SetFont(_G.SubZoneTextString, NORMAL, 25, MONOCHROME..'OUTLINE')
SetFont(_G.SystemFont_Huge1, NORMAL, 20) -- Garrison Mission XP
SetFont(_G.SystemFont_Huge1_Outline, NORMAL, 18, MONOCHROME..'OUTLINE') -- Garrison Mission Chance
SetFont(_G.SystemFont_Huge1_Outline, NORMAL, 18, MONOCHROME..'OUTLINE') -- Garrison Mission Chance
SetFont(_G.SystemFont_Large, NORMAL, 15)
SetFont(_G.SystemFont_Med1, NORMAL, E.db.general.fontSize)
SetFont(_G.SystemFont_Med3, NORMAL, E.db.general.fontSize*1.1)
......@@ -114,7 +115,6 @@ function E:UpdateBlizzardFonts()
SetFont(_G.SystemFont_Shadow_Med2, NORMAL, 13 * 1.1) -- Shows Order resourses on OrderHallTalentFrame
SetFont(_G.SystemFont_Shadow_Med3, NORMAL, 13 * 1.1)
SetFont(_G.SystemFont_Shadow_Med3, NORMAL, E.db.general.fontSize*1.1)
SetFont(_G.SystemFont_Shadow_Outline_Huge2, NORMAL, 20, MONOCHROME..'OUTLINE')
SetFont(_G.SystemFont_Shadow_Small, NORMAL, E.db.general.fontSize*0.9)
SetFont(_G.SystemFont_Small, NORMAL, E.db.general.fontSize)
SetFont(_G.SystemFont_Tiny, NORMAL, E.db.general.fontSize)
......@@ -123,7 +123,6 @@ function E:UpdateBlizzardFonts()
SetFont(_G.ZoneTextString, NORMAL, 32, MONOCHROME..'OUTLINE')
SetFont(_G.Game10Font_o1, NORMAL, 10, 'OUTLINE')
SetFont(_G.SystemFont_Shadow_Huge4, NORMAL, 27, nil, nil, nil, nil, nil, 1, -1)
SetFont(_G.SystemFont_Shadow_Outline_Huge4, NORMAL, 27, 'OUTLINE', nil, nil, nil, nil, 1, -1)
SetFont(_G.Number11Font, NUMBER, 11)
SetFont(_G.Number12Font_o1, NUMBER, 12, 'OUTLINE')
SetFont(_G.Number13Font, NUMBER, 13)
......@@ -136,6 +135,6 @@ function E:UpdateBlizzardFonts()
SetFont(_G.Number18FontWhite, NUMBER, 18)
SetFont(_G.FriendsFont_11, NORMAL, 11)
SetFont(_G.SpellFont_Small, NORMAL, 10)
SetFont(_G.SubSpellFont, NORMAL, 10) -- Spellbook Sub Names
SetFont(_G.SubSpellFont, NORMAL, 10) -- Spellbook Sub Names
end
end
......@@ -67,10 +67,10 @@ function E:SetupChat(noDisplayMsg)
-- move general bottom left
if id == 1 then
frame:ClearAllPoints()
frame:SetPoint('BOTTOMLEFT', _G.LeftChatToggleButton, 'TOPLEFT', 1, 3)
frame:Point('BOTTOMLEFT', _G.LeftChatToggleButton, 'TOPLEFT', 1, 3)
elseif id == 3 then
frame:ClearAllPoints()
frame:SetPoint('BOTTOMLEFT', _G.RightChatDataPanel, 'TOPLEFT', 1, 3)
frame:Point('BOTTOMLEFT', _G.RightChatDataPanel, 'TOPLEFT', 1, 3)
end
FCF_SavePositionAndDimensions(frame)
......@@ -277,7 +277,7 @@ function E:SetupLayout(layout, noDataReset, noDisplayMsg)
E.db.chat.panelWidth = 472
E.db.chat.tabFontSize = 10
--DataTexts
E.db.datatexts.panels.LeftChatDataPanel[3] = 'Quick Join'
E.db.datatexts.panels.LeftChatDataPanel[3] = 'QuickJoin'
--General
E.db.general.bonusObjectivePosition = 'AUTO'
E.db.general.minimap.size = 220
......@@ -499,7 +499,7 @@ local function ResetAll()
ElvUIInstallFrame.Desc1:SetText('')
ElvUIInstallFrame.Desc2:SetText('')
ElvUIInstallFrame.Desc3:SetText('')
ElvUIInstallFrame:SetSize(550, 400)
ElvUIInstallFrame:Size(550, 400)
end
function E:SetPage(PageNum)
......@@ -656,7 +656,7 @@ function E:SetPage(PageNum)
InstallOption2Button:Show()
InstallOption2Button:SetScript('OnClick', InstallComplete)
InstallOption2Button:SetText(L["Finished"])
ElvUIInstallFrame:SetSize(550, 350)
ElvUIInstallFrame:Size(550, 350)
end
end
......@@ -678,8 +678,8 @@ end
function E:Install()
if not _G.InstallStepComplete then
local imsg = CreateFrame('Frame', 'InstallStepComplete', E.UIParent)
imsg:SetSize(418, 72)
imsg:SetPoint('TOP', 0, -190)
imsg:Size(418, 72)
imsg:Point('TOP', 0, -190)