Commit 49f3dd45 authored by Merathilis's avatar Merathilis

Merge branch 'development'

parents 6c2faedb 5a0c7a81
[b][color=orange]v3.19[/color], 30.01.2018[/b][list]
[*]Add an EquipSet Bar. Thx Azilroka for this <3
[*]Fix Party/Raid position for high resolutions.
[*]Update BigWigs Skin. No Half-Bar anymore.
[*]Replace the Quest button with a Talent button in the MicroBar.
[*]Don't hide the AFK options if BenikUI is loaded.
[*]Add new font settings for S&L (its not live yet), will error out.
[*]Fixed the option for the MerchantItemLevel.[/list]
[b][color=orange]v3.18[/color], 26.01.2018[/b][list]
[*]Changed the middle Datatext framestrata.
[*]Add an option to disable the Infotexts style.
......
** v3.19[/color], 30.01.2018**
* Add an EquipSet Bar. Thx Azilroka for this <3
* Fix Party/Raid position for high resolutions.
* Update BigWigs Skin. No Half-Bar anymore.
* Replace the Quest button with a Talent button in the MicroBar.
* Don't hide the AFK options if BenikUI is loaded.
* Add new font settings for S&L (its not live yet), will error out.
* Fixed the option for the MerchantItemLevel.
** v3.18, 26.01.2018**
* Changed the middle Datatext framestrata.
* Add an option to disable the Infotexts style.
......
## Interface: 70300
## Author: Merathilis
## Credits: Benik, Darth Predator, Blazeflack, Azilroka, Simpy, ChaosVoid, fgprodigal, Elv & all AddOn Authors who inspired me.
## Version: 3.18
## Version: 3.19
## Title: |cFF00c0faElvUI|r |cffff7d0aMerathilisUI|r
## Notes: A decorative edit for ElvUI + additional features.
## Notes-deDE: Eine dekorative Erweiterung für ElvUI + einige zusätzliche Funktionen.
......@@ -13,7 +13,7 @@
## SavedVariablesPerCharacter: MERDataPerChar
## OptionalDeps: SharedMedia, AddOnSkins, BigWigs
## X-ElvVersion: 10.71
## X-Curse-Packaged-Version: 3.18
## X-Curse-Packaged-Version: 3.19
## X-Curse-Project-Name: MerathilisUI
## X-Curse-Project-ID: merathilis-ui
## X-Tukui-ProjectID: 1
......
......@@ -53,6 +53,21 @@ function MER:LoadShadowandLightProfile()
E.db["sle"]["Armory"]["Inspect"]["Enchant"]["WarningIconOnly"] = true
E.db["sle"]["Armory"]["Inspect"]["Gem"]["SocketSize"] = 15
E.db["sle"]["Armory"]["Inspect"]["Gradation"]["CurrentClassColor"] = true
E.db["sle"]["Armory"]["Inspect"]["tabsText"]["Font"] = "Expressway"
E.db["sle"]["Armory"]["Inspect"]["tabsText"]["FontSize"] = 10
E.db["sle"]["Armory"]["Inspect"]["Name"]["Font"] = "Expressway"
E.db["sle"]["Armory"]["Inspect"]["Title"]["Font"] = "Expressway"
E.db["sle"]["Armory"]["Inspect"]["Title"]["FontSize"] = 11
E.db["sle"]["Armory"]["Inspect"]["LevelRace"]["Font"] = "Expressway"
E.db["sle"]["Armory"]["Inspect"]["Guild"]["Font"] = "Expressway"
E.db["sle"]["Armory"]["Inspect"]["infoTabs"]["Font"] = "Expressway"
E.db["sle"]["Armory"]["Inspect"]["pvpText"]["Font"] = "Expressway"
E.db["sle"]["Armory"]["Inspect"]["pvpType"]["Font"] = "Expressway"
E.db["sle"]["Armory"]["Inspect"]["pvpRating"]["Font"] = "Expressway"
E.db["sle"]["Armory"]["Inspect"]["pvpRecord"]["Font"] = "Expressway"
E.db["sle"]["Armory"]["Inspect"]["guildName"]["Font"] = "Expressway"
E.db["sle"]["Armory"]["Inspect"]["guildMembers"]["Font"] = "Expressway"
E.db["sle"]["Armory"]["Inspect"]["Spec"]["Font"] = "Expressway"
E.db["sle"]["auras"]["hideDebuffsTimer"] = false
E.db["sle"]["auras"]["hideBuffsTimer"] = false
E.db["sle"]["loot"]["autoroll"]["autogreed"] = true
......
......@@ -17,10 +17,13 @@ local CLOSE = CLOSE
local ChangeLogData = {
"Changes:",
"• Changed the middle Datatext framestrata.",
"• Add an option to disable the Infotexts style.",
"• Show the option to disable my AFK Screen.",
"• Correctly disable the Orderhall Commandbar, if the skin is disabled.",
"• Add an EquipSet Bar. Thx Azilroka for this <3",
"• Fix Party/Raid position for high resolutions.",
"• Update BigWigs Skin. No Half-Bar anymore.",
"• Replace the Quest button with a Talent button in the MicroBar.",
"• Don't hide the AFK options if BenikUI is loaded.",
"• Add new font settings for S&L (its not live yet), will error out.",
"• Fixed the option for the MerchantItemLevel. Thx varyak",
-- "• ",
" ",
"Notes:",
......
......@@ -276,6 +276,16 @@ function MER:SetupLayout()
--[[----------------------------------
-- ProfileDB - Bags
--]]----------------------------------
E.db["bags"]["itemLevelFont"] = "Expressway"
E.db["bags"]["itemLevelFontSize"] = 9
E.db["bags"]["itemLevelFontOutline"] = "OUTLINE"
E.db["bags"]["countFont"] = "Expressway"
E.db["bags"]["countFontSize"] = 10
E.db["bags"]["countFontOutline"] = "OUTLINE"
E.db["bags"]["bagSize"] = 30
E.db["bags"]["bagWidth"] = 470
E.db["bags"]["bankSize"] = 30
E.db["bags"]["bankWidth"] = 426
E.db["bags"]["alignToChat"] = false
E.db["bags"]["moneyFormat"] = "CONDENSED"
E.db["bags"]["itemLevelThreshold"] = 815
......@@ -388,16 +398,6 @@ function MER:SetupLayout()
E.private["general"]["dmgfont"] = "Expressway"
E.db["tooltip"]["healthBar"]["font"] = "Expressway"
E.db["bags"]["itemLevelFont"] = "Expressway"
E.db["bags"]["itemLevelFontSize"] = 9
E.db["bags"]["itemLevelFontOutline"] = "OUTLINE"
E.db["bags"]["countFont"] = "Expressway"
E.db["bags"]["countFontSize"] = 10
E.db["bags"]["countFontOutline"] = "OUTLINE"
E.db["bags"]["bagSize"] = 23
E.db["bags"]["bagWidth"] = 470
E.db["bags"]["bankSize"] = 23
E.db["bags"]["bankWidth"] = 426
E.db["databars"]["experience"]["enable"] = true
E.db["databars"]["experience"]["mouseover"] = false
E.db["databars"]["experience"]["height"] = 146
......@@ -975,7 +975,7 @@ function MER:SetupUnitframes()
E.db["unitframe"]["units"]["raid"]["classHover"] = true
end
MER:SetMoverPosition("ElvUF_RaidMover", "BOTTOMLEFT", E.UIParent, "BOTTOMLEFT", 761, 57)
MER:SetMoverPosition("ElvUF_RaidMover", "BOTTOM", E.UIParent, "BOTTOM", 0, 57)
-- Raid40
E.db["unitframe"]["units"]["raid40"]["horizontalSpacing"] = 1
......@@ -1134,7 +1134,7 @@ function MER:SetupUnitframes()
["text_format"] = "[name:medium:status]",
}
MER:SetMoverPosition("ElvUF_PartyMover", "BOTTOMLEFT", E.UIParent, "BOTTOMLEFT", 760, 73)
MER:SetMoverPosition("ElvUF_PartyMover", "BOTTOM", E.UIParent, "BOTTOM", 0, 73)
-- Assist
E.db["unitframe"]["units"]["assist"]["enable"] = false
......@@ -1184,7 +1184,7 @@ function MER:SetupUnitframes()
E.db["unitframe"]["units"]["pet"]["infoPanel"]["height"] = 14
E.db["unitframe"]["units"]["pet"]["infoPanel"]["transparent"] = true
MER:SetMoverPosition("ElvUF_PetMover", "BOTTOMLEFT", E.UIParent, "BOTTOMLEFT", 518, 230)
MER:SetMoverPosition("ElvUF_PetMover", "BOTTOMLEFT", E.UIParent, "BOTTOMLEFT", 519, 250)
MER:SetMoverPosition("ElvUF_PetCastbarMover", "BOTTOMLEFT", E.UIParent, "BOTTOMLEFT", 511, 226)
-- Arena
......
......@@ -94,8 +94,8 @@ function MERL:CreateChatButton()
local panelBackdrop = E.db.chat.panelBackdrop
local ChatButton = CreateFrame("Frame", "mUIChatButton", _G["LeftChatPanel"])
ChatButton:ClearAllPoints()
ChatButton:Point("TOPLEFT", 3, -5)
ChatButton:Size(14, 14)
ChatButton:Point("TOPLEFT", 4, -5)
ChatButton:Size(13, 13)
if E.db.chat.panelBackdrop == "HIDEBOTH" or E.db.chat.panelBackdrop == "LEFT" then
ChatButton:SetAlpha(0)
else
......@@ -213,99 +213,99 @@ end
-- Panels
function MERL:CreatePanels()
if E.db.mui.general.panels then
local topPanel = CreateFrame("Frame", MER.Title.."TopPanel", E.UIParent)
topPanel:SetFrameStrata("BACKGROUND")
topPanel:SetPoint("TOP", 0, 3)
topPanel:SetPoint("LEFT", E.UIParent, "LEFT", -8, 0)
topPanel:SetPoint("RIGHT", E.UIParent, "RIGHT", 8, 0)
topPanel:SetHeight(15)
topPanel:SetTemplate("Transparent")
topPanel:Styling()
local bottomPanel = CreateFrame("Frame", MER.Title.."BottomPanel", E.UIParent)
bottomPanel:SetFrameStrata("BACKGROUND")
bottomPanel:SetPoint("BOTTOM", 0, -3)
bottomPanel:SetPoint("LEFT", E.UIParent, "LEFT", -8, 0)
bottomPanel:SetPoint("RIGHT", E.UIParent, "RIGHT", 8, 0)
bottomPanel:SetHeight(15)
bottomPanel:SetTemplate("Transparent")
bottomPanel:Styling()
local topLeftStyle = CreateFrame("Frame", MER.Title.."TopLeftStyle", E.UIParent)
topLeftStyle:SetFrameStrata("BACKGROUND")
topLeftStyle:SetFrameLevel(2)
topLeftStyle:SetSize(E.screenwidth*2/9, 4)
topLeftStyle:SetPoint("TOPLEFT", E.UIParent, "TOPLEFT", 10, -10)
MERS:SkinPanel(topLeftStyle)
local topRightStyle = CreateFrame("Frame", MER.Title.."TopRightStyle", E.UIParent)
topRightStyle:SetFrameStrata("BACKGROUND")
topRightStyle:SetFrameLevel(2)
topRightStyle:SetSize(E.screenwidth*2/9, 4)
topRightStyle:SetPoint("TOPRIGHT", E.UIParent, "TOPRIGHT", -10, -10)
MERS:SkinPanel(topRightStyle)
local bottomLeftSytle = CreateFrame("Frame", MER.Title.."BottomLeftStyle", E.UIParent)
bottomLeftSytle:SetFrameStrata("BACKGROUND")
bottomLeftSytle:SetFrameLevel(2)
bottomLeftSytle:SetSize(E.screenwidth*2/9, 4)
bottomLeftSytle:SetPoint("BOTTOMLEFT", E.UIParent, "BOTTOMLEFT", 10, 10)
MERS:SkinPanel(bottomLeftSytle)
local bottomRightStyle = CreateFrame("Frame", MER.Title.."BottomRightStyle", E.UIParent)
bottomRightStyle:SetFrameStrata("BACKGROUND")
bottomRightStyle:SetFrameLevel(2)
bottomRightStyle:SetSize(E.screenwidth*2/9, 4)
bottomRightStyle:SetPoint("BOTTOMRIGHT", E.UIParent, "BOTTOMRIGHT", -10, 10)
MERS:SkinPanel(bottomRightStyle)
local MerathilisUIButton1 = CreateFrame("Button", "MerathilisUIButton1", E.UIParent)
MerathilisUIButton1:SetTemplate("Default", true)
MerathilisUIButton1:RegisterForClicks("AnyUp")
MerathilisUIButton1:Size(12, 12)
MerathilisUIButton1:Point("LEFT", bottomLeftSytle, "RIGHT", 2, 0)
MerathilisUIButton1:StyleButton()
MerathilisUIButton1.text = MerathilisUIButton1:CreateFontString(nil, "OVERLAY")
MerathilisUIButton1.text:SetFont(E["media"].normFont, 11)
MerathilisUIButton1.text:Point("CENTER", 1, 0)
if E.db.actionbar.bar5.enabled == true then -- double check for login
MerathilisUIButton1.text:SetText(cm.."-|r")
else
MerathilisUIButton1.text:SetText(cp.."+|r")
end
if E.db.mui.general.panels ~= true then return end
local topPanel = CreateFrame("Frame", MER.Title.."TopPanel", E.UIParent)
topPanel:SetFrameStrata("BACKGROUND")
topPanel:SetPoint("TOP", 0, 3)
topPanel:SetPoint("LEFT", E.UIParent, "LEFT", -8, 0)
topPanel:SetPoint("RIGHT", E.UIParent, "RIGHT", 8, 0)
topPanel:SetHeight(15)
topPanel:SetTemplate("Transparent")
topPanel:Styling()
local bottomPanel = CreateFrame("Frame", MER.Title.."BottomPanel", E.UIParent)
bottomPanel:SetFrameStrata("BACKGROUND")
bottomPanel:SetPoint("BOTTOM", 0, -3)
bottomPanel:SetPoint("LEFT", E.UIParent, "LEFT", -8, 0)
bottomPanel:SetPoint("RIGHT", E.UIParent, "RIGHT", 8, 0)
bottomPanel:SetHeight(15)
bottomPanel:SetTemplate("Transparent")
bottomPanel:Styling()
local topLeftStyle = CreateFrame("Frame", MER.Title.."TopLeftStyle", E.UIParent)
topLeftStyle:SetFrameStrata("BACKGROUND")
topLeftStyle:SetFrameLevel(2)
topLeftStyle:SetSize(E.screenwidth*2/9, 4)
topLeftStyle:SetPoint("TOPLEFT", E.UIParent, "TOPLEFT", 10, -10)
MERS:SkinPanel(topLeftStyle)
local topRightStyle = CreateFrame("Frame", MER.Title.."TopRightStyle", E.UIParent)
topRightStyle:SetFrameStrata("BACKGROUND")
topRightStyle:SetFrameLevel(2)
topRightStyle:SetSize(E.screenwidth*2/9, 4)
topRightStyle:SetPoint("TOPRIGHT", E.UIParent, "TOPRIGHT", -10, -10)
MERS:SkinPanel(topRightStyle)
local bottomLeftSytle = CreateFrame("Frame", MER.Title.."BottomLeftStyle", E.UIParent)
bottomLeftSytle:SetFrameStrata("BACKGROUND")
bottomLeftSytle:SetFrameLevel(2)
bottomLeftSytle:SetSize(E.screenwidth*2/9, 4)
bottomLeftSytle:SetPoint("BOTTOMLEFT", E.UIParent, "BOTTOMLEFT", 10, 10)
MERS:SkinPanel(bottomLeftSytle)
local bottomRightStyle = CreateFrame("Frame", MER.Title.."BottomRightStyle", E.UIParent)
bottomRightStyle:SetFrameStrata("BACKGROUND")
bottomRightStyle:SetFrameLevel(2)
bottomRightStyle:SetSize(E.screenwidth*2/9, 4)
bottomRightStyle:SetPoint("BOTTOMRIGHT", E.UIParent, "BOTTOMRIGHT", -10, 10)
MERS:SkinPanel(bottomRightStyle)
local MerathilisUIButton1 = CreateFrame("Button", "MerathilisUIButton1", E.UIParent)
MerathilisUIButton1:SetTemplate("Default", true)
MerathilisUIButton1:RegisterForClicks("AnyUp")
MerathilisUIButton1:Size(12, 12)
MerathilisUIButton1:Point("LEFT", bottomLeftSytle, "RIGHT", 2, 0)
MerathilisUIButton1:StyleButton()
MerathilisUIButton1.text = MerathilisUIButton1:CreateFontString(nil, "OVERLAY")
MerathilisUIButton1.text:SetFont(E["media"].normFont, 11)
MerathilisUIButton1.text:Point("CENTER", 1, 0)
if E.db.actionbar.bar5.enabled == true then -- double check for login
MerathilisUIButton1.text:SetText(cm.."-|r")
else
MerathilisUIButton1.text:SetText(cp.."+|r")
end
MerathilisUIButton1:SetScript("OnClick", function(self, btn)
if btn == "LeftButton" then
UpdateBar5(self, _G["ElvUI_Bar5"])
PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_OFF)
end
end)
local MerathilisUIButton2 = CreateFrame("Button", "MerathilisUIButton2", E.UIParent)
MerathilisUIButton2:SetTemplate("Default", true)
MerathilisUIButton2:RegisterForClicks("AnyUp")
MerathilisUIButton2:Size(12, 12)
MerathilisUIButton2:Point("RIGHT", bottomRightStyle, "LEFT", -2, 0)
MerathilisUIButton2:StyleButton()
MerathilisUIButton2.text = MerathilisUIButton2:CreateFontString(nil, "OVERLAY")
MerathilisUIButton2.text:SetFont(E["media"].normFont, 11)
MerathilisUIButton2.text:Point("CENTER", 0, 0)
if E.db.actionbar.bar3.enabled == true then -- double check for login
MerathilisUIButton2.text:SetText(cm.."-|r")
else
MerathilisUIButton2.text:SetText(cp.."+|r")
MerathilisUIButton1:SetScript("OnClick", function(self, btn)
if btn == "LeftButton" then
UpdateBar5(self, _G["ElvUI_Bar5"])
PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_OFF)
end
end)
MerathilisUIButton2:SetScript("OnClick", function(self, btn)
if btn == "LeftButton" then
UpdateBar3(self, _G["ElvUI_Bar3"])
PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_OFF)
end
end)
local MerathilisUIButton2 = CreateFrame("Button", "MerathilisUIButton2", E.UIParent)
MerathilisUIButton2:SetTemplate("Default", true)
MerathilisUIButton2:RegisterForClicks("AnyUp")
MerathilisUIButton2:Size(12, 12)
MerathilisUIButton2:Point("RIGHT", bottomRightStyle, "LEFT", -2, 0)
MerathilisUIButton2:StyleButton()
MerathilisUIButton2.text = MerathilisUIButton2:CreateFontString(nil, "OVERLAY")
MerathilisUIButton2.text:SetFont(E["media"].normFont, 11)
MerathilisUIButton2.text:Point("CENTER", 0, 0)
if E.db.actionbar.bar3.enabled == true then -- double check for login
MerathilisUIButton2.text:SetText(cm.."-|r")
else
MerathilisUIButton2.text:SetText(cp.."+|r")
end
MerathilisUIButton2:SetScript("OnClick", function(self, btn)
if btn == "LeftButton" then
UpdateBar3(self, _G["ElvUI_Bar3"])
PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_OFF)
end
end)
end
function MERL:regEvents()
......
......@@ -217,7 +217,8 @@ L["ButtonStyle"] = "Tastenstil"
L["Enable the button style."] = "Aktiviere den Tastenstil."
L["The texture to use."] = "Die zu verwendene Textur."
L["ActionButton Border"] = "Aktionstasten Rand"
L["Specialisation Bar"] = "Spezialisierungs Leiste"
L["Specialisation Bar"] = "Spezialisierungsleiste"
L["EquipSet Bar"] = "Ausrüstungsleiste"
-- Unitframes
L["UnitFrames"] = "Einheitenfenster"
......
......@@ -217,6 +217,7 @@ L["Enable the button style."] = true
L["The texture to use."] = true
L["ActionButton Border"] = true
L["Specialisation Bar"] = true
L["EquipSet Bar"] = true
-- Unitframes
L["UnitFrames"] = true
......
......@@ -206,6 +206,7 @@ L["Enable the button style."] = true
L["The texture to use."] = true
L["ActionButton Border"] = true
L["Specialisation Bar"] = true
L["EquipSet Bar"] = true
-- Unitframes
L["UnitFrames"] = true
......
......@@ -206,6 +206,7 @@ L["Enable the button style."] = true
L["The texture to use."] = true
L["ActionButton Border"] = true
L["Specialisation Bar"] = true
L["EquipSet Bar"] = true
-- Unitframes
L["UnitFrames"] = true
......
......@@ -206,6 +206,7 @@ L["Enable the button style."] = true
L["The texture to use."] = true
L["ActionButton Border"] = true
L["Specialisation Bar"] = true
L["EquipSet Bar"] = true
-- Unitframes
L["UnitFrames"] = true
......
......@@ -206,6 +206,7 @@ L["Enable the button style."] = true
L["The texture to use."] = true
L["ActionButton Border"] = true
L["Specialisation Bar"] = true
L["EquipSet Bar"] = true
-- Unitframes
L["UnitFrames"] = true
......
......@@ -206,6 +206,7 @@ L["Enable the button style."] = true
L["The texture to use."] = true
L["ActionButton Border"] = true
L["Specialisation Bar"] = true
L["EquipSet Bar"] = true
-- Unitframes
L["UnitFrames"] = true
......
......@@ -206,6 +206,7 @@ L["Enable the button style."] = true
L["The texture to use."] = true
L["ActionButton Border"] = true
L["Specialisation Bar"] = true
L["EquipSet Bar"] = true
-- Unitframes
L["UnitFrames"] = true
......
......@@ -120,6 +120,7 @@ function MAB:Initialize()
hooksecurefunc(_G["ExtraActionButton1"].style, "SetTexture", RemoveTexture)
self:SpecBarInit()
self:EquipBarInit()
self:InitializeMicroBar()
end
......
local MER, E, L, V, P, G = unpack(select(2, ...))
local MAB = E:GetModule("mUIActionbars")
local BS = E:GetModule("mUIButtonStyle")
--Cache global variables
--Lua functions
local _G = _G
local select = select
--WoW API / Variables
local CreateFrame = CreateFrame
local C_EquipmentSet = C_EquipmentSet
local InCombatLockdown = InCombatLockdown
local ShowUIPanel = ShowUIPanel
local UIErrorsFrame = UIErrorsFrame
--Global variables that we don't cache, list them here for the mikk's Find Globals script
-- GLOBALS: GameTooltip, GameTooltip_Hide, PAPERDOLL_EQUIPMENTMANAGER, ERR_NOT_IN_COMBAT, PaperDollFrame_SetSidebar
-- GLOBALS: SAVE_CHANGES
function MAB:CreateEquipBar()
if E.db.mui.actionbars.equipBar ~= true then return end
local GearTexture = "Interface\\WorldMap\\GEAR_64GREY"
local EquipmentSets = CreateFrame("Frame", "EquipmentSets", E.UIParent)
EquipmentSets:SetFrameStrata("BACKGROUND")
EquipmentSets:SetFrameLevel(0)
EquipmentSets:SetSize(32, 32)
EquipmentSets:SetTemplate("Transparent")
EquipmentSets:SetPoint("RIGHT", _G["SpecializationBar"], "LEFT", -1, 0)
EquipmentSets:Styling()
E:CreateMover(EquipmentSets, "EquipmentSetsBarMover", L["EquipmentSetsBarMover"], true, nil)
EquipmentSets.Button = CreateFrame("Button", nil, EquipmentSets)
EquipmentSets.Button:SetFrameStrata("BACKGROUND")
EquipmentSets.Button:SetFrameLevel(1)
EquipmentSets.Button:SetTemplate()
EquipmentSets.Button:SetPoint("CENTER")
EquipmentSets.Button:SetSize(24, 24)
EquipmentSets.Button:SetNormalTexture("Interface\\PaperDollInfoFrame\\PaperDollSidebarTabs")
EquipmentSets.Button:GetNormalTexture():SetTexCoord(0.01562500, 0.53125000, 0.46875000, 0.60546875)
EquipmentSets.Button:GetNormalTexture():SetInside()
EquipmentSets.Button:SetPushedTexture("")
EquipmentSets.Button:SetHighlightTexture("")
EquipmentSets.Button:HookScript("OnEnter", function(self) self:SetBackdropBorderColor(0, 0.44, .87) end)
EquipmentSets.Button:HookScript("OnLeave", function(self) self:SetTemplate() end)
EquipmentSets.Button.Icon = EquipmentSets.Button:CreateTexture(nil, "OVERLAY")
EquipmentSets.Button.Icon:SetTexCoord(.1, .9, .1, .9)
EquipmentSets.Button.Icon:SetInside()
EquipmentSets.Flyout = CreateFrame("Button", nil, EquipmentSets)
EquipmentSets.Flyout:SetFrameStrata("BACKGROUND")
EquipmentSets.Flyout:SetFrameLevel(2)
EquipmentSets.Flyout:SetPoint("TOP", EquipmentSets, "TOP", 0, 0)
EquipmentSets.Flyout:SetSize(23, 11)
EquipmentSets.Flyout.Arrow = EquipmentSets.Flyout:CreateTexture(nil, "OVERLAY", "ActionBarFlyoutButton-ArrowUp")
EquipmentSets.Flyout.Arrow:SetAllPoints()
EquipmentSets.Flyout:SetScript("OnEnter", function(self)
GameTooltip:SetOwner(self, "ANCHOR_RIGHT")
GameTooltip:ClearLines()
GameTooltip:AddLine(PAPERDOLL_EQUIPMENTMANAGER)
GameTooltip:Show()
end)
EquipmentSets.Flyout:SetScript("OnLeave", GameTooltip_Hide)
EquipmentSets.Flyout:SetScript("OnClick", function()
for i = 1, 10 do
if EquipmentSets.Button[i]:IsShown() then
EquipmentSets.Button[i]:Hide()
else
if EquipmentSets.Button[i]:GetNormalTexture():GetTexture() ~= GearTexture then
EquipmentSets.Button[i]:Show()
end
end
end
end)
for i = 1, 10 do
local Button = CreateFrame("Button", nil, EquipmentSets.Flyout)
Button:Hide()
Button:SetSize(24, 24)
Button:SetTemplate()
Button:SetFrameStrata("TOOLTIP")
Button:SetNormalTexture(GearTexture)
Button:GetNormalTexture():SetTexCoord(.1, .9, .1, .9)
Button:GetNormalTexture():SetInside()
Button:SetPoint("BOTTOM", i == 1 and EquipmentSets.Flyout or EquipmentSets.Button[i - 1], "TOP", 0, 3)
Button:SetScript("OnEnter", function(self)
local Name = C_EquipmentSet.GetEquipmentSetInfo(self:GetID())
GameTooltip:SetOwner(self, "ANCHOR_LEFT")
GameTooltip:SetEquipmentSet(Name)
end)
Button:SetScript("OnClick", function(self)
local _, Icon, Index, IsEquipped = C_EquipmentSet.GetEquipmentSetInfo(self:GetID())
EquipmentSets.Button:SetID(Index)
EquipmentSets.Button.Icon:SetTexture(Icon)
if not IsEquipped then C_EquipmentSet.UseEquipmentSet(self:GetID()) end
EquipmentSets.Flyout:Click()
end)
Button:SetScript("OnLeave", GameTooltip_Hide)
EquipmentSets.Button[i] = Button
end
EquipmentSets.Button:SetScript("OnClick", function(self)
if InCombatLockdown() then
return UIErrorsFrame:AddMessage(ERR_NOT_IN_COMBAT, 1.0, 0.1, 0.1, 1.0);
end
if not self:GetID() then
ShowUIPanel(_G["CharacterFrame"])
PaperDollFrame_SetSidebar(_G["CharacterFrame"], 3)
return
end
if not select(4, C_EquipmentSet.GetEquipmentSetInfo(self:GetID())) then
C_EquipmentSet.UseEquipmentSet(self:GetID())
end
end)
EquipmentSets.Button:SetScript("OnEnter", function(self)
local Name = C_EquipmentSet.GetEquipmentSetInfo(self:GetID())
if not Name then return end
GameTooltip:SetOwner(self, "ANCHOR_LEFT")
GameTooltip:SetEquipmentSet(Name)
end)
EquipmentSets.Button:SetScript("OnLeave", GameTooltip_Hide)
EquipmentSets.Button:RegisterEvent("PLAYER_ENTERING_WORLD")
EquipmentSets.Button:RegisterEvent("PLAYER_EQUIPMENT_CHANGED")
EquipmentSets.Button:RegisterEvent("EQUIPMENT_SETS_CHANGED")
EquipmentSets.Button:RegisterUnitEvent('UNIT_INVENTORY_CHANGED', 'player')
EquipmentSets.Button:SetScript("OnEvent", function(self)
local Index, SetEquipped = 1
for i = 1, 10 do
local _, Icon, SpecIndex, IsEquipped = C_EquipmentSet.GetEquipmentSetInfo(i - 1)
self[i]:SetNormalTexture(GearTexture)
self[i]:SetID(i)
if SpecIndex then
self[Index]:SetID(SpecIndex)
self[Index]:SetNormalTexture(Icon)
if IsEquipped then
SetEquipped = IsEquipped
self:SetID(SpecIndex)
self.Icon:SetTexture(Icon)
end
Index = Index + 1
end
end
if not SetEquipped then
self.SaveButton.Icon:SetTexture("Interface\\RaidFrame\\ReadyCheck-NotReady")
self.SaveButton:Enable()
self.SaveButton:EnableMouse(true)
else
self.SaveButton.Icon:SetTexture("Interface\\RaidFrame\\ReadyCheck-Ready")
self.SaveButton:Disable()
self.SaveButton:EnableMouse(false)
end
end)
--[[ EquipmentSets.Button.EditButton = CreateFrame("Button", nil, EquipmentSets.Button)
EquipmentSets.Button.EditButton:SetFrameLevel(2)
EquipmentSets.Button.EditButton:SetSize(14, 14)
EquipmentSets.Button.EditButton:SetPoint("BOTTOMRIGHT", EquipmentSets.Button, "BOTTOMRIGHT", 0, 0)
EquipmentSets.Button.EditButton.Icon = EquipmentSets.Button.EditButton:CreateTexture(nil, "ARTWORK")
EquipmentSets.Button.EditButton.Icon:SetTexture(GearTexture)
EquipmentSets.Button.EditButton.Icon:SetAllPoints()
EquipmentSets.Button.EditButton.Icon:SetAlpha(.5)
EquipmentSets.Button.EditButton:SetScript("OnEnter", function(self)
self.Icon:SetAlpha(1)
GameTooltip:SetOwner(self, "ANCHOR_RIGHT")
GameTooltip:SetText(EQUIPMENT_SET_EDIT)
end)
EquipmentSets.Button.EditButton:SetScript("OnLeave", function(self)
self.Icon:SetAlpha(.5)
GameTooltip_Hide()
end)
EquipmentSets.Button.EditButton:SetScript("OnClick", function(self)
local Name, Icon = C_EquipmentSet.GetEquipmentSetInfo(self:GetID())
ShowUIPanel(CharacterFrame)
PaperDollEquipmentManagerPane.selectedSetName = Name
GearManagerDialogPopup:Show()
GearManagerDialogPopup.isEdit = true
GearManagerDialogPopup.origName = Name;
RecalculateGearManagerDialogPopup(Name, Icon)
end) --]]
EquipmentSets.Button.SaveButton = CreateFrame("Button", nil, EquipmentSets.Button)
EquipmentSets.Button.SaveButton:SetFrameLevel(2)
EquipmentSets.Button.SaveButton:SetSize(14, 14)
EquipmentSets.Button.SaveButton:SetPoint("BOTTOMLEFT", EquipmentSets.Button, "BOTTOMLEFT", 0, 0)
EquipmentSets.Button.SaveButton.Icon = EquipmentSets.Button.SaveButton:CreateTexture(nil, "ARTWORK")
EquipmentSets.Button.SaveButton.Icon:SetAllPoints()
EquipmentSets.Button.SaveButton:SetScript("OnEnter", function(self)
GameTooltip:SetOwner(self, "ANCHOR_RIGHT")
GameTooltip:SetText(SAVE_CHANGES)
end)
EquipmentSets.Button.SaveButton:SetScript("OnLeave", GameTooltip_Hide)
EquipmentSets.Button.SaveButton:SetScript("OnClick", function(self, button)
C_EquipmentSet.SaveEquipmentSet(EquipmentSets.Button:GetID())
end)
end
function MAB:EquipBarInit()
self:CreateEquipBar()
end
\ No newline at end of file
......@@ -3,5 +3,6 @@
<Script file="actionbars.lua"/>
<Script file="microBar.lua"/>
<Script file="specBar.lua"/>
<Script file="equipBar.lua"/>
<Script file="options.lua"/>
</Ui>
\ No newline at end of file
......@@ -55,7 +55,7 @@ end
function MAB:CreateMicroBar()
microBar:SetFrameLevel(6)
microBar:SetSize(400, 26)
microBar:Point("TOP", E.UIParent, "TOP", 0, -15)
microBar:Point("TOP", E.UIParent, "TOP", 0, -13)
microBar:SetTemplate("Transparent")
microBar:Styling()
......@@ -285,9 +285,32 @@ function MAB:CreateMicroBar()
spellBookButton:SetScript("OnLeave", function(self) OnLeave(self) end)
spellBookButton:SetScript("OnClick", function(self) _G["ToggleSpellBook"](BOOKTYPE_SPELL) end)
--Specc Button
local speccButton = CreateFrame("Button", nil, microBar)
speccButton:SetPoint("LEFT", spellBookButton, "RIGHT", 2, 0)
speccButton:SetSize(32, 32)
speccButton:SetFrameLevel(6)
speccButton.tex = speccButton:CreateTexture(nil, "OVERLAY")
speccButton.tex:SetPoint("BOTTOMLEFT")
speccButton.tex:SetPoint("BOTTOMRIGHT")
speccButton.tex:SetSize(32, 32)
speccButton.tex:SetTexture(IconPath.."Specc")
speccButton.tex:SetVertexColor(.6, .6, .6)
speccButton.tex:SetBlendMode("ADD")
speccButton.text = MER:CreateText(speccButton, "HIGHLIGHT", 11, "OUTLINE", "CENTER")
speccButton.text:SetPoint("BOTTOM", speccButton, 2, -15)
speccButton.text:SetText(TALENTS_BUTTON)
speccButton.text:SetTextColor(MER.ClassColor.r, MER.ClassColor.g, MER.ClassColor.b)
speccButton:SetScript("OnEnter", function(self) OnHover(self) end)
speccButton:SetScript("OnLeave", function(self) OnLeave(self) end)
speccButton: