- Update to add back background frame to sliders. Thanks to gulfar for the code!
urnati [10-17-20 - 19:56]
- Update to add back background frame to sliders. Thanks to gulfar for the code!
diff --git a/Titan/TitanPanelTemplate.lua b/Titan/TitanPanelTemplate.lua
index 9dd6e1f..97b4da8 100644
--- a/Titan/TitanPanelTemplate.lua
+++ b/Titan/TitanPanelTemplate.lua
@@ -1046,3 +1046,23 @@ function TitanPanelButton_GetType(id)
return type;
end
+--[[ Titan
+NAME: TitanOptionsSliderTemplate_OnLoad
+DESC: Loads the Backdrop for TitanOptionsSliderTemplate with new 9.0 API
+VAR: self - The frame
+--]]
+function TitanOptionsSliderTemplate_OnLoad(self)
+ self:SetBackdrop({
+ bgFile="Interface\\Buttons\\UI-SliderBar-Background",
+ edgeFile="Interface\\Buttons\\UI-SliderBar-Border",
+ tile = true,
+ insets = {
+ left = 6,
+ right = 6,
+ top = 3,
+ bottom = 3,
+ },
+ tileSize = 8,
+ edgeSize = 8,
+ })
+end
diff --git a/Titan/TitanPanelTemplate.xml b/Titan/TitanPanelTemplate.xml
index 19f99e7..995d060 100644
--- a/Titan/TitanPanelTemplate.xml
+++ b/Titan/TitanPanelTemplate.xml
@@ -162,5 +162,9 @@
<AbsDimension x="32" y="32"/>
</Size>
</ThumbTexture>
- </Slider>
+ <Scripts>
+ <OnLoad>
+ TitanOptionsSliderTemplate_OnLoad(self);
+ </OnLoad>
+ </Scripts> </Slider>
</Ui>