@@ -1618,18 +1618,8 @@ local function CreateCooldownViewerItemSpellSettings(parentContainer, containerT
16181618end
16191619
16201620local function CreateCooldownViewerSettings (parentContainer , viewerType )
1621- local hasAnchorParent = viewerType == " Utility" or viewerType == " Buffs" or viewerType == " BuffBar " or viewerType == " Custom" or viewerType == " AdditionalCustom" or viewerType == " Item" or viewerType == " Trinket" or viewerType == " ItemSpell"
1621+ local hasAnchorParent = viewerType == " Utility" or viewerType == " Buffs" or viewerType == " Custom" or viewerType == " AdditionalCustom" or viewerType == " Item" or viewerType == " Trinket" or viewerType == " ItemSpell"
16221622 local isCustomViewer = viewerType == " Custom" or viewerType == " AdditionalCustom" or viewerType == " Item" or viewerType == " Trinket" or viewerType == " ItemSpell"
1623- local isBuffBar = viewerType == " BuffBar"
1624- local buffBarControls = {}
1625-
1626- local function RefreshBuffBarGUISettings ()
1627- if not isBuffBar then return end
1628- local BuffBarDB = BCDM .db .profile .CooldownManager .BuffBar
1629- if buffBarControls .widthSlider then buffBarControls .widthSlider :SetDisabled (BuffBarDB .MatchWidthOfAnchor ) end
1630- if buffBarControls .foregroundColourPicker then buffBarControls .foregroundColourPicker :SetDisabled (BuffBarDB .ColourByClass ) end
1631- if buffBarControls .iconLayoutDropdown then buffBarControls .iconLayoutDropdown :SetDisabled (not BuffBarDB .Icon .Enabled ) end
1632- end
16331623
16341624 local ScrollFrame = AG :Create (" ScrollFrame" )
16351625 ScrollFrame :SetLayout (" Flow" )
@@ -1694,90 +1684,6 @@ local function CreateCooldownViewerSettings(parentContainer, viewerType)
16941684 toggleContainer :AddChild (centerHorizontallyCheckbox )
16951685 end
16961686
1697- if viewerType == " BuffBar" then
1698- local toggleContainer = AG :Create (" InlineGroup" )
1699- toggleContainer :SetTitle (" Buff Bar Viewer Settings" )
1700- toggleContainer :SetFullWidth (true )
1701- toggleContainer :SetLayout (" Flow" )
1702- ScrollFrame :AddChild (toggleContainer )
1703-
1704- local matchWidthOfAnchorCheckBox = AG :Create (" CheckBox" )
1705- matchWidthOfAnchorCheckBox :SetLabel (" Match Width of Anchor" )
1706- matchWidthOfAnchorCheckBox :SetValue (BCDM .db .profile .CooldownManager .BuffBar .MatchWidthOfAnchor )
1707- matchWidthOfAnchorCheckBox :SetCallback (" OnValueChanged" , function (_ , _ , value )
1708- BCDM .db .profile .CooldownManager .BuffBar .MatchWidthOfAnchor = value
1709- BCDM :UpdateCooldownViewer (" BuffBar" )
1710- RefreshBuffBarGUISettings ()
1711- end )
1712- matchWidthOfAnchorCheckBox :SetRelativeWidth (0.25 )
1713- toggleContainer :AddChild (matchWidthOfAnchorCheckBox )
1714-
1715- local colourByClassCheckbox = AG :Create (" CheckBox" )
1716- colourByClassCheckbox :SetLabel (" Colour Bar by Class" )
1717- colourByClassCheckbox :SetValue (BCDM .db .profile .CooldownManager .BuffBar .ColourByClass )
1718- colourByClassCheckbox :SetCallback (" OnValueChanged" , function (_ , _ , value )
1719- BCDM .db .profile .CooldownManager .BuffBar .ColourByClass = value
1720- BCDM :UpdateCooldownViewer (" BuffBar" )
1721- RefreshBuffBarGUISettings ()
1722- end )
1723- colourByClassCheckbox :SetRelativeWidth (0.25 )
1724- toggleContainer :AddChild (colourByClassCheckbox )
1725-
1726- local foregroundColourPicker = AG :Create (" ColorPicker" )
1727- foregroundColourPicker :SetLabel (" Foreground Colour" )
1728- local r , g , b = unpack (BCDM .db .profile .CooldownManager .BuffBar .ForegroundColour )
1729- foregroundColourPicker :SetColor (r , g , b )
1730- foregroundColourPicker :SetCallback (" OnValueChanged" , function (self , _ , r , g , b , a )
1731- BCDM .db .profile .CooldownManager .BuffBar .ForegroundColour = {r , g , b , a }
1732- BCDM :UpdateCooldownViewer (" BuffBar" )
1733- end )
1734- foregroundColourPicker :SetRelativeWidth (0.25 )
1735- foregroundColourPicker :SetHasAlpha (false )
1736- toggleContainer :AddChild (foregroundColourPicker )
1737- buffBarControls .foregroundColourPicker = foregroundColourPicker
1738-
1739- local backgroundColourPicker = AG :Create (" ColorPicker" )
1740- backgroundColourPicker :SetLabel (" Background Colour" )
1741- local br , bg , bb = unpack (BCDM .db .profile .CooldownManager .BuffBar .BackgroundColour )
1742- backgroundColourPicker :SetColor (br , bg , bb )
1743- backgroundColourPicker :SetCallback (" OnValueChanged" , function (self , _ , r , g , b , a )
1744- BCDM .db .profile .CooldownManager .BuffBar .BackgroundColour = {r , g , b , a }
1745- BCDM :UpdateCooldownViewer (" BuffBar" )
1746- end )
1747- backgroundColourPicker :SetRelativeWidth (0.25 )
1748- backgroundColourPicker :SetHasAlpha (true )
1749- toggleContainer :AddChild (backgroundColourPicker )
1750-
1751- local iconContainer = AG :Create (" InlineGroup" )
1752- iconContainer :SetTitle (" Icon Layout" )
1753- iconContainer :SetFullWidth (true )
1754- iconContainer :SetLayout (" Flow" )
1755- toggleContainer :AddChild (iconContainer )
1756-
1757- local iconEnabledCheckbox = AG :Create (" CheckBox" )
1758- iconEnabledCheckbox :SetLabel (" Show Icon" )
1759- iconEnabledCheckbox :SetValue (BCDM .db .profile .CooldownManager .BuffBar .Icon .Enabled )
1760- iconEnabledCheckbox :SetCallback (" OnValueChanged" , function (_ , _ , value )
1761- BCDM .db .profile .CooldownManager .BuffBar .Icon .Enabled = value
1762- BCDM :UpdateCooldownViewer (" BuffBar" )
1763- RefreshBuffBarGUISettings ()
1764- end )
1765- iconEnabledCheckbox :SetRelativeWidth (0.5 )
1766- iconContainer :AddChild (iconEnabledCheckbox )
1767-
1768- local iconLayoutDropdown = AG :Create (" Dropdown" )
1769- iconLayoutDropdown :SetLabel (" Icon Position" )
1770- iconLayoutDropdown :SetList ({[" LEFT" ] = " Left" , [" RIGHT" ] = " Right" }, {" LEFT" , " RIGHT" })
1771- iconLayoutDropdown :SetValue (BCDM .db .profile .CooldownManager .BuffBar .Icon .Layout )
1772- iconLayoutDropdown :SetCallback (" OnValueChanged" , function (self , _ , value )
1773- BCDM .db .profile .CooldownManager .BuffBar .Icon .Layout = value
1774- BCDM :UpdateCooldownViewer (" BuffBar" )
1775- end )
1776- iconLayoutDropdown :SetRelativeWidth (0.5 )
1777- iconContainer :AddChild (iconLayoutDropdown )
1778- buffBarControls .iconLayoutDropdown = iconLayoutDropdown
1779- end
1780-
17811687 if viewerType == " Trinket" then
17821688 local enabledCheckbox = AG :Create (" CheckBox" )
17831689 enabledCheckbox :SetLabel (" Enable Trinket Viewer" )
@@ -1793,7 +1699,7 @@ local function CreateCooldownViewerSettings(parentContainer, viewerType)
17931699 layoutContainer :SetLayout (" Flow" )
17941700 ScrollFrame :AddChild (layoutContainer )
17951701
1796- if viewerType ~= " Custom" and viewerType ~= " AdditionalCustom" and viewerType ~= " Trinket" and viewerType ~= " ItemSpell" and viewerType ~= " Item" and viewerType ~= " BuffBar " then
1702+ if viewerType ~= " Custom" and viewerType ~= " AdditionalCustom" and viewerType ~= " Trinket" and viewerType ~= " ItemSpell" and viewerType ~= " Item" then
17971703 CreateInformationTag (layoutContainer , " |cFFFFCC00Padding|r is handled by |cFF00B0F7Blizzard|r, not |cFF8080FFBetter|rCooldownManager." )
17981704 end
17991705
@@ -1842,7 +1748,7 @@ local function CreateCooldownViewerSettings(parentContainer, viewerType)
18421748 layoutContainer :AddChild (spacingSlider )
18431749 end
18441750
1845- local isPrimaryViewer = viewerType == " Essential" or viewerType == " Utility" or viewerType == " Buffs" or viewerType == " BuffBar "
1751+ local isPrimaryViewer = viewerType == " Essential" or viewerType == " Utility" or viewerType == " Buffs"
18461752
18471753 local xOffsetSlider = AG :Create (" Slider" )
18481754 xOffsetSlider :SetLabel (" X Offset" )
@@ -1860,59 +1766,11 @@ local function CreateCooldownViewerSettings(parentContainer, viewerType)
18601766 yOffsetSlider :SetRelativeWidth (isPrimaryViewer and 0.5 or 0.33 )
18611767 layoutContainer :AddChild (yOffsetSlider )
18621768
1863- if viewerType == " BuffBar" then
1864- local widthSlider = AG :Create (" Slider" )
1865- widthSlider :SetLabel (" Width" )
1866- widthSlider :SetValue (BCDM .db .profile .CooldownManager .BuffBar .Width )
1867- widthSlider :SetSliderValues (50 , 3000 , 0.1 )
1868- widthSlider :SetCallback (" OnValueChanged" , function (self , _ , value )
1869- BCDM .db .profile .CooldownManager .BuffBar .Width = value
1870- BCDM :UpdateCooldownViewer (" BuffBar" )
1871- end )
1872- widthSlider :SetRelativeWidth (0.5 )
1873- layoutContainer :AddChild (widthSlider )
1874- buffBarControls .widthSlider = widthSlider
1875-
1876- local heightSlider = AG :Create (" Slider" )
1877- heightSlider :SetLabel (" Height" )
1878- heightSlider :SetValue (BCDM .db .profile .CooldownManager .BuffBar .Height )
1879- heightSlider :SetSliderValues (5 , 200 , 0.1 )
1880- heightSlider :SetCallback (" OnValueChanged" , function (self , _ , value )
1881- BCDM .db .profile .CooldownManager .BuffBar .Height = value
1882- BCDM :UpdateCooldownViewer (" BuffBar" )
1883- end )
1884- heightSlider :SetRelativeWidth (0.5 )
1885- layoutContainer :AddChild (heightSlider )
1886-
1887- local spacingSlider = AG :Create (" Slider" )
1888- spacingSlider :SetLabel (" Spacing" )
1889- spacingSlider :SetValue (BCDM .db .profile .CooldownManager .BuffBar .Spacing )
1890- spacingSlider :SetSliderValues (- 10 , 50 , 0.1 )
1891- spacingSlider :SetCallback (" OnValueChanged" , function (self , _ , value )
1892- BCDM .db .profile .CooldownManager .BuffBar .Spacing = value
1893- BCDM :UpdateCooldownViewer (" BuffBar" )
1894- end )
1895- spacingSlider :SetRelativeWidth (0.5 )
1896- layoutContainer :AddChild (spacingSlider )
1897-
1898- local growthDirectionDropdown = AG :Create (" Dropdown" )
1899- growthDirectionDropdown :SetLabel (" Growth Direction" )
1900- growthDirectionDropdown :SetList ({[" UP" ] = " Up" , [" DOWN" ] = " Down" }, {" UP" , " DOWN" })
1901- growthDirectionDropdown :SetValue (BCDM .db .profile .CooldownManager .BuffBar .GrowthDirection )
1902- growthDirectionDropdown :SetCallback (" OnValueChanged" , function (self , _ , value )
1903- BCDM .db .profile .CooldownManager .BuffBar .GrowthDirection = value
1904- BCDM :UpdateCooldownViewer (" BuffBar" )
1905- end )
1906- growthDirectionDropdown :SetRelativeWidth (0.5 )
1907- layoutContainer :AddChild (growthDirectionDropdown )
1908- end
1909-
1910- if not isBuffBar then
1911- local iconContainer = AG :Create (" InlineGroup" )
1912- iconContainer :SetTitle (" Icon Settings" )
1913- iconContainer :SetFullWidth (true )
1914- iconContainer :SetLayout (" Flow" )
1915- ScrollFrame :AddChild (iconContainer )
1769+ local iconContainer = AG :Create (" InlineGroup" )
1770+ iconContainer :SetTitle (" Icon Settings" )
1771+ iconContainer :SetFullWidth (true )
1772+ iconContainer :SetLayout (" Flow" )
1773+ ScrollFrame :AddChild (iconContainer )
19161774
19171775 local keepAspectCheckbox = AG :Create (" CheckBox" )
19181776 keepAspectCheckbox :SetLabel (" Keep Aspect Ratio" )
@@ -1986,8 +1844,7 @@ local function CreateCooldownViewerSettings(parentContainer, viewerType)
19861844 LEMO :ApplyChanges ()
19871845 end )
19881846
1989- UpdateIconSizeControlState ()
1990- end
1847+ UpdateIconSizeControlState ()
19911848
19921849 if isCustomViewer then
19931850 local frameStrataDropdown = AG :Create (" Dropdown" )
@@ -1999,96 +1856,9 @@ local function CreateCooldownViewerSettings(parentContainer, viewerType)
19991856 layoutContainer :AddChild (frameStrataDropdown )
20001857 end
20011858
2002- if isBuffBar then
2003- local function CreateBuffBarTextSettings (title , textDB )
2004- local textContainer = AG :Create (" InlineGroup" )
2005- textContainer :SetTitle (title )
2006- textContainer :SetFullWidth (true )
2007- textContainer :SetLayout (" Flow" )
2008- ScrollFrame :AddChild (textContainer )
2009-
2010- local enabledCheckbox = AG :Create (" CheckBox" )
2011- enabledCheckbox :SetLabel (" Enable Text" )
2012- enabledCheckbox :SetValue (textDB .Enabled )
2013- enabledCheckbox :SetRelativeWidth (1 )
2014- textContainer :AddChild (enabledCheckbox )
2015-
2016- local anchorFromDropdown = AG :Create (" Dropdown" )
2017- anchorFromDropdown :SetLabel (" Anchor From" )
2018- anchorFromDropdown :SetList (AnchorPoints [1 ], AnchorPoints [2 ])
2019- anchorFromDropdown :SetValue (textDB .Layout [1 ])
2020- anchorFromDropdown :SetCallback (" OnValueChanged" , function (self , _ , value ) textDB .Layout [1 ] = value BCDM :UpdateCooldownViewer (" BuffBar" ) end )
2021- anchorFromDropdown :SetRelativeWidth (0.5 )
2022- textContainer :AddChild (anchorFromDropdown )
2023-
2024- local anchorToDropdown = AG :Create (" Dropdown" )
2025- anchorToDropdown :SetLabel (" Anchor To" )
2026- anchorToDropdown :SetList (AnchorPoints [1 ], AnchorPoints [2 ])
2027- anchorToDropdown :SetValue (textDB .Layout [2 ])
2028- anchorToDropdown :SetCallback (" OnValueChanged" , function (self , _ , value ) textDB .Layout [2 ] = value BCDM :UpdateCooldownViewer (" BuffBar" ) end )
2029- anchorToDropdown :SetRelativeWidth (0.5 )
2030- textContainer :AddChild (anchorToDropdown )
2031-
2032- local xOffsetSlider = AG :Create (" Slider" )
2033- xOffsetSlider :SetLabel (" X Offset" )
2034- xOffsetSlider :SetValue (textDB .Layout [3 ])
2035- xOffsetSlider :SetSliderValues (- 500 , 500 , 0.1 )
2036- xOffsetSlider :SetCallback (" OnValueChanged" , function (self , _ , value ) textDB .Layout [3 ] = value BCDM :UpdateCooldownViewer (" BuffBar" ) end )
2037- xOffsetSlider :SetRelativeWidth (0.5 )
2038- textContainer :AddChild (xOffsetSlider )
2039-
2040- local yOffsetSlider = AG :Create (" Slider" )
2041- yOffsetSlider :SetLabel (" Y Offset" )
2042- yOffsetSlider :SetValue (textDB .Layout [4 ])
2043- yOffsetSlider :SetSliderValues (- 500 , 500 , 0.1 )
2044- yOffsetSlider :SetCallback (" OnValueChanged" , function (self , _ , value ) textDB .Layout [4 ] = value BCDM :UpdateCooldownViewer (" BuffBar" ) end )
2045- yOffsetSlider :SetRelativeWidth (0.5 )
2046- textContainer :AddChild (yOffsetSlider )
2047-
2048- local fontSizeSlider = AG :Create (" Slider" )
2049- fontSizeSlider :SetLabel (" Font Size" )
2050- fontSizeSlider :SetValue (textDB .FontSize )
2051- fontSizeSlider :SetSliderValues (6 , 72 , 1 )
2052- fontSizeSlider :SetCallback (" OnValueChanged" , function (self , _ , value ) textDB .FontSize = value BCDM :UpdateCooldownViewer (" BuffBar" ) end )
2053- fontSizeSlider :SetRelativeWidth (0.5 )
2054- textContainer :AddChild (fontSizeSlider )
2055-
2056- local colourPicker = AG :Create (" ColorPicker" )
2057- colourPicker :SetLabel (" Font Colour" )
2058- local r , g , b = unpack (textDB .Colour )
2059- colourPicker :SetColor (r , g , b )
2060- colourPicker :SetCallback (" OnValueChanged" , function (self , _ , r , g , b ) textDB .Colour = {r , g , b } BCDM :UpdateCooldownViewer (" BuffBar" ) end )
2061- colourPicker :SetRelativeWidth (0.5 )
2062- textContainer :AddChild (colourPicker )
2063-
2064- local function RefreshTextSettings ()
2065- local enabled = textDB .Enabled
2066- anchorFromDropdown :SetDisabled (not enabled )
2067- anchorToDropdown :SetDisabled (not enabled )
2068- xOffsetSlider :SetDisabled (not enabled )
2069- yOffsetSlider :SetDisabled (not enabled )
2070- fontSizeSlider :SetDisabled (not enabled )
2071- colourPicker :SetDisabled (not enabled )
2072- end
2073-
2074- enabledCheckbox :SetCallback (" OnValueChanged" , function (self , _ , value )
2075- textDB .Enabled = value
2076- RefreshTextSettings ()
2077- BCDM :UpdateCooldownViewer (" BuffBar" )
2078- end )
2079-
2080- RefreshTextSettings ()
2081- end
2082-
2083- CreateBuffBarTextSettings (" Spell Name Text" , BCDM .db .profile .CooldownManager .BuffBar .Text .SpellName )
2084- CreateBuffBarTextSettings (" Duration Text" , BCDM .db .profile .CooldownManager .BuffBar .Text .Duration )
2085-
2086- RefreshBuffBarGUISettings ()
2087- else
2088- CreateCooldownViewerTextSettings (ScrollFrame , viewerType )
2089- end
1859+ CreateCooldownViewerTextSettings (ScrollFrame , viewerType )
20901860
2091- if not isBuffBar and ( viewerType == " Custom" or viewerType == " AdditionalCustom" ) then
1861+ if viewerType == " Custom" or viewerType == " AdditionalCustom" then
20921862 local spellContainer = AG :Create (" InlineGroup" )
20931863 spellContainer :SetTitle (" Custom Spells" )
20941864 spellContainer :SetFullWidth (true )
@@ -2097,7 +1867,7 @@ local function CreateCooldownViewerSettings(parentContainer, viewerType)
20971867 CreateCooldownViewerSpellSettings (spellContainer , viewerType , ScrollFrame )
20981868 end
20991869
2100- if not isBuffBar and viewerType == " Item" then
1870+ if viewerType == " Item" then
21011871 local itemContainer = AG :Create (" InlineGroup" )
21021872 itemContainer :SetTitle (" Custom Items" )
21031873 itemContainer :SetFullWidth (true )
@@ -2106,7 +1876,7 @@ local function CreateCooldownViewerSettings(parentContainer, viewerType)
21061876 CreateCooldownViewerItemSettings (itemContainer , ScrollFrame )
21071877 end
21081878
2109- if not isBuffBar and viewerType == " ItemSpell" then
1879+ if viewerType == " ItemSpell" then
21101880 local itemSpellContainer = AG :Create (" InlineGroup" )
21111881 itemSpellContainer :SetTitle (" Items & Spells" )
21121882 itemSpellContainer :SetFullWidth (true )
@@ -3266,8 +3036,6 @@ function BCDM:CreateGUI()
32663036 CreateCooldownViewerSettings (Wrapper , " Utility" )
32673037 elseif MainTab == " Buffs" then
32683038 CreateCooldownViewerSettings (Wrapper , " Buffs" )
3269- elseif MainTab == " BuffBar" then
3270- CreateCooldownViewerSettings (Wrapper , " BuffBar" )
32713039 elseif MainTab == " Custom" then
32723040 CreateCooldownViewerSettings (Wrapper , " Custom" )
32733041 elseif MainTab == " AdditionalCustom" then
@@ -3287,7 +3055,7 @@ function BCDM:CreateGUI()
32873055 elseif MainTab == " Profiles" then
32883056 CreateProfileSettings (Wrapper )
32893057 end
3290- if MainTab == " Essential" or MainTab == " Utility" or MainTab == " Buffs" or MainTab == " BuffBar " then CooldownViewerSettings :Show () else CooldownViewerSettings :Hide () end
3058+ if MainTab == " Essential" or MainTab == " Utility" or MainTab == " Buffs" then CooldownViewerSettings :Show () else CooldownViewerSettings :Hide () end
32913059 if MainTab == " CastBar" then BCDM .CAST_BAR_TEST_MODE = true BCDM :CreateTestCastBar () else BCDM .CAST_BAR_TEST_MODE = false BCDM :CreateTestCastBar () end
32923060 if MainTab == " Essential" then BCDM .EssentialCooldownViewerOverlay :Show () else BCDM .EssentialCooldownViewerOverlay :Hide () end
32933061 if MainTab == " Utility" then BCDM .UtilityCooldownViewerOverlay :Show () else BCDM .UtilityCooldownViewerOverlay :Hide () end
@@ -3305,7 +3073,6 @@ function BCDM:CreateGUI()
33053073 { text = " Essential" , value = " Essential" },
33063074 { text = " Utility" , value = " Utility" },
33073075 { text = " Buffs" , value = " Buffs" },
3308- { text = " Buff Bars" , value = " BuffBar" },
33093076 { text = " Custom" , value = " Custom" },
33103077 { text = " Additional Custom" , value = " AdditionalCustom" },
33113078 { text = " Item" , value = " Item" },
0 commit comments