Commit 4c242d75 authored by Benik's avatar Benik

Merge remote-tracking branch 'origin/development'

parents 78c477be 18fbbee3
3.91 (Jul 18, 2020)
*Added custom visibility option for the Custom Panels
*Fixed Custom Panels creation
*Fixed Chat strata issue after leaving flightMode
*Fixed Chat EditBox when assigned on the Middle Datatext
*Blacklisted some DTs that shouldn't be styled
*Removed my own BfA Missions, OrderHall and Garrison datatexts
*Added Missions (BenikUI) datatext. It's an edited ElvUI version and has the previous looks
*Install and profile adjustments after altering BenikUI Missions datatexts
*Fixed a datatext error when Style is disabled
*Fixed ElvUI Chat Datatext glitch when leaving flightMode
*Fixed chat datatext style error
3.9 (Jul 9, 2020)
*Fix Role Icons
*Added my favorite Kringel texture. Credit: Kringel <3 - under permission
......
## Interface: 80300
## Author: Benik
## Version: 3.9
## Version: 3.91
## Title: |cff1784d1ElvUI|r |cff00c0faBenikUI|r
## Notes: an ElvUI 11+ decorative/enhancement edit
## RequiredDeps: ElvUI
......
......@@ -1950,26 +1950,26 @@ local function SetupDataTexts(role)
if BUI.LP then
E.db["datatexts"]["panels"]["LocPlusRightDT"][1] = 'Time'
E.db["datatexts"]["panels"]["LocPlusLeftDT"][1] = 'Primary Stat'
E.db["datatexts"]["panels"]["LocPlusLeftDT"][1] = 'Movement Speed'
E.DataTexts:UpdatePanelInfo('LocPlusRightDT')
E.DataTexts:UpdatePanelInfo('LocPlusLeftDT')
end
if role == 'tank' then
E.db["datatexts"]["panels"]["BuiLeftChatDTPanel"][1] = 'Attack Power'
E.db["datatexts"]["panels"]["BuiLeftChatDTPanel"][1] = 'Primary Stat'
E.db["datatexts"]["panels"]["BuiMiddleDTPanel"][1] = 'Avoidance'
E.db["datatexts"]["panels"]["BuiMiddleDTPanel"][3] = 'Armor'
elseif role == 'dpsMelee' then
E.db["datatexts"]["panels"]["BuiLeftChatDTPanel"][1] = 'Attack Power'
elseif role == 'dpsMelee' or 'dpsCaster' then
E.db["datatexts"]["panels"]["BuiLeftChatDTPanel"][1] = 'Primary Stat'
E.db["datatexts"]["panels"]["BuiMiddleDTPanel"][1] = 'Haste'
E.db["datatexts"]["panels"]["BuiMiddleDTPanel"][3] = 'Crit Chance'
elseif role == 'healer' or 'dpsCaster' then
E.db["datatexts"]["panels"]["BuiLeftChatDTPanel"][1] = 'Spell/Heal Power'
elseif role == 'healer' then
E.db["datatexts"]["panels"]["BuiLeftChatDTPanel"][1] = 'Primary Stat'
E.db["datatexts"]["panels"]["BuiMiddleDTPanel"][1] = 'Haste'
E.db["datatexts"]["panels"]["BuiMiddleDTPanel"][3] = 'Crit Chance'
E.db["datatexts"]["panels"]["BuiMiddleDTPanel"][3] = 'Mana Regen'
end
E.db["datatexts"]["panels"]["BuiLeftChatDTPanel"][2] = 'BfA Missions (BenikUI)'
E.db["datatexts"]["panels"]["BuiLeftChatDTPanel"][2] = 'Missions (BenikUI)'
E.db["datatexts"]["panels"]["BuiLeftChatDTPanel"][3] = 'BuiMail'
E.db["datatexts"]["panels"]["BuiRightChatDTPanel"][1] = 'Spec Switch (BenikUI)'
......
......@@ -27,8 +27,8 @@ P['general']['minimap']['benikuiStyle'] = true
-- Datatexts
P['datatexts']['panels']['BuiLeftChatDTPanel'] = {
[1] = 'Spell/Heal Power',
[2] = 'BfA Missions (BenikUI)',
[1] = 'Primary Stat',
[2] = 'Missions (BenikUI)',
[3] = 'BuiMail',
}
......@@ -222,8 +222,8 @@ P['benikui'] = {
-- Datatexts
P.datatexts.panels.BuiLeftChatDTPanel = {
[1] = 'Attack Power',
[2] = 'BfA Missions (BenikUI)',
[1] = 'Primary Stat',
[2] = 'Missions',
[3] = 'BuiMail',
}
......
......@@ -63,29 +63,10 @@ local bbuttons = {}
function mod:ToggleBuiDts()
local db = E.db.benikui.datatexts.chat
local edb = E.db.datatexts
if edb.leftChatPanel or edb.rightChatPanel then
db.enable = false
BuiLeftChatDTPanel:Hide()
BuiRightChatDTPanel:Hide()
end
if db.enable then
if db.showChatDt == 'SHOWBOTH' then
BuiLeftChatDTPanel:Show()
BuiRightChatDTPanel:Show()
elseif db.showChatDt == 'LEFT' then
if not edb.leftChatPanel then
BuiLeftChatDTPanel:Show()
end
BuiRightChatDTPanel:Hide()
elseif db.showChatDt == 'RIGHT' then
BuiLeftChatDTPanel:Hide()
if not edb.rightChatPanel then
BuiRightChatDTPanel:Show()
end
end
BuiLeftChatDTPanel:Show()
BuiRightChatDTPanel:Show()
else
BuiLeftChatDTPanel:Hide()
BuiRightChatDTPanel:Hide()
......@@ -455,8 +436,8 @@ function mod:CreateLayout()
ElvUI_TopPanel:SetScript('OnShow', Panel_OnShow)
ElvUI_TopPanel:SetFrameLevel(0)
LeftChatPanel.backdrop:Style('Outside', 'LeftChatPanel_Bui') -- keeping the names. Maybe use them as rep or xp bars... dunno... yet
RightChatPanel.backdrop:Style('Outside', 'RightChatPanel_Bui')
LeftChatPanel.backdrop:Style('Outside')
RightChatPanel.backdrop:Style('Outside')
if BUI.ShadowMode then
MinimapPanel:CreateSoftShadow()
......
......@@ -39,6 +39,7 @@ L['Click to show the Addon List'] = "Klicken um die AddOn-Liste zu zeigen"
L['Create'] = "Erstelle"
L["Type a unique name for the new panel. \n|cff00c0faNote: 'BenikUI_' will be added at the beginning, to ensure uniqueness|r"] = "Gib einen einzigartigen Namen für das neue Panel ein. \n|cff00c0faHinweis: 'BenikUI_' wird am Anfang hinzugefügt um die Einzigarigkeit zu gewährleisten|r"
L["The Custom Panel name |cff00c0fa%s|r already exists. Please choose another one."] = "Der Name |cff00c0fa%s|r von einem Benutzerdefiniertem Panel existiert bereits. Bitte wähle einen anderen."
L["This works like a macro, you can run different situations to get the panel to show/hide differently.\n Example: '[combat] show;hide'"] = true
L["Hide in Pet Battle"] = "Verstecke in Haustiefkämpfen"
L["Hide In Combat"] = "Verstecke im Kampf"
L["Name Tooltip"] = "Namenstooltip"
......
......@@ -40,6 +40,7 @@ L['Click to show the Addon List'] = true
L['Create'] = true
L["Type a unique name for the new panel. \n|cff00c0faNote: 'BenikUI_' will be added at the beginning, to ensure uniqueness|r"] = true
L["The Custom Panel name |cff00c0fa%s|r already exists. Please choose another one."] = true
L["This works like a macro, you can run different situations to get the panel to show/hide differently.\n Example: '[combat] show;hide'"] = true
L["Hide in Pet Battle"] = true
L["Hide In Combat"] = true
L["Name Tooltip"] = true
......
......@@ -39,6 +39,7 @@ L['Click to show the Addon List'] = true
L['Create'] = true
L["Type a unique name for the new panel. \n|cff00c0faNote: 'BenikUI_' will be added at the beginning, to ensure uniqueness|r"] = true
L["The Custom Panel name |cff00c0fa%s|r already exists. Please choose another one."] = true
L["This works like a macro, you can run different situations to get the panel to show/hide differently.\n Example: '[combat] show;hide'"] = true
L["Hide in Pet Battle"] = true
L["Hide In Combat"] = true
L["Name Tooltip"] = true
......
......@@ -39,6 +39,7 @@ L['Click to show the Addon List'] = true
L['Create'] = true
L["Type a unique name for the new panel. \n|cff00c0faNote: 'BenikUI_' will be added at the beginning, to ensure uniqueness|r"] = true
L["The Custom Panel name |cff00c0fa%s|r already exists. Please choose another one."] = true
L["This works like a macro, you can run different situations to get the panel to show/hide differently.\n Example: '[combat] show;hide'"] = true
L["Hide in Pet Battle"] = true
L["Hide In Combat"] = true
L["Name Tooltip"] = true
......
......@@ -39,6 +39,7 @@ L['Click to show the Addon List'] = true
L['Create'] = true
L["Type a unique name for the new panel. \n|cff00c0faNote: 'BenikUI_' will be added at the beginning, to ensure uniqueness|r"] = true
L["The Custom Panel name |cff00c0fa%s|r already exists. Please choose another one."] = true
L["This works like a macro, you can run different situations to get the panel to show/hide differently.\n Example: '[combat] show;hide'"] = true
L["Hide in Pet Battle"] = true
L["Hide In Combat"] = true
L["Name Tooltip"] = true
......
......@@ -39,6 +39,7 @@ L['Click to show the Addon List'] = true
L['Create'] = true
L["Type a unique name for the new panel. \n|cff00c0faNote: 'BenikUI_' will be added at the beginning, to ensure uniqueness|r"] = true
L["The Custom Panel name |cff00c0fa%s|r already exists. Please choose another one."] = true
L["This works like a macro, you can run different situations to get the panel to show/hide differently.\n Example: '[combat] show;hide'"] = true
L["Hide in Pet Battle"] = true
L["Hide In Combat"] = true
L["Name Tooltip"] = true
......
......@@ -39,6 +39,7 @@ L['Click to show the Addon List'] = true
L['Create'] = true
L["Type a unique name for the new panel. \n|cff00c0faNote: 'BenikUI_' will be added at the beginning, to ensure uniqueness|r"] = true
L["The Custom Panel name |cff00c0fa%s|r already exists. Please choose another one."] = true
L["This works like a macro, you can run different situations to get the panel to show/hide differently.\n Example: '[combat] show;hide'"] = true
L["Hide in Pet Battle"] = true
L["Hide In Combat"] = true
L["Name Tooltip"] = true
......
......@@ -39,6 +39,7 @@ L['Click to show the Addon List'] = true
L['Create'] = true
L["Type a unique name for the new panel. \n|cff00c0faNote: 'BenikUI_' will be added at the beginning, to ensure uniqueness|r"] = true
L["The Custom Panel name |cff00c0fa%s|r already exists. Please choose another one."] = true
L["This works like a macro, you can run different situations to get the panel to show/hide differently.\n Example: '[combat] show;hide'"] = true
L["Hide in Pet Battle"] = true
L["Hide In Combat"] = true
L["Name Tooltip"] = true
......
......@@ -39,6 +39,7 @@ L['Click to show the Addon List'] = true
L['Create'] = true
L["Type a unique name for the new panel. \n|cff00c0faNote: 'BenikUI_' will be added at the beginning, to ensure uniqueness|r"] = true
L["The Custom Panel name |cff00c0fa%s|r already exists. Please choose another one."] = true
L["This works like a macro, you can run different situations to get the panel to show/hide differently.\n Example: '[combat] show;hide'"] = true
L["Hide in Pet Battle"] = true
L["Hide In Combat"] = true
L["Name Tooltip"] = true
......
......@@ -39,6 +39,7 @@ L['Click to show the Addon List'] = true
L['Create'] = true
L["Type a unique name for the new panel. \n|cff00c0faNote: 'BenikUI_' will be added at the beginning, to ensure uniqueness|r"] = true
L["The Custom Panel name |cff00c0fa%s|r already exists. Please choose another one."] = true
L["This works like a macro, you can run different situations to get the panel to show/hide differently.\n Example: '[combat] show;hide'"] = true
L["Hide in Pet Battle"] = true
L["Hide In Combat"] = true
L["Name Tooltip"] = true
......
......@@ -2,6 +2,7 @@
local CH = E:GetModule('Chat')
local BL = BUI:GetModule('Layout')
local FM = BUI:GetModule('FlightMode')
local mod = BUI:NewModule('Chat', 'AceHook-3.0', 'AceEvent-3.0')
local _G = _G
local pairs = pairs
......@@ -15,10 +16,11 @@ local IsMouseButtonDown = IsMouseButtonDown
-- GLOBALS: CHAT_FRAMES, RightChatDataPanel, LeftChatDataPanel, BuiDummyChat, RightChatPanel, LeftChatPanel, LeftChatTab
-- Place the new chat frame
local function UpdateEditboxAnchors()
function mod:UpdateEditboxAnchors()
for _, frameName in pairs(CHAT_FRAMES) do
local frame = _G[frameName..'EditBox']
if not frame then break; end
frame:ClearAllPoints()
if E.db.datatexts.leftChatPanel and E.db.chat.editBoxPosition == 'BELOW_CHAT' then
frame:SetAllPoints(LeftChatDataPanel)
elseif E.db.benikui.datatexts.chat.enable and BuiDummyChat and E.db.benikui.datatexts.chat.editBoxPosition == 'BELOW_CHAT' then
......@@ -35,8 +37,6 @@ local function UpdateEditboxAnchors()
frame:SetAllPoints(LeftChatTab)
end
end
--CH:PositionChat(true)
end
local CreatedFrames = 0;
......@@ -94,6 +94,12 @@ local function PositionChat(self, override)
end
end
hooksecurefunc(CH, "PositionChat", PositionChat)
hooksecurefunc(CH, "UpdateEditboxAnchors", UpdateEditboxAnchors)
hooksecurefunc(FM, "SetFlightMode", PositionChat)
\ No newline at end of file
function mod:Initialize()
hooksecurefunc(CH, "PositionChats", PositionChat)
hooksecurefunc(CH, "UpdateEditboxAnchors", mod.UpdateEditboxAnchors)
hooksecurefunc(CH, "StyleChat", Style)
hooksecurefunc(FM, "SetFlightMode", PositionChat)
mod.UpdateEditboxAnchors()
end
BUI:RegisterModule(mod:GetName())
\ No newline at end of file
......@@ -16,6 +16,7 @@ local PanelDefault = {
['petHide'] = true,
['vehicleHide'] = true,
['tooltip'] = true,
['visibility'] = "",
}
local function OnEnter(self)
......@@ -37,8 +38,7 @@ function mod:InsertPanel(name)
name = "BenikUI_"..name
local db = E.db.benikui.panels
if not db[name] then
-- db[name] = tcopy(PanelDefault)
E:CopyTable(db[name], PanelDefault)
db[name] = PanelDefault
else
E:StaticPopup_Show("BUI_Panel_Name")
end
......@@ -81,12 +81,20 @@ function mod:SetupPanels()
for name in pairs(E.db.benikui.panels) do
if name then
local db = E.db.benikui.panels[name]
local visibility = db.visibility
if visibility and visibility:match('[\n\r]') then
visibility = visibility:gsub('[\n\r]','')
end
if db.enable then
_G[name]:Show()
E:EnableMover(_G[name].mover:GetName())
RegisterStateDriver(_G[name], "visibility", visibility)
else
_G[name]:Hide()
E:DisableMover(_G[name].mover:GetName())
UnregisterStateDriver(_G[name], "visibility")
end
if not E.db.benikui.panels[name].hide then
......
......@@ -186,6 +186,23 @@ local function panelsTable()
get = function() return E.db.benikui.panels[panelname].vehicleHide end,
set = function(info, value) E.db.benikui.panels[panelname].vehicleHide = value; end,
},
visibility = {
type = 'input',
order = 24,
name = L["Visibility State"],
desc = L["This works like a macro, you can run different situations to get the panel to show/hide differently.\n Example: '[combat] show;hide'"],
width = 'full',
disabled = function() return not E.db.benikui.panels[panelname].enable end,
multiline = true,
get = function() return E.db.benikui.panels[panelname].visibility end,
set = function(info, value)
if value and value:match('[\n\r]') then
value = value:gsub('[\n\r]','')
end
E.db.benikui.panels[panelname].visibility = value;
BP:SetupPanels()
end,
},
spacer3 = {
order = 30,
type = 'description',
......
local E, L, V, P, G = unpack(ElvUI);
local DT = E:GetModule('DataTexts')
local join = string.join
local format = string.format
local tsort = table.sort
local ipairs = ipairs
--WoW API / Variables
local C_Garrison_GetFollowerShipments = C_Garrison.GetFollowerShipments
local C_Garrison_GetInProgressMissions = C_Garrison.GetInProgressMissions
local C_Garrison_RequestLandingPageShipmentInfo = C_Garrison.RequestLandingPageShipmentInfo
local C_Garrison_GetLandingPageShipmentInfoByContainerID = C_Garrison.GetLandingPageShipmentInfoByContainerID
local C_Garrison_GetTalentTreeIDsByClassID = C_Garrison.GetTalentTreeIDsByClassID
local C_Garrison_GetTalentTreeInfoForID = C_Garrison.GetTalentTreeInfoForID
local C_Garrison_GetCompleteTalent = C_Garrison.GetCompleteTalent
local C_Garrison_GetAvailableMissions = C_Garrison.GetAvailableMissions
local C_IslandsQueue_GetIslandsWeeklyQuestID = C_IslandsQueue.GetIslandsWeeklyQuestID
local GetQuestObjectiveInfo = GetQuestObjectiveInfo
local IsQuestFlaggedCompleted = IsQuestFlaggedCompleted
local GetMaxLevelForExpansionLevel = GetMaxLevelForExpansionLevel
local GetRGB = GetRGB
local SecondsToTime = SecondsToTime
local GOAL_COMPLETED = GOAL_COMPLETED
local RESEARCH_TIME_LABEL = RESEARCH_TIME_LABEL
local GARRISON_LANDING_SHIPMENT_COUNT = GARRISON_LANDING_SHIPMENT_COUNT
local FOLLOWERLIST_LABEL_TROOPS = FOLLOWERLIST_LABEL_TROOPS
local LE_FOLLOWER_TYPE_GARRISON_8_0 = LE_FOLLOWER_TYPE_GARRISON_8_0
local LE_GARRISON_TYPE_8_0 = LE_GARRISON_TYPE_8_0
local LE_EXPANSION_BATTLE_FOR_AZEROTH = LE_EXPANSION_BATTLE_FOR_AZEROTH
local ISLANDS_QUEUE_WEEKLY_QUEST_PROGRESS = ISLANDS_QUEUE_WEEKLY_QUEST_PROGRESS
local ISLANDS_HEADER = ISLANDS_HEADER
local ISLANDS_QUEUE_FRAME_TITLE = ISLANDS_QUEUE_FRAME_TITLE
local GREEN_FONT_COLOR = GREEN_FONT_COLOR
--Global variables that we don't cache, list them here for mikk's FindGlobals script
-- GLOBALS: GarrisonLandingPage, selectioncolor
local displayModifierString = ''
local lastPanel;
local function sortFunction(a, b)
return a.missionEndTime < b.missionEndTime
end
local OnEvent = function(self)
local inProgressMissions = {};
C_Garrison_GetInProgressMissions(inProgressMissions, LE_FOLLOWER_TYPE_GARRISON_8_0)
local CountInProgress = 0
local CountCompleted = 0
for i = 1, #inProgressMissions do
if inProgressMissions[i].inProgress then
local TimeLeft = inProgressMissions[i].timeLeft:match("%d")
if (TimeLeft ~= "0") then
CountInProgress = CountInProgress + 1
else
CountCompleted = CountCompleted + 1
end
end
end
if (CountInProgress > 0) then
self.text:SetFormattedText(displayModifierString, GARRISON_MISSIONS, CountCompleted, #inProgressMissions)
elseif (CountInProgress == 0) and CountCompleted > 0 then
self.text:SetFormattedText("|cff00ff00%s|r", GARRISON_TYPE_8_0_LANDING_PAGE_TITLE) -- green text when there are completed missions
else
self.text:SetFormattedText(GARRISON_TYPE_8_0_LANDING_PAGE_TITLE)
end
lastPanel = self
end
local function OnClick()
if GarrisonLandingPageMinimapButton then
GarrisonLandingPageMinimapButton_OnClick()
end
end
local OnEnter = function(self)
DT:SetupTooltip(self)
C_Garrison_RequestLandingPageShipmentInfo()
local firstLine = true
--Missions
local inProgressMissions = {}
C_Garrison_GetInProgressMissions(inProgressMissions, LE_FOLLOWER_TYPE_GARRISON_8_0)
local numMissions = #inProgressMissions
local AvailableMissions = {};
C_Garrison_GetAvailableMissions(AvailableMissions, LE_FOLLOWER_TYPE_GARRISON_8_0);
DT.tooltip:AddLine(format(GARRISON_LANDING_AVAILABLE:gsub('-', ': '), #AvailableMissions), selectioncolor)
DT.tooltip:AddLine(" ")
if(numMissions > 0) then
tsort(inProgressMissions, sortFunction) --Sort by time left, lowest first
firstLine = false
DT.tooltip:AddLine(L["Mission(s) Report:"])
for i=1, numMissions do
local mission = inProgressMissions[i]
local timeLeft = mission.timeLeft:match("%d")
local r, g, b = 1, 1, 1
if(mission.isRare) then
r, g, b = 0.09, 0.51, 0.81
end
if(timeLeft and timeLeft == "0") then
DT.tooltip:AddDoubleLine(mission.name, GOAL_COMPLETED, r, g, b, GREEN_FONT_COLOR:GetRGB())
else
DT.tooltip:AddDoubleLine(mission.name, mission.timeLeft, r, g, b)
end
end
end
-- Troop Work Orders
local followerShipments = C_Garrison_GetFollowerShipments(LE_GARRISON_TYPE_8_0)
local hasFollowers = false
if(followerShipments) then
for i = 1, #followerShipments do
local name, _, _, shipmentsReady, shipmentsTotal, _, _, timeleftString = C_Garrison_GetLandingPageShipmentInfoByContainerID(followerShipments[i])
if(name and shipmentsReady and shipmentsTotal) then
if(hasFollowers == false) then
if not firstLine then
DT.tooltip:AddLine(" ")
end
firstLine = false
DT.tooltip:AddLine(FOLLOWERLIST_LABEL_TROOPS) -- "Troops"
hasFollowers = true
end
if timeleftString then
timeleftString = timeleftString.." "
else
timeleftString = ""
end
DT.tooltip:AddDoubleLine(name, timeleftString..format(GARRISON_LANDING_SHIPMENT_COUNT, shipmentsReady, shipmentsTotal), 1, 1, 1)
end
end
end
-- Talents
local talentTreeIDs = C_Garrison_GetTalentTreeIDsByClassID(LE_GARRISON_TYPE_8_0, E.myClassID)
local hasTalent = false
if(talentTreeIDs) then
-- this is a talent that has completed, but has not been seen in the talent UI yet.
local completeTalentID = C_Garrison_GetCompleteTalent(LE_GARRISON_TYPE_8_0)
for _, treeID in ipairs(talentTreeIDs) do
local _, _, tree = C_Garrison_GetTalentTreeInfoForID(treeID)
for _, talent in ipairs(tree) do
local showTalent = false
if(talent.isBeingResearched) then
showTalent = true
end
if(talent.id == completeTalentID) then
showTalent = true
end
if(showTalent) then
if not firstLine then
DT.tooltip:AddLine(" ")
end
firstLine = false
DT.tooltip:AddLine(RESEARCH_TIME_LABEL) -- "Research Time:"
if(talent.researchTimeRemaining and talent.researchTimeRemaining == 0) then
DT.tooltip:AddDoubleLine(talent.name, GOAL_COMPLETED, 1, 1, 1, GREEN_FONT_COLOR:GetRGB())
else
DT.tooltip:AddDoubleLine(talent.name, SecondsToTime(talent.researchTimeRemaining), 1, 1, 1)
end
hasTalent = true
end
end
end
end
-- Island Expeditions
local hasIsland = false
if(UnitLevel("player") >= GetMaxLevelForExpansionLevel(LE_EXPANSION_BATTLE_FOR_AZEROTH)) then
local questID = C_IslandsQueue_GetIslandsWeeklyQuestID()
if questID then
local _, _, finished, numFulfilled, numRequired = GetQuestObjectiveInfo(questID, 1, false);
local text = ""
local r1, g1 ,b1
if finished or IsQuestFlaggedCompleted(questID) then
text = GOAL_COMPLETED
r1, g1, b1 = GREEN_FONT_COLOR:GetRGB()
else
text = ISLANDS_QUEUE_WEEKLY_QUEST_PROGRESS:format(numFulfilled, numRequired)
r1, g1, b1 = selectioncolor
end
if not firstLine then
DT.tooltip:AddLine(" ")
end
firstLine = false
DT.tooltip:AddLine(ISLANDS_HEADER..":")
DT.tooltip:AddDoubleLine(ISLANDS_QUEUE_FRAME_TITLE, text, 1, 1, 1, r1, g1, b1)
hasIsland = true
end
end
if(numMissions > 0 or hasFollowers or hasTalent or hasIsland) then
DT.tooltip:AddLine(" ")
end
DT.tooltip:AddLine(GARRISON_TYPE_8_0_LANDING_PAGE_TOOLTIP, 0.7, 0.7, 1)
DT.tooltip:Show()
end
local function ValueColorUpdate(hex)
displayModifierString = join("", "%s: ", hex, "%d/%d|r")
if lastPanel ~= nil then
OnEvent(lastPanel)
end
end
E['valueColorUpdateFuncs'][ValueColorUpdate] = true
DT:RegisterDatatext('BfA Missions (BenikUI)', 'BenikUI', {'PLAYER_ENTERING_WORLD', 'GARRISON_MISSION_LIST_UPDATE', 'GARRISON_MISSION_STARTED', 'GARRISON_MISSION_FINISHED', 'ZONE_CHANGED_NEW_AREA', 'GARRISON_MISSION_COMPLETE_RESPONSE'}, OnEvent, nil, OnClick, OnEnter)
\ No newline at end of file
......@@ -2,6 +2,8 @@ local BUI, E, L, V, P, G = unpack(select(2, ...))
local DT = E:GetModule('DataTexts')
local mod = BUI:NewModule('DataTexts', 'AceEvent-3.0');
local blacklist = panelName == _G.LocPlusLeftDT or panelName == _G.LocPlusRightDT or panelName == _G.MinimapPanel or panelName == _G.LeftChatDataPanel or panelName == _G.RightChatDataPanel
function mod:BuildPanelFrame(name, db)
db = db or E.global.datatexts.customPanels[name] or DT:Panel_DefaultGlobalSettings(name)
......@@ -13,16 +15,15 @@ function mod:UpdatePanelInfo(panelName, panel, ...)
if not panel then panel = DT.RegisteredPanels[panelName] end
local db = panel.db or P.datatexts.panels[panelName] and DT.db.panels[panelName]
if not db then return end
-- don't mess with LocationPlus
local locPanel = BUI.LP and panelName == 'LocPlusLeftDT' or panelName == 'LocPlusRightDT'
if not locPanel then
if not blacklist then
panel:Style('Outside')
if panel.style and db.benikuiStyle then
panel.style:Show()
else
panel.style:Hide()
if db.benikuiStyle then
if panel.style then
panel.style:Show()
else
panel.style:Hide()
end
end
if BUI.ShadowMode then
......
local E, L, V, P, G = unpack(ElvUI);
local DT = E:GetModule('DataTexts')
-- Missions are based on TukUI Garrison DataText. Credits: Hydra, Tukz
local join = string.join
local format = string.format
local tsort = table.sort
local GetCurrencyInfo = GetCurrencyInfo
local C_GarrisonRequestLandingPageShipmentInfo = C_Garrison.RequestLandingPageShipmentInfo
local C_GarrisonGetBuildings = C_Garrison.GetBuildings
local C_GarrisonGetInProgressMissions = C_Garrison.GetInProgressMissions
local C_GarrisonGetLandingPageShipmentInfo = C_Garrison.GetLandingPageShipmentInfo
local C_GarrisonGetAvailableMissions = C_Garrison.GetAvailableMissions
local C_Garrison_HasGarrison = C_Garrison.HasGarrison
local LoadAddOn = LoadAddOn
local GarrisonMissionFrame = GarrisonMissionFrame
local LE_FOLLOWER_TYPE_GARRISON_6_0, LE_FOLLOWER_TYPE_SHIPYARD_6_2 = LE_FOLLOWER_TYPE_GARRISON_6_0, LE_FOLLOWER_TYPE_SHIPYARD_6_2
local GARRISON_MISSIONS, GARRISON_LOCATION_TOOLTIP, GARRISON_SHIPMENT_EMPTY, GARRISON_MISSIONS_TITLE = GARRISON_MISSIONS, GARRISON_LOCATION_TOOLTIP, GARRISON_SHIPMENT_EMPTY, GARRISON_MISSIONS_TITLE
local AVAILABLE, GARRISON_MISSION_COMPLETE = AVAILABLE, GARRISON_MISSION_COMPLETE
local CAPACITANCE_WORK_ORDERS, SPLASH_NEW_6_2_FEATURE2_TITLE, MINIMAP_GARRISON_LANDING_PAGE_TOOLTIP = CAPACITANCE_WORK_ORDERS, SPLASH_NEW_6_2_FEATURE2_TITLE, MINIMAP_GARRISON_LANDING_PAGE_TOOLTIP
-- GLOBALS: selectioncolor
local displayModifierString = ''
local lastPanel;
local GARRISON_CURRENCY = 824
local GARRISON_CURRENCY_OIL = 1101
local OnEvent = function(self)
local inProgressMissions = {};
C_GarrisonGetInProgressMissions(inProgressMissions, LE_FOLLOWER_TYPE_GARRISON_6_0)
local CountInProgress = 0
local CountCompleted = 0