Commit 95af8804 authored by Simpy's avatar Simpy 🐹

11.39

parents a6bb4c97 c885537e
......@@ -864,6 +864,13 @@ function E:Config_GetWindow()
return ConfigOpen and ConfigOpen.frame
end
local ConfigLogoTop
E.valueColorUpdateFuncs[function(_, r, b, g)
if ConfigLogoTop then
ConfigLogoTop:SetVertexColor(r, b, g)
end
end] = true
function E:Config_WindowClosed()
if not self.bottomHolder then return end
......@@ -876,6 +883,8 @@ function E:Config_WindowClosed()
self.closeButton:Hide()
self.originalClose:Show()
ConfigLogoTop = nil
E:StopElasticize(self.leftHolder.LogoTop)
E:StopElasticize(self.leftHolder.LogoBottom)
......@@ -894,9 +903,11 @@ function E:Config_WindowOpened(frame)
frame.closeButton:Show()
frame.originalClose:Hide()
frame.leftHolder.LogoTop:SetVertexColor(unpack(E.media.rgbvaluecolor))
ConfigLogoTop = frame.leftHolder.LogoTop
E:Elasticize(frame.leftHolder.LogoTop, 128, 64)
E:Elasticize(frame.leftHolder.LogoBottom, 128, 64)
frame.leftHolder.LogoTop:SetVertexColor(unpack(E.media.rgbvaluecolor))
local unskinned = not E.private.skins.ace3.enable
local offset = unskinned and 14 or 8
......
......@@ -412,6 +412,7 @@ function PI:RunInstall()
f.StepTitles = nil
f.StepTitlesColor = nil
f.StepTitlesColorSelected = nil
local db = self.Installs[1]
f.CurrentPage = 0
f.MaxPage = #(db.Pages)
......@@ -421,7 +422,8 @@ function PI:RunInstall()
f.Status.text:SetText(f.CurrentPage..' / '..f.MaxPage)
-- Logo
f.tutorialImage:SetTexture(db.tutorialImage or E.Media.Textures.LogoTop)
local LogoTop = db.tutorialImage or E.Media.Textures.LogoTop
f.tutorialImage:SetTexture(LogoTop)
f.tutorialImage:ClearAllPoints()
if db.tutorialImageSize then
f.tutorialImage:Size(db.tutorialImageSize[1], db.tutorialImageSize[2])
......@@ -435,32 +437,37 @@ function PI:RunInstall()
end
if db.tutorialImageVertexColor then
f.tutorialImage:SetVertexColor(unpack(db.tutorialImageVertexColor))
else
elseif LogoTop == E.Media.Textures.LogoTop then
f.tutorialImage:SetVertexColor(unpack(E.media.rgbvaluecolor))
else
f.tutorialImage:SetVertexColor(1, 1, 1)
end
--Alt Logo
f.tutorialImage2:SetTexture(db.tutorialImage2 or E.Media.Textures.LogoBottom)
f.tutorialImage2:ClearAllPoints()
if db.tutorialImage2Size then
f.tutorialImage2:Size(db.tutorialImage2Size[1], db.tutorialImage2Size[2])
else
f.tutorialImage2:Size(256, 128)
end
if db.tutorialImage2Point then
f.tutorialImage2:Point('BOTTOM', 0 + db.tutorialImage2Point[1], 70 + db.tutorialImage2Point[2])
else
f.tutorialImage2:Point('BOTTOM', 0, 70)
end
if db.tutorialImage2VertexColor then
f.tutorialImage2:SetVertexColor(unpack(db.tutorialImage2VertexColor))
else
f.tutorialImage2:SetVertexColor(1, 1, 1)
if LogoTop == E.Media.Textures.LogoTop or db.tutorialImage2 then
f.tutorialImage2:SetTexture(db.tutorialImage2 or E.Media.Textures.LogoBottom)
f.tutorialImage2:ClearAllPoints()
if db.tutorialImage2Size then
f.tutorialImage2:Size(db.tutorialImage2Size[1], db.tutorialImage2Size[2])
else
f.tutorialImage2:Size(256, 128)
end
if db.tutorialImage2Point then
f.tutorialImage2:Point('BOTTOM', 0 + db.tutorialImage2Point[1], 70 + db.tutorialImage2Point[2])
else
f.tutorialImage2:Point('BOTTOM', 0, 70)
end
if db.tutorialImage2VertexColor then
f.tutorialImage2:SetVertexColor(unpack(db.tutorialImage2VertexColor))
else
f.tutorialImage2:SetVertexColor(1, 1, 1)
end
end
f.Pages = db.Pages
PluginInstallFrame:Show()
f:Point('CENTER')
if db.StepTitles and #db.StepTitles == f.MaxPage then
f:Point('CENTER', E.UIParent, 'CENTER', -((db.StepTitleWidth or 140)/2), 0)
......@@ -479,8 +486,10 @@ function PI:RunInstall()
f.StepTitlesColor = db.StepTitlesColor
f.StepTitlesColorSelected = db.StepTitlesColorSelected
end
NextPage()
end
if #(self.Installs) > 1 then
f.pending:Show()
E:Flash(f.pending, 0.53, true)
......
This diff is collapsed.
## Interface: 80300
## Author: Elv, Simpy
## Version: 11.38
## Version: 11.39
## Title: |cff1784d1ElvUI|r
## Notes: User Interface replacement AddOn for World of Warcraft.
## SavedVariables: ElvDB, ElvPrivateDB
......
......@@ -3,7 +3,7 @@ local E = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileD
local L = E.Libs.ACL:NewLocale("ElvUI", "ruRU")
L[" |cff00ff00bound to |r"] = " |cff00ff00назначено для |r"
L["%s frame has a conflicting anchor point. Forcing the Buffs to be attached to the main unitframe."] = true
L["%s frame has a conflicting anchor point. Forcing the Buffs to be attached to the main unitframe."] = "Фрейм %s содержит конфликтующие точки крепления. Баффы будут принудительно закреплены на самом фрейме."
L["%s is attempting to share his filters with you. Would you like to accept the request?"] = "%s хочет передать Вам свои фильтры. Желаете ли Вы принять их?"
L["%s is attempting to share the profile %s with you. Would you like to accept the request?"] = "%s хочет передать Вам профиль %s. Желаете ли Вы принять его?"
L["%s: %s tried to call the protected function '%s'."] = "%s: %s tried to call the protected function '%s'."
......@@ -18,7 +18,7 @@ L["Accepting this will reset your Filter Priority lists for all auras on UnitFra
L["Additive Blend"] = "Аддитивное сешивание" --Check back later
L["Adjust the UI Scale to fit your screen, press the autoscale button to set the UI Scale automatically."] = "Измените масштаб интерфейса для вашего экрана. Нажмите автомасштаб, чтобы мы установили его сами."
L["AFK"] = "АФК"
L["Alliance: "] = true
L["Alliance: "] = "Альянс: "
L["All keybindings cleared for |cff00ff00%s|r."] = "Сброшены все назначения для |cff00ff00%s|r."
L["Alpha Key"] = "По прозрачности" --Check back later
L["Already Running.. Bailing Out!"] = "Уже выполняется.. Бобер, выдыхай!"
......@@ -110,7 +110,7 @@ L["ElvUI is five or more revisions out of date. You can download the newest vers
L["ElvUI is out of date. You can download the newest version from www.tukui.org. Get premium membership and have ElvUI automatically updated with the Tukui Client!"] = "ElvUI устарел. Вы можете скачать последнюю версию с www.tukui.org. С премиум аккаунтом ElvUI будет автоматически обновляться через TukUI клиент."
L["ElvUI needs to perform database optimizations please be patient."] = "ElvUI нужно провести оптимизацию базы данных. Подождите, пожалуйста."
L["ElvUI Plugin Installation"] = "Установка плагина ElvUI"
L["ElvUI Status"] = true
L["ElvUI Status"] = "Статус ElvUI"
L["ElvUI was updated while the game is still running. Please relaunch the game, as this is required for the files to be properly updated."] = "ElvUI обновился, пока игра была запущена. Перезапустите игру, чтобы обновления могли по человечески примениться."
L["Empty Slot"] = "Пустой слот"
L["Enable"] = "Включить"
......@@ -144,7 +144,7 @@ L["Home Protocol:"] = "Домашний протокол:"
L["Honor Bar"] = "Полоса Чести"
L["Honor Remaining:"] = "Осталось Чести"
L["Honor XP:"] = "Честь: "
L["Horde: "] = true
L["Horde: "] = "Орда: "
L["Hover your mouse over any actionbutton or spellbook button to bind it. Press the ESC key to clear the current actionbutton's keybinding."] = "Наведите мышку на любую кнопку панели команд или книги заклинаний, чтобы создать назначение. Нажатие ESC убирает текущее назначение."
L["HP"] = "+ Исцел."
L["HPS"] = "ИВС"
......@@ -162,7 +162,7 @@ L["INCOMPATIBLE_ADDON"] = "Аддон %s не совместим с модуле
L["Info/Controls"] = "Инфо/Контроль"
L["Installation Complete"] = "Установка завершена"
L["Invalid Target"] = "Неверная цель"
L["Interrupted %s's \124cff71d5ff\124Hspell:%d:0\124h[%s]\124h\124r!"] = true
L["Interrupted %s's \124cff71d5ff\124Hspell:%d:0\124h[%s]\124h\124r!"] = "Прерван %s. Сбито \124cff71d5ff\124Hspell:%d:0\124h[%s]\124h\124r!"
L["is looking for members"] = "ищет игроков"
L["It appears one of your AddOns have disabled the AddOn Blizzard_CompactRaidFrames. This can cause errors and other issues. The AddOn will now be re-enabled."] = "Похоже, что один из ваших аддонов отключил Blizzard_CompactRaidFrames. Это может вызвать ошибки и другие проблемы, мы рекомендуем включить. Включить аддоны Blizzard сейчас?"
L["Item level: %.2f"] = "Уровень предмета: %.2f"
......@@ -278,7 +278,7 @@ L["Setup Chat"] = "Настроить чат"
L["Setup CVars"] = "Сбросить настройки"
L["Shoulder"] = "Плечо"
L["Show/Hide Reagents"] = "Показать/скрыть материалы"
L["Shows a frame with needed info for support."] = true
L["Shows a frame with needed info for support."] = "Отображает окно с необходимой информацией для получения поддержки."
L["silverabbrev"] = "|cffc7c7cfс|r"
L["Skip Process"] = "Пропустить установку"
L["Sort Tab"] = "Сортировать вкладки"
......
......@@ -51,4 +51,4 @@ local function ValueColorUpdate(hex)
end
E.valueColorUpdateFuncs[ValueColorUpdate] = true
DT:RegisterDatatext('Bags', {"PLAYER_ENTERING_WORLD", "BAG_UPDATE"}, OnEvent, nil, OnClick, OnEnter, nil, L["Bags"])
DT:RegisterDatatext('Bags', {"BAG_UPDATE"}, OnEvent, nil, OnClick, OnEnter, nil, L["Bags"])
......@@ -173,4 +173,4 @@ local function OnLeave()
enteredFrame = false
end
DT:RegisterDatatext('Call to Arms', {"PLAYER_ENTERING_WORLD", "LFG_UPDATE_RANDOM_INFO"}, OnEvent, Update, OnClick, OnEnter, OnLeave, BATTLEGROUND_HOLIDAY)
DT:RegisterDatatext('Call to Arms', {"LFG_UPDATE_RANDOM_INFO"}, OnEvent, Update, OnClick, OnEnter, OnLeave, BATTLEGROUND_HOLIDAY)
......@@ -34,7 +34,7 @@ local function OnEvent(self, event, _, timeSeconds)
timerText = L["Arena"]
self.text:SetFormattedText(displayString, timerText, "00:00:00")
self:SetScript("OnUpdate", DelayOnUpdate)
elseif(event == "PLAYER_ENTERING_WORLD" or (event == "PLAYER_REGEN_ENABLED" and instanceType ~= "arena")) then
elseif(event == "PLAYER_REGEN_ENABLED" and instanceType ~= "arena") then
self:SetScript("OnUpdate", nil)
elseif(event == "PLAYER_REGEN_DISABLED" and instanceType ~= "arena") then
startTime = GetTime()
......@@ -57,4 +57,4 @@ local function ValueColorUpdate(hex)
end
E.valueColorUpdateFuncs[ValueColorUpdate] = true
DT:RegisterDatatext('Combat/Arena Time', {"START_TIMER", "PLAYER_ENTERING_WORLD", "PLAYER_REGEN_DISABLED", "PLAYER_REGEN_ENABLED"}, OnEvent, nil, nil, nil, nil, L["Combat/Arena Time"])
DT:RegisterDatatext('Combat/Arena Time', {"START_TIMER", "PLAYER_REGEN_DISABLED", "PLAYER_REGEN_ENABLED"}, OnEvent, nil, nil, nil, nil, L["Combat/Arena Time"])
......@@ -17,17 +17,15 @@ local configText = "ElvUI"
local reloadText = RELOADUI
local plugins, lastPanel
local function OnEvent(self, event)
local function OnEvent(self)
lastPanel = self
if event == "PLAYER_ENTERING_WORLD" then
for i = 1, GetNumAddOns() do
local name, _, _, enabled = GetAddOnInfo(i)
if enabled and strfind(name, "ElvUI") and not (name == "ElvUI") then
plugins = plugins or {}
local version = GetAddOnMetadata(i, "version")
plugins[name] = version
end
for i = 1, GetNumAddOns() do
local name, _, _, enabled = GetAddOnInfo(i)
if enabled and strfind(name, "ElvUI") and not (name == "ElvUI") then
plugins = plugins or {}
local version = GetAddOnMetadata(i, "version")
plugins[name] = version
end
end
......@@ -68,4 +66,4 @@ local function ValueColorUpdate(hex)
end
E.valueColorUpdateFuncs[ValueColorUpdate] = true
DT:RegisterDatatext('ElvUI Config', {'PLAYER_ENTERING_WORLD'}, OnEvent, nil, Click, OnEnter)
DT:RegisterDatatext('ElvUI Config', nil, OnEvent, nil, Click, OnEnter)
......@@ -40,4 +40,4 @@ local function ValueColorUpdate(hex)
end
E.valueColorUpdateFuncs[ValueColorUpdate] = true
DT:RegisterDatatext('Coords', {"LOADING_SCREEN_DISABLED","ZONE_CHANGED","ZONE_CHANGED_INDOORS","ZONE_CHANGED_NEW_AREA"}, OnEvent, Update, Click, nil, nil, L["Coords"], E.MapInfo)
DT:RegisterDatatext('Coords', {"LOADING_SCREEN_DISABLED", "ZONE_CHANGED", "ZONE_CHANGED_INDOORS", "ZONE_CHANGED_NEW_AREA"}, OnEvent, Update, Click, nil, nil, L["Coords"], E.MapInfo)
......@@ -108,5 +108,5 @@ local function OnEnter(self)
DT.tooltip:Show()
end
DT:RegisterDatatext('Currencies', {'PLAYER_ENTERING_WORLD', 'PLAYER_MONEY', 'SEND_MAIL_MONEY_CHANGED', 'SEND_MAIL_COD_CHANGED', 'PLAYER_TRADE_MONEY', 'TRADE_MONEY_CHANGED', 'CHAT_MSG_CURRENCY', 'CURRENCY_DISPLAY_UPDATE'}, OnEvent, nil, OnClick, OnEnter, nil, CURRENCY)
DT:RegisterDatatext('Currencies', {"PLAYER_MONEY", "SEND_MAIL_MONEY_CHANGED", "SEND_MAIL_COD_CHANGED", "PLAYER_TRADE_MONEY", "TRADE_MONEY_CHANGED", "CHAT_MSG_CURRENCY", "CURRENCY_DISPLAY_UPDATE"}, OnEvent, nil, OnClick, OnEnter, nil, CURRENCY)
......@@ -65,7 +65,7 @@ local function RegisterNewDT(currencyID)
--Add to internal storage, stored with name as key
CustomCurrencies[name] = {NAME = name, ID = currencyID, ICON = format("|T%s:16:16:0:0:64:64:4:60:4:60|t", icon), DISPLAY_STYLE = "ICON", USE_TOOLTIP = true, SHOW_MAX = false, DISPLAY_IN_MAIN_TOOLTIP = true}
--Register datatext
DT:RegisterDatatext(name, {'PLAYER_ENTERING_WORLD', 'CHAT_MSG_CURRENCY', 'CURRENCY_DISPLAY_UPDATE'}, OnEvent, nil, nil, OnEnter, nil, name)
DT:RegisterDatatext(name, {"CHAT_MSG_CURRENCY", "CURRENCY_DISPLAY_UPDATE"}, OnEvent, nil, nil, OnEnter, nil, name)
--Save info to persistent storage, stored with ID as key
E.global.datatexts.customCurrencies[currencyID] = CustomCurrencies[name]
--Get the currency index for this currency, so we can use it for a tooltip
......@@ -81,7 +81,7 @@ function DT:RegisterCustomCurrencyDT(currencyID)
--We called this in DT:Initialize, so load all the stored currency datatexts
for _, info in pairs(E.global.datatexts.customCurrencies) do
CustomCurrencies[info.NAME] = {NAME = info.NAME, ID = info.ID, ICON = info.ICON, DISPLAY_STYLE = info.DISPLAY_STYLE, USE_TOOLTIP = info.USE_TOOLTIP, SHOW_MAX = info.SHOW_MAX, DISPLAY_IN_MAIN_TOOLTIP = info.DISPLAY_IN_MAIN_TOOLTIP}
DT:RegisterDatatext(info.NAME, {'PLAYER_ENTERING_WORLD', 'CHAT_MSG_CURRENCY', 'CURRENCY_DISPLAY_UPDATE'}, OnEvent, nil, nil, OnEnter, nil, info.NAME)
DT:RegisterDatatext(info.NAME, {"CHAT_MSG_CURRENCY", "CURRENCY_DISPLAY_UPDATE"}, OnEvent, nil, nil, OnEnter, nil, info.NAME)
--Get the currency index for this currency, so we can use it for a tooltip
AddCurrencyNameToIndex(info.NAME)
end
......
......@@ -7,7 +7,7 @@ local time, max, strjoin = time, max, strjoin
local UnitGUID = UnitGUID
local CombatLogGetCurrentEventInfo = CombatLogGetCurrentEventInfo
local lastSegment, playerID, petID = 0
local lastSegment, petGUID = 0
local timeStamp, combatTime, DMGTotal, lastDMGAmount = 0, 0, 0, 0
local displayString, lastPanel = ''
local events = {
......@@ -37,8 +37,8 @@ end
local function OnEvent(self, event)
lastPanel = self
if event == "PLAYER_ENTERING_WORLD" then
playerID = E.myguid
if event == 'UNIT_PET' then
petGUID = UnitGUID("pet")
elseif event == 'PLAYER_REGEN_DISABLED' or event == "PLAYER_LEAVE_COMBAT" then
local now = time()
if now - lastSegment > 20 then --time since the last segment
......@@ -52,7 +52,7 @@ local function OnEvent(self, event)
-- only use events from the player
local overKill
if sourceGUID == playerID or sourceGUID == petID then
if sourceGUID == E.myguid or sourceGUID == petGUID then
if timeStamp == 0 then timeStamp = timestamp end
lastSegment = timeStamp
combatTime = timestamp - timeStamp
......@@ -64,8 +64,6 @@ local function OnEvent(self, event)
if arg16 == nil then overKill = 0 else overKill = arg16 end
DMGTotal = DMGTotal + max(0, lastDMGAmount - overKill)
end
elseif event == "UNIT_PET" then
petID = UnitGUID("pet")
end
GetDPS(self)
......@@ -85,4 +83,4 @@ local function ValueColorUpdate(hex)
end
E.valueColorUpdateFuncs[ValueColorUpdate] = true
DT:RegisterDatatext('DPS', {'PLAYER_ENTERING_WORLD', 'COMBAT_LOG_EVENT_UNFILTERED', "PLAYER_LEAVE_COMBAT", 'PLAYER_REGEN_DISABLED', 'UNIT_PET'}, OnEvent, nil, OnClick, nil, nil, STAT_DPS_SHORT)
DT:RegisterDatatext('DPS', {"UNIT_PET", "COMBAT_LOG_EVENT_UNFILTERED", "PLAYER_LEAVE_COMBAT", "PLAYER_REGEN_DISABLED"}, OnEvent, nil, OnClick, nil, nil, STAT_DPS_SHORT)
This diff is collapsed.
......@@ -72,4 +72,4 @@ local function ValueColorUpdate(hex)
end
E.valueColorUpdateFuncs[ValueColorUpdate] = true
DT:RegisterDatatext('Durability', {'PLAYER_ENTERING_WORLD', "UPDATE_INVENTORY_DURABILITY", "MERCHANT_SHOW"}, OnEvent, nil, Click, OnEnter, nil, DURABILITY)
DT:RegisterDatatext('Durability', {"UPDATE_INVENTORY_DURABILITY", "MERCHANT_SHOW"}, OnEvent, nil, Click, OnEnter, nil, DURABILITY)
......@@ -570,4 +570,4 @@ local function ValueColorUpdate(hex)
end
E.valueColorUpdateFuncs[ValueColorUpdate] = true
DT:RegisterDatatext('Friends', {'PLAYER_ENTERING_WORLD', "BN_FRIEND_ACCOUNT_ONLINE", "BN_FRIEND_ACCOUNT_OFFLINE", "BN_FRIEND_INFO_CHANGED", "FRIENDLIST_UPDATE", "CHAT_MSG_SYSTEM"}, OnEvent, nil, Click, OnEnter, nil, FRIENDS)
DT:RegisterDatatext('Friends', {"BN_FRIEND_ACCOUNT_ONLINE", "BN_FRIEND_ACCOUNT_OFFLINE", "BN_FRIEND_INFO_CHANGED", "FRIENDLIST_UPDATE", "CHAT_MSG_SYSTEM"}, OnEvent, nil, Click, OnEnter, nil, FRIENDS)
......@@ -155,4 +155,4 @@ local function OnEvent(self, event)
self.text:SetFormattedText("%s %s %s %s", GARRISON_ICON, numGarrisonResources, OIL_ICON, numOil)
end
DT:RegisterDatatext('Garrison', {"PLAYER_ENTERING_WORLD", "CURRENCY_DISPLAY_UPDATE", "GARRISON_LANDINGPAGE_SHIPMENTS"}, OnEvent, nil, OnClick, OnEnter, nil, L["Garrison"])
DT:RegisterDatatext('Garrison', {"CURRENCY_DISPLAY_UPDATE", "GARRISON_LANDINGPAGE_SHIPMENTS"}, OnEvent, nil, OnClick, OnEnter, nil, L["Garrison"])
......@@ -167,4 +167,4 @@ local function OnEnter(self)
DT.tooltip:Show()
end
DT:RegisterDatatext('Gold', {'PLAYER_ENTERING_WORLD', 'PLAYER_MONEY', 'SEND_MAIL_MONEY_CHANGED', 'SEND_MAIL_COD_CHANGED', 'PLAYER_TRADE_MONEY', 'TRADE_MONEY_CHANGED'}, OnEvent, nil, Click, OnEnter, nil, L["Gold"])
DT:RegisterDatatext('Gold', {"PLAYER_MONEY", "SEND_MAIL_MONEY_CHANGED", "SEND_MAIL_COD_CHANGED", "PLAYER_TRADE_MONEY", "TRADE_MONEY_CHANGED"}, OnEvent, nil, Click, OnEnter, nil, L["Gold"])
......@@ -126,8 +126,9 @@ end
local FRIEND_ONLINE = select(2, strsplit(" ", _G.ERR_FRIEND_ONLINE_SS, 2))
local resendRequest = false
local eventHandlers = {
['CHAT_MSG_SYSTEM'] = function(self, arg1)
if(FRIEND_ONLINE ~= nil and arg1 and strfind(arg1, FRIEND_ONLINE)) then
["PLAYER_GUILD_UPDATE"] = C_GuildInfo_GuildRoster,
["CHAT_MSG_SYSTEM"] = function(_, arg1)
if FRIEND_ONLINE ~= nil and arg1 and strfind(arg1, FRIEND_ONLINE) then
resendRequest = true
end
end,
......@@ -152,20 +153,18 @@ local eventHandlers = {
end
end
end,
["PLAYER_GUILD_UPDATE"] = C_GuildInfo_GuildRoster,
-- our guild message of the day changed
["GUILD_MOTD"] = function (self, arg1)
guildMotD = arg1
end,
["ELVUI_FORCE_RUN"] = E.noop,
["ELVUI_COLOR_UPDATE"] = E.noop,
end
}
local function OnEvent(self, event, ...)
lastPanel = self
if IsInGuild() then
eventHandlers[event](self, ...)
local func = eventHandlers[event]
if func then func(self, ...) end
self.text:SetFormattedText(displayString, #guildTable)
else
......@@ -310,4 +309,4 @@ local function ValueColorUpdate(hex)
end
E.valueColorUpdateFuncs[ValueColorUpdate] = true
DT:RegisterDatatext('Guild', {'PLAYER_ENTERING_WORLD', 'CHAT_MSG_SYSTEM', "GUILD_ROSTER_UPDATE", "PLAYER_GUILD_UPDATE", "GUILD_MOTD"}, OnEvent, nil, Click, OnEnter, nil, GUILD)
DT:RegisterDatatext('Guild', {"CHAT_MSG_SYSTEM", "GUILD_ROSTER_UPDATE", "PLAYER_GUILD_UPDATE", "GUILD_MOTD"}, OnEvent, nil, Click, OnEnter, nil, GUILD)
......@@ -8,7 +8,7 @@ local UnitGUID = UnitGUID
local CombatLogGetCurrentEventInfo = CombatLogGetCurrentEventInfo
local timeStamp, combatTime, healTotal = 0, 0, 0
local lastSegment, playerID, petID = 0
local lastSegment, petGUID = 0
local displayString, lastPanel = ''
local events = {
SPELL_HEAL = true,
......@@ -32,8 +32,8 @@ end
local function OnEvent(self, event)
lastPanel = self
if event == 'PLAYER_ENTERING_WORLD' then
playerID = E.myguid
if event == 'UNIT_PET' then
petGUID = UnitGUID("pet")
elseif event == 'PLAYER_REGEN_DISABLED' or event == "PLAYER_LEAVE_COMBAT" then
local now = time()
if now - lastSegment > 20 then
......@@ -44,14 +44,12 @@ local function OnEvent(self, event)
local timestamp, Event, _, sourceGUID, _, _, _, _, _, _, _, _, _, _, lastHealAmount, overHeal = CombatLogGetCurrentEventInfo()
if not events[Event] then return end
if sourceGUID == playerID or sourceGUID == petID then
if sourceGUID == E.myguid or sourceGUID == petGUID then
if timeStamp == 0 then timeStamp = timestamp end
lastSegment = timeStamp
combatTime = timestamp - timeStamp
healTotal = healTotal + max(0, lastHealAmount - overHeal)
end
elseif event == "UNIT_PET" then
petID = UnitGUID("pet")
end
GetHPS(self)
......@@ -71,4 +69,4 @@ local function ValueColorUpdate(hex)
end
E.valueColorUpdateFuncs[ValueColorUpdate] = true
DT:RegisterDatatext('HPS', {'PLAYER_ENTERING_WORLD', 'COMBAT_LOG_EVENT_UNFILTERED', "PLAYER_LEAVE_COMBAT", 'PLAYER_REGEN_DISABLED', 'UNIT_PET'}, OnEvent, nil, OnClick, nil, nil, L["HPS"])
DT:RegisterDatatext('HPS', {"UNIT_PET", "COMBAT_LOG_EVENT_UNFILTERED", "PLAYER_LEAVE_COMBAT", "PLAYER_REGEN_DISABLED"}, OnEvent, nil, OnClick, nil, nil, L["HPS"])
......@@ -240,4 +240,4 @@ local function ValueColorUpdate()
end
E.valueColorUpdateFuncs[ValueColorUpdate] = true
DT:RegisterDatatext("BfA Missions", {"PLAYER_ENTERING_WORLD", "CURRENCY_DISPLAY_UPDATE", "GARRISON_LANDINGPAGE_SHIPMENTS"}, OnEvent, nil, OnClick, OnEnter, nil, L["BfA Missions"])
DT:RegisterDatatext("BfA Missions", {"CURRENCY_DISPLAY_UPDATE", "GARRISON_LANDINGPAGE_SHIPMENTS"}, OnEvent, nil, OnClick, OnEnter, nil, L["BfA Missions"])
......@@ -180,4 +180,4 @@ local function OnEvent(self, event)
self.text:SetFormattedText("%s %s", GARRISON_ICON, numGarrisonResources)
end
DT:RegisterDatatext('Orderhall', {"PLAYER_ENTERING_WORLD", "CURRENCY_DISPLAY_UPDATE", "GARRISON_LANDINGPAGE_SHIPMENTS", "GARRISON_TALENT_UPDATE", "GARRISON_TALENT_COMPLETE"}, OnEvent, nil, OnClick, OnEnter)
DT:RegisterDatatext('Orderhall', {"CURRENCY_DISPLAY_UPDATE", "GARRISON_LANDINGPAGE_SHIPMENTS", "GARRISON_TALENT_UPDATE", "GARRISON_TALENT_COMPLETE"}, OnEvent, nil, OnClick, OnEnter)
......@@ -105,12 +105,12 @@ local function throttle()
delayed = nil
end
local function OnEvent(self)
local function OnEvent(self, event)
if panel ~= self then panel = self end
if delayed then return end
-- use a nonarg passing function, so that it goes through c_timer instead of the waitframe
delayed = E:Delay(1, throttle)
delayed = E:Delay(event == 'ELVUI_FORCE_UPDATE' and 0 or 1, throttle)
end
local function ValueColorUpdate(hex)
......@@ -119,4 +119,4 @@ local function ValueColorUpdate(hex)
end
E.valueColorUpdateFuncs[ValueColorUpdate] = true
DT:RegisterDatatext('Quick Join', {"SOCIAL_QUEUE_UPDATE", "PLAYER_ENTERING_WORLD"}, OnEvent, nil, ToggleQuickJoinPanel, OnEnter, nil, QUICK_JOIN)
DT:RegisterDatatext('Quick Join', {"SOCIAL_QUEUE_UPDATE"}, OnEvent, nil, ToggleQuickJoinPanel, OnEnter, nil, QUICK_JOIN)
......@@ -198,4 +198,4 @@ local function ValueColorUpdate()
end
E.valueColorUpdateFuncs[ValueColorUpdate] = true
DT:RegisterDatatext('Talent/Loot Specialization',{"PLAYER_ENTERING_WORLD", "CHARACTER_POINTS_CHANGED", "PLAYER_TALENT_UPDATE", "ACTIVE_TALENT_GROUP_CHANGED", 'PLAYER_LOOT_SPEC_UPDATED'}, OnEvent, nil, OnClick, OnEnter, nil, L["Talent/Loot Specialization"])
DT:RegisterDatatext('Talent/Loot Specialization', {"CHARACTER_POINTS_CHANGED", "PLAYER_TALENT_UPDATE", "ACTIVE_TALENT_GROUP_CHANGED", "PLAYER_LOOT_SPEC_UPDATED"}, OnEvent, nil, OnClick, OnEnter, nil, L["Talent/Loot Specialization"])
......@@ -35,4 +35,4 @@ end
localizedName - localized name of the datetext
]]
DT:RegisterDatatext('DTName', {'PLAYER_ENTERING_WORLD'}, OnEvent, Update, Click, OnEnter)
DT:RegisterDatatext('DTName', {"EVENT1", "EVENT2", "EVENT3"}, OnEvent, Update, Click, OnEnter)
......@@ -2,16 +2,25 @@ local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, Private
local S = E:GetModule('Skins')
local _G = _G
local gsub = gsub
local GetAddOnInfo = GetAddOnInfo
local GetAddOnEnableState = GetAddOnEnableState
local UIDropDownMenu_GetSelectedValue = UIDropDownMenu_GetSelectedValue
local hooksecurefunc = hooksecurefunc
function S:AddonList()
if not (E.private.skins.blizzard.enable and E.private.skins.blizzard.addonManager) then return end
local AddonList = _G.AddonList
local maxShown = _G.MAX_ADDONS_DISPLAYED
local AddonCharacterDropDown = _G.AddonCharacterDropDown
S:HandlePortraitFrame(AddonList, true)
S:HandleButton(AddonList.EnableAllButton, true)
S:HandleButton(AddonList.DisableAllButton, true)
S:HandleButton(AddonList.OkayButton, true)
S:HandleButton(AddonList.CancelButton, true)
S:HandleDropDownBox(_G.AddonCharacterDropDown, 165)
S:HandleDropDownBox(AddonCharacterDropDown, 165)
S:HandleScrollBar(_G.AddonListScrollFrameScrollBar)
S:HandleCheckBox(_G.AddonListForceLoad)
_G.AddonListForceLoad:Size(26, 26)
......@@ -21,10 +30,48 @@ function S:AddonList()
_G.AddonListScrollFrame.backdrop:Point('TOPLEFT', -14, 0)
_G.AddonListScrollFrame.backdrop:Point('BOTTOMRIGHT', 0, -1)
for i = 1, _G.MAX_ADDONS_DISPLAYED do
for i = 1, maxShown do
S:HandleCheckBox(_G["AddonListEntry"..i.."Enabled"], nil, nil, true)
S:HandleButton(_G["AddonListEntry"..i].LoadAddonButton)
end
local font = E.Media.Fonts.Expressway
hooksecurefunc('AddonList_Update', function()
for i = 1, maxShown do
local index = AddonList.offset + i
local entry = _G["AddonListEntry"..i]
local string = _G["AddonListEntry"..i.."Title"]
local name, title, _, loadable, reason = GetAddOnInfo(index)
-- Get the character from the current list (nil is all characters)
local character = UIDropDownMenu_GetSelectedValue(AddonCharacterDropDown)
if character == true then character = nil end
local checkboxState = GetAddOnEnableState(character, index)
local enabled = checkboxState > 0
string:FontTemplate(font, 13, 'NONE')
entry.Status:FontTemplate(font, 11, 'NONE')
entry.Reload:FontTemplate(font, 11, 'NONE')
entry.Reload:SetTextColor(1.0, 0.6, 0.2)
entry.LoadAddonButton.Text:FontTemplate(font, 11, 'NONE')
if loadable or (enabled and (reason == "DEP_DEMAND_LOADED" or reason == "DEMAND_LOADED")) then
string:SetTextColor(0.9, 0.9, 0.9)
elseif enabled and reason ~= "DEP_DISABLED" then
string:SetTextColor(1.0, 0.2, 0.2)
else
string:SetTextColor(0.3, 0.3, 0.3)
end
if not enabled then
string:SetText(gsub(title or name, '|c%x%x%x%x%x%x%x%x(.-)|?r?','%1'))
entry.Status:SetTextColor(1.0, 0.2, 0.2)
else
entry.Status:SetTextColor(1.0, 1.0, 0.2)
end
end
end)
end
S:AddCallback('AddonList')
......@@ -3,7 +3,7 @@ local E, L, V, P, G = unpack(select(2, ...)) --Import: Engine, Locales, PrivateD
--Global Settings
G.general = {
UIScale = 0.64,
version = 11.38,
version = 11.39,
locale = E:GetLocale(),
eyefinity = false,
smallerWorldMap = true,
......
......@@ -203,7 +203,6 @@ function E:OnInitialize()
end
local GameMenuButton = CreateFrame('Button', nil, GameMenuFrame, 'GameMenuButtonTemplate')
GameMenuButton:SetText(format('%s%s|r', self.media.hexvaluecolor, E.name))
GameMenuButton:SetScript('OnClick', function() E:ToggleOptionsUI() HideUIPanel(GameMenuFrame) end)
GameMenuFrame[E.name] = GameMenuButton
......@@ -219,12 +218,16 @@ end
function E:PositionGameMenuButton()
GameMenuFrame.Header.Text:SetTextColor(unpack(E.media.rgbvaluecolor))
GameMenuFrame:SetHeight(GameMenuFrame:GetHeight() + GameMenuButtonLogout:GetHeight() - 4)
local button = GameMenuFrame[E.name]
button:SetText(format('%s%s|r', E.media.hexvaluecolor, E.name))
local _, relTo, _, _, offY = GameMenuButtonLogout:GetPoint()
if relTo ~= GameMenuFrame[E.name] then
GameMenuFrame[E.name]:ClearAllPoints()
GameMenuFrame[E.name]:Point('TOPLEFT', relTo, 'BOTTOMLEFT', 0, -1)
if relTo ~= button then
button:ClearAllPoints()
button:Point('TOPLEFT', relTo, 'BOTTOMLEFT', 0, -1)
GameMenuButtonLogout:ClearAllPoints()
GameMenuButtonLogout:Point('TOPLEFT', GameMenuFrame[E.name], 'BOTTOMLEFT', 0, offY)
GameMenuButtonLogout:Point('TOPLEFT', button, 'BOTTOMLEFT', 0, offY)
end
end
......
## Interface: 80300
## Author: Elv
## Version: 1.07
## Title: |cff1784d1ElvUI OptionsUI|r
## Title: |cff1784d1ElvUI|r |cfd9b9b9bOptionsUI|r
## Notes: Options for ElvUI.
## RequiredDeps: ElvUI
## LoadOnDemand: 1
......
......@@ -824,7 +824,7 @@ E.Options.args.general = {