Commit dcf64491 authored by Merathilis's avatar Merathilis

Added an option to change the equipBar and specBar Button Size.

parent 702873ba
......@@ -18,6 +18,8 @@ local UIErrorsFrame = UIErrorsFrame
function MAB:CreateEquipBar()
if E.db.mui.actionbars.equipBar.enable ~= true then return end
local Size = E.db.mui.actionbars.equipBar.size or 32
local GearTexture = "Interface\\WorldMap\\GEAR_64GREY"
local EquipmentSets = CreateFrame("Frame", "EquipmentSets", E.UIParent)
EquipmentSets:SetFrameStrata("BACKGROUND")
......@@ -43,7 +45,7 @@ function MAB:CreateEquipBar()
EquipmentSets.Button:SetFrameLevel(1)
EquipmentSets.Button:SetTemplate()
EquipmentSets.Button:SetPoint("CENTER")
EquipmentSets.Button:SetSize(24, 24)
EquipmentSets.Button:SetSize(Size-6 , Size-6) -- Ugly solution
EquipmentSets.Button:SetNormalTexture("Interface\\PaperDollInfoFrame\\PaperDollSidebarTabs")
EquipmentSets.Button:GetNormalTexture():SetTexCoord(0.01562500, 0.53125000, 0.46875000, 0.60546875)
EquipmentSets.Button:GetNormalTexture():SetInside()
......@@ -94,12 +96,13 @@ function MAB:CreateEquipBar()
for i = 1, 10 do
local Button = CreateFrame("Button", nil, EquipmentSets.Flyout)
Button:Hide()
Button:SetSize(24, 24)
Button:SetSize(Size, Size)
Button:SetTemplate()
Button:SetFrameStrata("TOOLTIP")
Button:SetNormalTexture(GearTexture)
Button:GetNormalTexture():SetTexCoord(.1, .9, .1, .9)
Button:GetNormalTexture():SetInside()
Button:StyleButton()
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())
......@@ -210,6 +213,8 @@ function MAB:CreateEquipBar()
C_EquipmentSet.SaveEquipmentSet(EquipmentSets.Button:GetID())
end)
EquipmentSets:SetSize(Size, Size)
if E.db.mui.actionbars.equipBar.mouseover then
UIFrameFadeOut(EquipmentSets, 0.2, EquipmentSets:GetAlpha(), 0)
else
......
......@@ -60,6 +60,13 @@ local function abTable()
name = L["Mouseover"],
disabled = function() return not E.private.actionbar.enable end,
},
size = {
order = 3,
type = "range",
name = L["Button Size"],
min = 20, max = 60, step = 1,
disabled = function() return not E.private.actionbar.enable end,
},
},
},
equipBar = {
......@@ -83,6 +90,13 @@ local function abTable()
name = L["Mouseover"],
disabled = function() return not E.private.actionbar.enable end,
},
size = {
order = 3,
type = "range",
name = L["Button Size"],
min = 20, max = 60, step = 1,
disabled = function() return not E.private.actionbar.enable end,
},
},
},
microBar = {
......
......@@ -21,7 +21,7 @@ function MAB:CreateSpecBar()
if E.db.mui.actionbars.specBar.enable ~= true then return end
local Spacing, Mult = 4, 1
local Size = 24
local Size = E.db.mui.actionbars.specBar.size or 24
local specBar = CreateFrame("Frame", "SpecializationBar", E.UIParent)
specBar:SetFrameStrata("BACKGROUND")
......
......@@ -127,10 +127,12 @@ MP.actionbars = {
specBar = {
enable = true,
mouseover = false,
size = 24,
},
equipBar = {
enable = true,
mouseover = false,
size = 32,
},
autoButtons = {
enable = true,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment