Commit a69fe03a authored by Benik's avatar Benik

Merge remote-tracking branch 'origin/development'

parents 7fe6a0fb f0858bfa
v1.03
*Styled the QuestTimerFrame
*Removed AddonSkins BugReportFrame styling
*Enabled FlightMode (thurin)
*Support for the forthcoming Nuts & Bolts Classic
*Disable tooltip mods if TinyTooltip is enabled
*Added Zygor skin/style (thurin)
*Add additional check for frame.backdrop's (Merathilis)
*New: The Chat Edit box can now also be positioned either under Actionbar1 or Actionbar2 backdrops. (user request)
*Enabled Professions Dashboard. Click on professions is currently disabled
*Various frame styling fixes
*Install adjustments
v1.021
*Fixed BenikUI Shadows that caused issues on Unitframes. (Credit: Azilroka)
*Updated the donor list. Thank you Christian <3
v1.02
*Since ElvUI 1.06 has enabled skins, BenikUI tried to style them all again.
*Removed more skins/styles/mods that are not in WoW Classic.
......
## Interface: 11302
## Author: Benik
## Version: 1.02
## Version: 1.03
## Title: |cff1784d1ElvUI|r |cff00c0faBenikUI Classic|r
## Notes: an ElvUI Classic decorative/enhancement edit
## RequiredDeps: ElvUI
......
......@@ -28,10 +28,10 @@ end
BUI.SLE = BUI:IsAddOnEnabled('ElvUI_SLE')
BUI.PA = BUI:IsAddOnEnabled('ProjectAzilroka')
BUI.LP = BUI:IsAddOnEnabled('ElvUI_LocationPlus')
BUI.NB = BUI:IsAddOnEnabled('ElvUI_NutsAndBolts')
BUI.NB = BUI:IsAddOnEnabled('ElvUI_NutsAndBolts_Classic')
BUI.AS = BUI:IsAddOnEnabled('AddOnSkins')
BUI.IF = BUI:IsAddOnEnabled('InFlight_Load')
BUI.ZG = BUI:IsAddOnEnabled('ZygorGuidesViewer')
BUI.ZG = BUI:IsAddOnEnabled('ZygorGuidesViewerClassic')
local classColor = E.myclass == 'PRIEST' and E.PriestColors or (CUSTOM_CLASS_COLORS and CUSTOM_CLASS_COLORS[E.myclass] or RAID_CLASS_COLORS[E.myclass])
......
......@@ -22,7 +22,6 @@ local function SetupLayout(layout)
E.db["bags"]["itemLevelCustomColorEnable"] = false
E.db["bags"]["sortInverted"] = false
E.db["bags"]["bagWidth"] = 412
E.db["bags"]["scrapIcon"] = true
E.db["bags"]["countFontOutline"] = "OUTLINE"
E.db["bags"]["bankSize"] = 32
E.db["bags"]["itemLevelFontOutline"] = "OUTLINE"
......@@ -30,24 +29,12 @@ local function SetupLayout(layout)
E.db["chat"]["panelBackdrop"] = 'SHOWBOTH'
E.db["chat"]["timeStampFormat"] = "%H:%M "
E.db["chat"]["panelWidth"] = 412
E.db["databars"]["azerite"]["enable"] = true
E.db["databars"]["azerite"]["height"] = 150
E.db["databars"]["azerite"]["orientation"] = 'VERTICAL'
E.db["databars"]["azerite"]["textFormat"] = 'NONE'
E.db["databars"]["azerite"]["textSize"] = 9
E.db["databars"]["azerite"]["width"] = 8
E.db["databars"]["experience"]["font"] = "Expressway"
E.db["databars"]["experience"]["textYoffset"] = 10
E.db["databars"]["experience"]["textFormat"] = "CURPERC"
E.db["databars"]["experience"]["height"] = 6
E.db["databars"]["experience"]["orientation"] = "HORIZONTAL"
E.db["databars"]["experience"]["textSize"] = 10
E.db["databars"]["honor"]["enable"] = true
E.db["databars"]["honor"]["height"] = 152
E.db["databars"]["honor"]["textFormat"] = 'NONE'
E.db["databars"]["honor"]["textSize"] = 9
E.db["databars"]["honor"]["width"] = 8
E.db["databars"]["honor"]["orientation"] = 'VERTICAL'
E.db["databars"]["reputation"]["enable"] = true
E.db["databars"]["reputation"]["height"] = 150
E.db["databars"]["reputation"]["orientation"] = 'VERTICAL'
......@@ -84,22 +71,14 @@ local function SetupLayout(layout)
E.db["general"]["altPowerBar"]['textFormat'] = 'NAMECURMAX'
E.db["general"]["altPowerBar"]['statusBarColorGradient'] = false
E.db["general"]["altPowerBar"]['statusBarColor'] = { r = 0.2, g = 0.4, b = 0.8 }
E.db["general"]["itemLevel"]["displayCharacterInfo"] = false
E.db["general"]["itemLevel"]["displayInspectInfo"] = true
E.db["general"]["itemLevel"]["itemLevelFontSize"] = 12
E.db["general"]["itemLevel"]["itemLevelFontOutline"] = 'OUTLINE'
E.db["hideTutorial"] = true
E.private["skins"]["blizzard"]["alertframes"] = true
E.private["skins"]["blizzard"]["questChoice"] = true
E.private["skins"]["parchmentRemover"]["enable"] = true
E.db["benikuiDatabars"]["azerite"]["buttonStyle"] = "DEFAULT"
E.db["benikuiDatabars"]["azerite"]["notifiers"]["position"] = "RIGHT"
E.db["benikuiDatabars"]["reputation"]["buttonStyle"] = "DEFAULT"
E.db["benikuiDatabars"]["reputation"]["notifiers"]["position"] = "LEFT"
E.db["benikuiDatabars"]["honor"]["buttonStyle"] = "TRANSPARENT"
E.db["benikuiDatabars"]["honor"]["notifiers"]["position"] = "LEFT"
E.db["benikuiDatabars"]["experience"]["buiStyle"] = false
E.db["benikui"]["general"]["auras"] = false
......@@ -111,13 +90,10 @@ local function SetupLayout(layout)
-- common movers
E.db["movers"]["AlertFrameMover"] = "TOP,ElvUIParent,TOP,0,-140"
E.db["movers"]["AzeriteBarMover"] = "BOTTOMLEFT,ElvUIParent,BOTTOMLEFT,415,22"
E.db["movers"]["BelowMinimapContainerMover"] = "TOP,ElvUIParent,TOP,0,-192"
E.db["movers"]["BNETMover"] = "TOPRIGHT,ElvUIParent,TOPRIGHT,-156,-200"
E.db["movers"]["BuiDashboardMover"] = "TOPLEFT,ElvUIParent,TOPLEFT,4,-8"
E.db["movers"]["DigSiteProgressBarMover"] = "BOTTOM,ElvUIParent,BOTTOM,0,315"
E.db["movers"]["GMMover"] = "TOPLEFT,ElvUIParent,TOPLEFT,158,-38"
E.db["movers"]["HonorBarMover"] = "TOPRIGHT,ElvUIParent,TOPRIGHT,-157,-6"
E.db["movers"]["LeftChatMover"] = "BOTTOMLEFT,ElvUIParent,BOTTOMLEFT,2,22"
E.db["movers"]["LocationMover"] = "TOP,ElvUIParent,TOP,0,-7"
E.db["movers"]["MicrobarMover"] = "TOPLEFT,ElvUIParent,TOPLEFT,158,-5"
......@@ -138,7 +114,6 @@ local function SetupLayout(layout)
E.db["general"]["fontSize"] = 10
E.db["general"]["altPowerBar"]["font"] = "Bui Prototype"
E.db["general"]["altPowerBar"]["fontSize"] = 10
E.db["general"]["itemLevel"]["itemLevelFont"] = "Bui Prototype"
E.db["chat"]["tabFont"] = "Bui Visitor1"
E.db["chat"]["tabFontSize"] = 10
......@@ -225,7 +200,7 @@ local function SetupLayout(layout)
E.db["benikui"]["misc"]["ilevel"]["font"] = "Expressway"
E.db["benikui"]["misc"]["ilevel"]["fontsize"] = 10
E.db["benikui"]["datatexts"]["middle"]["width"] = 415
E.db["benikui"]["datatexts"]["middle"]["width"] = 414
BUI:GetModule('Layout'):MiddleDatatextDimensions()
E.db["benikui"]["general"]["shadows"] = true
......@@ -375,8 +350,8 @@ local function SetupActionbars(layout)
E.db["actionbar"]["stanceBar"]["buttonsize"] = 24
E.db["benikui"]["actionbars"]["style"]["bar2"] = true
E.db["benikui"]["datatexts"]["middle"]["width"] = 415
E.db["databars"]["experience"]["width"] = 415
E.db["benikui"]["datatexts"]["middle"]["width"] = 414
E.db["databars"]["experience"]["width"] = 414
-- movers
E.db["movers"]["ElvAB_1"] = "BOTTOM,ElvUIParent,BOTTOM,0,97"
......@@ -392,7 +367,6 @@ local function SetupActionbars(layout)
E.db["movers"]["BuffsMover"] = "TOPRIGHT,ElvUIParent,TOPRIGHT,-181,-3"
E.db["movers"]["DebuffsMover"] = "TOPRIGHT,ElvUIParent,TOPRIGHT,-181,-128"
E.db["movers"]["ExperienceBarMover"] = "BOTTOM,ElvUIParent,BOTTOM,0,20"
E.db["movers"]["TalkingHeadFrameMover"] = "TOP,ElvUIParent,TOP,0,-128"
elseif layout == 'v2' then
E.db["actionbar"]["font"] = "Bui Visitor1"
......@@ -460,7 +434,6 @@ local function SetupActionbars(layout)
E.db["movers"]["PetAB"] = "BOTTOMRIGHT,ElvUIParent,BOTTOMRIGHT,-150,177"
E.db["movers"]["ShiftAB"] = "TOPLEFT,ElvUIParent,BOTTOMLEFT,832,128"
E.db["movers"]["ExperienceBarMover"] = "BOTTOM,ElvUIParent,BOTTOM,0,97"
E.db["movers"]["TalkingHeadFrameMover"] = "TOP,ElvUIParent,TOP,0,-128"
elseif layout == 'v3' then
E.db["actionbar"]["backdropSpacingConverted"] = true
......@@ -502,15 +475,14 @@ local function SetupActionbars(layout)
E.db["actionbar"]["fontOutline"] = "OUTLINE"
E.db["actionbar"]["stanceBar"]["buttonsize"] = 24
E.db["benikui"]["actionbars"]["style"]["bar2"] = false
E.db["benikui"]["datatexts"]["middle"]["width"] = 415
E.db["databars"]["experience"]["width"] = 415
E.db["benikui"]["datatexts"]["middle"]["width"] = 414
E.db["databars"]["experience"]["width"] = 414
-- movers
E.db["movers"]["ArenaHeaderMover"] = "BOTTOMRIGHT,ElvUIParent,BOTTOMRIGHT,-56,346"
E.db["movers"]["BossButton"] = "BOTTOM,ElvUIParent,BOTTOM,0,362"
E.db["movers"]["BossHeaderMover"] = "TOPRIGHT,ElvUIParent,TOPRIGHT,-56,-397"
E.db["movers"]["BuffsMover"] = "TOPRIGHT,ElvUIParent,TOPRIGHT,-181,-3"
E.db["movers"]["DebuffsMover"] = "TOPRIGHT,ElvUIParent,TOPRIGHT,-181,-128"
E.db["movers"]["DigSiteProgressBarMover"] = "BOTTOM,ElvUIParent,BOTTOM,0,315"
E.db["movers"]["ElvAB_1"] = "BOTTOM,ElvUIParent,BOTTOM,0,309"
E.db["movers"]["ElvAB_2"] = "BOTTOM,ElvUIParent,BOTTOM,0,268"
E.db["movers"]["ElvAB_3"] = "BOTTOM,ElvUIParent,BOTTOM,0,22"
......@@ -519,8 +491,7 @@ local function SetupActionbars(layout)
E.db["movers"]["PetAB"] = "BOTTOM,ElvUIParent,BOTTOM,0,85"
E.db["movers"]["ShiftAB"] = "BOTTOM,ElvUIParent,BOTTOM,0,141"
E.db["movers"]["BuiMiddleDtMover"] = "BOTTOM,ElvUIParent,BOTTOM,0,2"
E.db["movers"]["ExperienceBarMover"] = "BOTTOM,ElvUIParent,BOTTOM,0,65"
E.db["movers"]["TalkingHeadFrameMover"] = "BOTTOM,ElvUIParent,BOTTOM,0,116"
E.db["movers"]["ExperienceBarMover"] = "BOTTOM,ElvUIParent,BOTTOM,0,67"
end
BUI:GetModule('Actionbars'):ToggleStyle()
BUI:GetModule('Layout'):MiddleDatatextDimensions()
......@@ -648,7 +619,7 @@ local function SetupUnitframes(layout)
E.db["unitframe"]["units"]["player"]["threatStyle"] = 'GLOW'
E.db["unitframe"]["units"]["player"]["power"]["height"] = 5
E.db["unitframe"]["units"]["player"]["power"]["width"] = 'fill'
E.db["unitframe"]["units"]["player"]["power"]["detachedWidth"] = 367
E.db["unitframe"]["units"]["player"]["power"]["detachedWidth"] = 366
E.db["unitframe"]["units"]["player"]["power"]["detachFromFrame"] = false
E.db["unitframe"]["units"]["player"]["power"]["yOffset"] = 0
E.db["unitframe"]["units"]["player"]["power"]["yOffset"] = 0
......@@ -1555,7 +1526,7 @@ local function SetupUnitframes(layout)
E.db["unitframe"]["units"]["player"]["portrait"]["enable"] = false
E.db["unitframe"]["units"]["player"]["power"]["attachTextTo"] = "Power"
E.db["unitframe"]["units"]["player"]["power"]["detachFromFrame"] = true
E.db["unitframe"]["units"]["player"]["power"]["detachedWidth"] = 367
E.db["unitframe"]["units"]["player"]["power"]["detachedWidth"] = 366
E.db["unitframe"]["units"]["player"]["power"]["height"] = 7
E.db["unitframe"]["units"]["player"]["power"]["hideonnpc"] = true
E.db["unitframe"]["units"]["player"]["power"]["position"] = "CENTER"
......@@ -1953,7 +1924,7 @@ local function SetupDataTexts(role)
-- Data Texts
if BUI.LP then
E.db["datatexts"]["panels"]["RightCoordDtPanel"] = 'Time'
E.db["datatexts"]["panels"]["LeftCoordDtPanel"] = 'Quick Join'
E.db["datatexts"]["panels"]["LeftCoordDtPanel"] = ' '
end
if role == 'tank' then
......@@ -1970,12 +1941,12 @@ local function SetupDataTexts(role)
E.db["datatexts"]["panels"]["BuiMiddleDTPanel"]["right"] = 'Crit Chance'
end
E.db["datatexts"]["panels"]["BuiLeftChatDTPanel"]["middle"] = 'BfA Missions (BenikUI)'
E.db["datatexts"]["panels"]["BuiLeftChatDTPanel"]["middle"] = ''
E.db["datatexts"]["panels"]["BuiLeftChatDTPanel"]["right"] = 'BuiMail'
E.db["datatexts"]["panels"]["BuiRightChatDTPanel"]["left"] = 'Spec Switch (BenikUI)'
E.db["datatexts"]["panels"]["BuiRightChatDTPanel"]["left"] = 'Bags'
E.db["datatexts"]["panels"]["BuiRightChatDTPanel"]["right"] = 'Gold'
E.db["datatexts"]["panels"]["BuiRightChatDTPanel"]["middle"] = 'Bags'
E.db["datatexts"]["panels"]["BuiRightChatDTPanel"]["middle"] = ''
E.db["datatexts"]["panels"]["BuiMiddleDTPanel"]["middle"] = 'Mastery'
......
......@@ -38,6 +38,7 @@ local DONATORS = {
'Ahmed A.',
'Christopher S-C.',
'George McC.',
'Christian S.',
}
tsort(DONATORS, function(a, b) return a < b end)
local DONATOR_STRING = tconcat(DONATORS, ", ")
......
......@@ -26,6 +26,7 @@ local function CreateSplashScreen()
f:SetPoint('CENTER')
f:SetFrameStrata('TOOLTIP')
f:SetAlpha(0)
f:Hide()
f.bg = f:CreateTexture(nil, 'BACKGROUND')
f.bg:SetTexture([[Interface\LevelUp\LevelUpTex]])
......
......@@ -52,7 +52,7 @@ local function RegDataTexts()
end
local Bui_dchat = CreateFrame('Frame', 'BuiDummyChat', E.UIParent)
local Bui_dthreat = CreateFrame('Frame', 'BuiDummyThreat', E.UIParent)
local Bui_deb = CreateFrame('Frame', 'BuiDummyEditBoxHolder', E.UIParent)
-- GameMenu
local GameMenuFrame = CreateFrame('Frame', 'BuiGameClickMenu', E.UIParent)
......@@ -230,6 +230,12 @@ function mod:MiddleDatatextDimensions()
DT:UpdateAllDimensions()
end
function mod:PositionEditBoxHolder(bar)
Bui_deb:ClearAllPoints()
Bui_deb:Point('TOPLEFT', bar.backdrop, 'BOTTOMLEFT', 0, -SPACING)
Bui_deb:Point('BOTTOMRIGHT', bar.backdrop, 'BOTTOMRIGHT', 0, -(PANEL_HEIGHT + 6))
end
local function updateButtonFont()
for i = 1, BUTTON_NUM do
if bbuttons[i].text then
......@@ -269,16 +275,11 @@ function mod:ChangeLayout()
E:CreateMover(Bui_mdtp, "BuiMiddleDtMover", L['BenikUI Middle DataText'], nil, nil, nil, 'ALL,BenikUI', nil, 'benikui,datatexts')
-- dummy frame for chat/threat (left)
-- dummy frame for chat (left)
Bui_dchat:SetFrameStrata('LOW')
Bui_dchat:Point('TOPLEFT', LeftChatPanel, 'BOTTOMLEFT', 0, -SPACING)
Bui_dchat:Point('BOTTOMRIGHT', LeftChatPanel, 'BOTTOMRIGHT', 0, -PANEL_HEIGHT -SPACING)
-- dummy frame for threat (right)
Bui_dthreat:SetFrameStrata('LOW')
Bui_dthreat:Point('TOPLEFT', RightChatPanel, 'BOTTOMLEFT', 0, -SPACING)
Bui_dthreat:Point('BOTTOMRIGHT', RightChatPanel, 'BOTTOMRIGHT', 0, -PANEL_HEIGHT -SPACING)
-- Buttons
for i = 1, BUTTON_NUM do
bbuttons[i] = CreateFrame('Button', 'BuiButton_'..i, E.UIParent)
......
<Ui xmlns="http://www.blizzard.com/wow/ui/">
<Script file='actionbars.lua'/>
<Script file='toggleButtons.lua'/>
<!--<Script file='requestStop.lua'/>-->
<Script file='requestStop.lua'/>
<Script file='options.lua'/>
</Ui>
\ No newline at end of file
local BUI, E, L, V, P, G = unpack(select(2, ...))
local CH = E:GetModule('Chat')
local BL = BUI:GetModule('Layout')
local _G = _G
local pairs = pairs
......@@ -23,6 +24,14 @@ function CH:UpdateAnchors()
frame:SetAllPoints(LeftChatDataPanel)
elseif E.db.benikui.datatexts.chat.enable and BuiDummyChat and E.db.benikui.datatexts.chat.editBoxPosition == 'BELOW_CHAT' then
frame:SetAllPoints(BuiDummyChat)
elseif E.db.benikui.datatexts.middle.enable and E.db.benikui.datatexts.chat.editBoxPosition == 'MIDDLE_DT' then
frame:SetAllPoints(BuiMiddleDTPanel)
elseif E.ActionBars.Initialized and E.db.actionbar.bar1.backdrop == true and E.db.benikui.datatexts.chat.editBoxPosition == 'EAB_1' then
BL:PositionEditBoxHolder(ElvUI_Bar1)
frame:SetAllPoints(BuiDummyEditBoxHolder)
elseif E.ActionBars.Initialized and E.db.actionbar.bar2.backdrop == true and E.db.benikui.datatexts.chat.editBoxPosition == 'EAB_2' then
BL:PositionEditBoxHolder(ElvUI_Bar2)
frame:SetAllPoints(BuiDummyEditBoxHolder)
else
frame:SetAllPoints(LeftChatTab)
end
......
......@@ -4,6 +4,7 @@ local LSM = E.LSM
local DT = E:GetModule('DataTexts')
local CreateFrame = CreateFrame
local SECONDARY_SKILLS = SECONDARY_SKILLS
local DASH_HEIGHT = 20
local DASH_SPACING = 3
......@@ -13,8 +14,9 @@ local classColor = E.myclass == 'PRIEST' and E.PriestColors or (CUSTOM_CLASS_COL
-- Dashboards bar frame tables
BUI.SystemDB = {}
BUI.TokensDB = {}
--BUI.TokensDB = {}
BUI.ProfessionsDB = {}
BUI.SecondarySkill = SECONDARY_SKILLS:gsub(":", '')
function mod:EnableDisableCombat(holder, option)
local db = E.db.dashboards[option]
......@@ -117,7 +119,7 @@ function mod:CreateDashboardHolder(holderName, option)
return holder
end
function mod:CreateDashboard(name, barHolder, option)
function mod:CreateDashboard(name, barHolder, option, hasIcon)
local bar = CreateFrame('Button', nil, barHolder)
bar:Height(DASH_HEIGHT)
bar:Width(E.db.dashboards[option].width or 150)
......@@ -126,7 +128,13 @@ function mod:CreateDashboard(name, barHolder, option)
bar.dummy = CreateFrame('Frame', nil, bar)
bar.dummy:Point('BOTTOMLEFT', bar, 'BOTTOMLEFT', 2, (E.PixelMode and 2 or 0))
bar.dummy:Point('BOTTOMRIGHT', bar, 'BOTTOMRIGHT', (E.PixelMode and -24 or -28), 0)
if hasIcon then
bar.dummy:Point('BOTTOMRIGHT', bar, 'BOTTOMRIGHT', (E.PixelMode and -24 or -28), 0)
else
bar.dummy:Point('BOTTOMRIGHT', bar, 'BOTTOMRIGHT', (E.PixelMode and -2 or -4), 0)
end
bar.dummy:Height(E.PixelMode and 3 or 5)
bar.dummy.dummyStatus = bar.dummy:CreateTexture(nil, 'OVERLAY')
......@@ -146,25 +154,33 @@ function mod:CreateDashboard(name, barHolder, option)
bar.Text = bar.Status:CreateFontString(nil, 'OVERLAY')
bar.Text:FontTemplate()
bar.Text:Point('CENTER', bar, 'CENTER', -10, (E.PixelMode and 1 or 3))
if hasIcon then
bar.Text:Point('CENTER', bar, 'CENTER', -10, (E.PixelMode and 1 or 3))
else
bar.Text:Point('CENTER', bar, 'CENTER', 0, (E.PixelMode and 1 or 3))
end
bar.Text:Width(bar:GetWidth() - 20)
bar.Text:SetWordWrap(false)
bar.IconBG = CreateFrame('Button', nil, bar)
bar.IconBG:SetTemplate('Transparent')
bar.IconBG:Size(E.PixelMode and 18 or 20)
bar.IconBG:Point('BOTTOMRIGHT', bar, 'BOTTOMRIGHT', (E.PixelMode and -2 or -3), SPACING)
if hasIcon then
bar.IconBG = CreateFrame('Button', nil, bar)
bar.IconBG:SetTemplate('Transparent')
bar.IconBG:Size(E.PixelMode and 18 or 20)
bar.IconBG:Point('BOTTOMRIGHT', bar, 'BOTTOMRIGHT', (E.PixelMode and -2 or -3), SPACING)
bar.IconBG.Icon = bar.IconBG:CreateTexture(nil, 'ARTWORK')
bar.IconBG.Icon:SetInside()
bar.IconBG.Icon:SetTexCoord(0.08, 0.92, 0.08, 0.92)
bar.IconBG.Icon = bar.IconBG:CreateTexture(nil, 'ARTWORK')
bar.IconBG.Icon:SetInside()
bar.IconBG.Icon:SetTexCoord(0.08, 0.92, 0.08, 0.92)
end
return bar
end
function mod:Initialize()
mod:LoadSystem()
--mod:LoadProfessions()
mod:LoadProfessions()
--mod:LoadTokens()
end
......
......@@ -230,47 +230,47 @@ local function UpdateTokenOptions()
end
local function UpdateProfessionOptions()
local prof1, prof2, archy, fishing, cooking = GetProfessions()
local optionOrder = 1
if (prof1 or prof2 or archy or fishing or cooking) then
E.Options.args.benikui.args.dashboards.args.professions.args.choosePofessions = {
order = 50,
type = 'group',
guiInline = true,
name = L['Select Professions'],
disabled = function() return not E.db.dashboards.professions.enableProfessions end,
args = {
},
}
local proftable = { GetProfessions() }
for _, id in pairs(proftable) do
local pname, icon = GetProfessionInfo(id)
if pname then
E.Options.args.benikui.args.dashboards.args.professions.args.choosePofessions.args[pname] = {
order = optionOrder + 1,
type = 'toggle',
name = '|T'..icon..':18|t '..pname,
desc = L['Enable/Disable ']..pname,
get = function(info) return E.private.dashboards.professions.choosePofessions[id] end,
set = function(info, value) E.private.dashboards.professions.choosePofessions[id] = value; BUID:UpdateProfessions(); BUID:UpdateProfessionSettings(); end,
}
E.Options.args.benikui.args.dashboards.args.professions.args.choosePofessions = {
order = 50,
type = 'group',
guiInline = true,
name = L['Select Professions'],
disabled = function() return not E.db.dashboards.professions.enableProfessions end,
args = {
},
}
local hasSecondary = false
for skillIndex = 1, GetNumSkillLines() do
local skillName, isHeader, _, skillRank, _, skillModifier, skillMaxRank, isAbandonable = GetSkillLineInfo(skillIndex)
if hasSecondary and isHeader then
hasSecondary = false
end
if (skillName and isAbandonable) or hasSecondary then
E.Options.args.benikui.args.dashboards.args.professions.args.choosePofessions.args[skillName] = {
order = optionOrder + 1,
type = 'toggle',
name = skillName,
desc = L['Enable/Disable '] .. skillName,
get = function(info)
return E.private.dashboards.professions.choosePofessions[skillIndex]
end,
set = function(info, value)
E.private.dashboards.professions.choosePofessions[skillIndex] = value;
BUID:UpdateProfessions();
BUID:UpdateProfessionSettings();
end,
}
end
if isHeader then
if skillName == BUI.SecondarySkill then
hasSecondary = true
end
end
else
E.Options.args.benikui.args.dashboards.args.professions.args.choosePofessions = {
order = 5,
type = 'group',
guiInline = true,
name = L['Select Professions'],
disabled = function() return not E.db.dashboards.professions.enableProfessions end,
args = {
noprof = {
order = 1,
type = 'description',
name = PROFESSIONS_MISSING_PROFESSION,
},
},
}
end
end
......@@ -303,7 +303,7 @@ local function dashboardsTable()
set = function(info, value) E.db.dashboards[ info[#info] ] = value;
if E.db.dashboards.professions.enableProfessions then BUID:UpdateProfessionSettings(); end
--if E.db.dashboards.tokens.enableTokens then BUID:UpdateTokenSettings(); end
--if E.db.dashboards.system.enableSystem then BUID:UpdateSystemSettings(); end
if E.db.dashboards.system.enableSystem then BUID:UpdateSystemSettings(); end
end,
},
customBarColor = {
......@@ -323,7 +323,7 @@ local function dashboardsTable()
t.r, t.g, t.b, t.a = r, g, b, a
if E.db.dashboards.professions.enableProfessions then BUID:UpdateProfessionSettings(); end
--if E.db.dashboards.tokens.enableTokens then BUID:UpdateTokenSettings(); end
--if E.db.dashboards.system.enableSystem then BUID:UpdateSystemSettings(); end
if E.db.dashboards.system.enableSystem then BUID:UpdateSystemSettings(); end
end,
},
spacer = {
......@@ -343,7 +343,7 @@ local function dashboardsTable()
set = function(info, value) E.db.dashboards[ info[#info] ] = value;
if E.db.dashboards.professions.enableProfessions then BUID:UpdateProfessionSettings(); end
--if E.db.dashboards.tokens.enableTokens then BUID:UpdateTokenSettings(); end
--if E.db.dashboards.system.enableSystem then BUID:UpdateSystemSettings(); end
if E.db.dashboards.system.enableSystem then BUID:UpdateSystemSettings(); end
end,
},
customTextColor = {
......@@ -362,7 +362,7 @@ local function dashboardsTable()
t.r, t.g, t.b, t.a = r, g, b, a
if E.db.dashboards.professions.enableProfessions then BUID:UpdateProfessionSettings(); end
--if E.db.dashboards.tokens.enableTokens then BUID:UpdateTokenSettings(); end
--if E.db.dashboards.system.enableSystem then BUID:UpdateSystemSettings(); end
if E.db.dashboards.system.enableSystem then BUID:UpdateSystemSettings(); end
end,
},
},
......@@ -376,7 +376,7 @@ local function dashboardsTable()
get = function(info) return E.db.dashboards.dashfont[ info[#info] ] end,
set = function(info, value) E.db.dashboards.dashfont[ info[#info] ] = value;
if E.db.dashboards.system.enableSystem then BUID:UpdateSystemSettings(); end;
--if E.db.dashboards.professions.enableProfessions then BUID:UpdateProfessionSettings(); end;
if E.db.dashboards.professions.enableProfessions then BUID:UpdateProfessionSettings(); end;
--if E.db.dashboards.tokens.enableTokens then BUID:UpdateTokenSettings(); end;
end,
args = {
......@@ -662,7 +662,7 @@ local function dashboardsTable()
},
},
},
},
},]]
professions = {
order = 6,
type = 'group',
......@@ -744,7 +744,7 @@ local function dashboardsTable()
set = function(info, value) E.db.dashboards.professions.capped = value; BUID:UpdateProfessions(); BUID:UpdateProfessionSettings(); end,
},
},
},]]
},
},
}
--[[ update the options, when ElvUI Config fires
......@@ -755,4 +755,4 @@ end
tinsert(BUI.Config, dashboardsTable)
tinsert(BUI.Config, UpdateSystemOptions)
--tinsert(BUI.Config, UpdateTokenOptions)
--tinsert(BUI.Config, UpdateProfessionOptions)
tinsert(BUI.Config, UpdateProfessionOptions)
......@@ -21,7 +21,7 @@ local SPACING = 1
local classColor = E.myclass == 'PRIEST' and E.PriestColors or (CUSTOM_CLASS_COLORS and CUSTOM_CLASS_COLORS[E.myclass] or RAID_CLASS_COLORS[E.myclass])
local function sortFunction(a, b)
return a.name < b.name
return a.skillName < b.skillName
end
function mod:UpdateProfessions()
......@@ -54,16 +54,17 @@ function mod:UpdateProfessions()
end
end)
local prof1, prof2, archy, fishing, cooking = GetProfessions()
local hasSecondary = false
for skillIndex = 1, GetNumSkillLines() do
local skillName, isHeader, _, skillRank, _, skillModifier, skillMaxRank, isAbandonable = GetSkillLineInfo(skillIndex)
if (prof1 or prof2 or archy or fishing or cooking) then
local proftable = { GetProfessions() }
if hasSecondary and isHeader then
hasSecondary = false
end
for _, id in pairs(proftable) do
local name, icon, rank, maxRank, _, _, skillLine, rankModifier = GetProfessionInfo(id)
if name and (rank < maxRank or (not db.capped)) then
if E.private.dashboards.professions.choosePofessions[id] == true then
if (skillName and isAbandonable) or hasSecondary then
if skillName and (skillRank < skillMaxRank or (not db.capped)) then
if E.private.dashboards.professions.choosePofessions[skillIndex] == true then
holder:Show()
holder:Height(((DASH_HEIGHT + (E.PixelMode and 1 or DASH_SPACING)) * (#BUI.ProfessionsDB + 1)) + DASH_SPACING + (E.PixelMode and 0 or 2))
if ProfessionsMover then
......@@ -71,46 +72,14 @@ function mod:UpdateProfessions()
holder:Point('TOPLEFT', ProfessionsMover, 'TOPLEFT')
end
self.ProFrame = self:CreateDashboard(nil, holder, 'professions')
self.ProFrame:SetScript('OnEnter', function(self)
self.Text:SetFormattedText('%s', name)
if db.mouseover then
E:UIFrameFadeIn(holder, 0.2, holder:GetAlpha(), 1)
end
end)
self.ProFrame:SetScript('OnLeave', function(self)
if (rankModifier and rankModifier > 0) then
self.Text:SetFormattedText('%s |cFF6b8df4+%s|r / %s', rank, rankModifier, maxRank)
else
self.Text:SetFormattedText('%s / %s', rank, maxRank)