diff --git a/SVUITheme_Warcraft/SVUITheme_Warcraft.lua b/SVUITheme_Warcraft/SVUITheme_Warcraft.lua new file mode 100644 index 0000000..01e1531 --- /dev/null +++ b/SVUITheme_Warcraft/SVUITheme_Warcraft.lua @@ -0,0 +1,206 @@ +--[[ +############################################################################## +S U P E R - V I L L A I N - T H E M E By: Munglunch +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local select = _G.select; +local math = _G.math; +local table = _G.table; +--[[ TABLE METHODS ]]-- +local tsort = table.sort; +--[[ MATH METHODS ]]-- +local random = math.random; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV = _G["SVUI"]; +local LSM = _G.LibStub("LibSharedMedia-3.0"); + +LSM:Register("background", "SVUI Backdrop", [[Interface\DialogFrame\UI-DialogBox-Background]]) + +LSM:Register("border", "SVUI Warcraft Basic Border", [[Interface\Glues\COMMON\TextPanel-Border]]) +LSM:Register("border", "SVUI Warcraft Dialog Border", [[Interface\DialogFrame\UI-DialogBox-Border]]) +LSM:Register("border", "SVUI Warcraft Fancy Border", [[Interface\AddOns\SVUITheme_Warcraft\assets\artwork\THEMED-BORDER1]]) + +SV:AssignMedia("font", "default", "Arial Narrow"); +SV:AssignMedia("font", "dialog", "Arial Narrow"); +SV:AssignMedia("font", "title", "Arial Narrow"); +SV:AssignMedia("font", "narrator", "Arial Narrow"); +SV:AssignMedia("font", "lootdialog", "Arial Narrow"); +SV:AssignMedia("font", "rolldialog", "Arial Narrow"); +SV:AssignMedia("font", "number", "Friz Quadrata TT"); +SV:AssignMedia("font", "number_big", "Friz Quadrata TT"); +SV:AssignMedia("font", "header", "Friz Quadrata TT"); +SV:AssignMedia("font", "aura", "Friz Quadrata TT"); +SV:AssignMedia("font", "data", "Friz Quadrata TT"); +SV:AssignMedia("font", "lootnumber", "Friz Quadrata TT"); +SV:AssignMedia("font", "rollnumber", "Friz Quadrata TT"); +SV:AssignMedia("font", "combat", "Morpheus"); +SV:AssignMedia("font", "zone", "Morpheus"); +SV:AssignMedia("font", "alert", "Skurri"); +SV:AssignMedia("font", "caps", "Skurri"); + +SV:AssignMedia("background", "default", "SVUI Backdrop", 0, false); +SV:AssignMedia("background", "pattern", "SVUI Backdrop", 0, false); +SV:AssignMedia("background", "premium", "SVUI Backdrop", 0, false); +SV:AssignMedia("background", "button", "SVUI Default BG", 0, false); +SV:AssignMedia("background", "unitlarge", "SVUI Backdrop", 0, false); +SV:AssignMedia("background", "unitsmall", "SVUI Backdrop", 0, false); + +SV:AssignMedia("border", "actionpanel", "SVUI Warcraft Fancy Border", 15); +SV:AssignMedia("border", "unitlarge", "SVUI Warcraft Fancy Border", 15); +SV:AssignMedia("border", "unitsmall", "SVUI Warcraft Fancy Border", 15); +--SV:AssignMedia("bordercolor", "default", 1, 1, 1, 1); +SV:AssignMedia("template", "Default", "SVUITheme_Warcraft_Default"); +SV:AssignMedia("template", "Button", "SVUITheme_Warcraft_DockButton"); +SV:AssignMedia("template", "DockButton", "SVUITheme_Warcraft_DockButton"); +SV:AssignMedia("template", "Pattern", "SVUITheme_Warcraft_Default"); +SV:AssignMedia("template", "Premium", "SVUITheme_Warcraft_Default"); +SV:AssignMedia("template", "Model", "SVUITheme_Warcraft_Default"); +SV:AssignMedia("template", "Window", "SVUITheme_Warcraft_Default"); +SV:AssignMedia("template", "Window2", "SVUITheme_Warcraft_Default"); +SV:AssignMedia("template", "Minimap", "SVUITheme_Warcraft_Minimap"); +SV:AssignMedia("template", "ActionPanel", "SVUITheme_Warcraft_ActionPanel"); +SV:AssignMedia("template", "Container", "SVUITheme_Warcraft_Default"); + +local _RefreshZoneText = function(self) + if(self.InfoTop:IsShown()) then + self.InfoTop:Hide(); + end + if(not SV.db.Maps.locationText or SV.db.Maps.locationText == "HIDE") then + self.InfoBottom:Hide(); + else + self.InfoBottom:Show(); + local zone = GetRealZoneText() or UNKNOWN + self.InfoBottom.Text:SetText(zone) + end +end + +local docksparks = { + [[Interface\AddOns\SVUITheme_Warcraft\assets\artwork\Dock\DOCK-SPARKS-1]], + [[Interface\AddOns\SVUITheme_Warcraft\assets\artwork\Dock\DOCK-SPARKS-2]], + [[Interface\AddOns\SVUITheme_Warcraft\assets\artwork\Dock\DOCK-SPARKS-3]], +}; + +local _SetDockButtonTheme = function(_, button, size) + local sparkSize = size * 5; + local sparkOffset = size * 0.5; + + button:SetStyle() + + local sparks = button:CreateTexture(nil, "OVERLAY", nil, 2) + sparks:ModSize(sparkSize, sparkSize) + sparks:SetPoint("CENTER", button, "BOTTOMRIGHT", -sparkOffset, 4) + sparks:SetTexture(docksparks[1]) + sparks:SetVertexColor(0.7, 0.6, 0.5) + sparks:SetBlendMode("ADD") + sparks:SetAlpha(0) + + SV.Animate:Sprite8(sparks, 0.08, 2, false, true) + + button.Sparks = sparks; + + button.ClickTheme = function(self) + self.Sparks:SetTexture(docksparks[random(1,3)]) + self.Sparks.anim:Play() + end +end + +local _SetDockStyleTheme = function(dock, isBottom) + if dock.backdrop then return end + + local backdrop = CreateFrame("Frame", nil, dock) + backdrop:SetAllPoints(dock) + backdrop:SetFrameStrata("BACKGROUND") + backdrop:SetBackdrop({ + bgFile = [[Interface\DialogFrame\UI-DialogBox-Background]], + tile = false, + tileSize = 0, + edgeFile = [[Interface\Glues\COMMON\TextPanel-Border]], + edgeSize = 15, + insets = + { + left = 0, + right = 0, + top = 0, + bottom = 0, + }, + }); + backdrop:SetBackdropColor(0,0,0,0.5); + backdrop:SetBackdropBorderColor(1,1,1,1); + + return backdrop +end + +local _SetBorderTheme = function(self) + self.Border.Top:ModPoint("TOPLEFT", SV.Screen, "TOPLEFT", -1, 1) + self.Border.Top:ModPoint("TOPRIGHT", SV.Screen, "TOPRIGHT", 1, 1) + self.Border.Top:ModHeight(10) + self.Border.Top:SetBackdrop({ + bgFile = [[Interface\BUTTONS\WHITE8X8]], + edgeFile = [[Interface\BUTTONS\WHITE8X8]], + tile = false, + tileSize = 0, + edgeSize = 1, + insets = {left = 0, right = 0, top = 0, bottom = 0} + }) + self.Border.Top:SetBackdropColor(0,0,0,0) + self.Border.Top:SetBackdropBorderColor(0,0,0,0) + self.Border.Top:SetFrameLevel(0) + self.Border.Top:SetFrameStrata('BACKGROUND') + self.Border.Top:SetScript("OnShow", function(self) + self:SetFrameLevel(0) + self:SetFrameStrata('BACKGROUND') + end) + + self.Border.Bottom:ModPoint("BOTTOMLEFT", SV.Screen, "BOTTOMLEFT", -1, -1) + self.Border.Bottom:ModPoint("BOTTOMRIGHT", SV.Screen, "BOTTOMRIGHT", 1, -1) + self.Border.Bottom:ModHeight(10) + self.Border.Bottom:SetBackdrop({ + bgFile = [[Interface\BUTTONS\WHITE8X8]], + edgeFile = [[Interface\BUTTONS\WHITE8X8]], + tile = false, + tileSize = 0, + edgeSize = 1, + insets = {left = 0, right = 0, top = 0, bottom = 0} + }) + self.Border.Bottom:SetBackdropColor(0,0,0,0) + self.Border.Bottom:SetBackdropBorderColor(0,0,0,0) + self.Border.Bottom:SetFrameLevel(0) + self.Border.Bottom:SetFrameStrata('BACKGROUND') + self.Border.Bottom:SetScript("OnShow", function(self) + self:SetFrameLevel(0) + self:SetFrameStrata('BACKGROUND') + end) +end + +function SV:LoadTheme() + if(self.defaults.UnitFrames) then + self:AssignMedia("font", "unitprimary", "Friz Quadrata TT", 14); + self:AssignMedia("font", "unitsecondary", "Friz Quadrata TT", 14); + self:AssignMedia("font", "unitaurabar", "Skurri", 12); + self:AssignMedia("font", "unitaura", "Arial Narrow", 12); + end + if(self.defaults.Maps) then + self:AssignMedia("font", "mapinfo", "Friz Quadrata TT", 14); + self:AssignMedia("font", "mapcoords", "Friz Quadrata TT", 14); + self.defaults.Maps.locationText = "SIMPLE"; + self.defaults.Maps.bordersize = 1; + self.defaults.Maps.bordercolor = "dark"; + end + if(self.Maps) then + self.Maps.RefreshZoneText = _RefreshZoneText + end + + self.Dock.SetButtonTheme = _SetDockButtonTheme + self.Dock.SetThemeDockStyle = _SetDockStyleTheme + self.Dock.SetBorderTheme = _SetBorderTheme +end diff --git a/SVUITheme_Warcraft/SVUITheme_Warcraft.toc b/SVUITheme_Warcraft/SVUITheme_Warcraft.toc new file mode 100644 index 0000000..abde971 --- /dev/null +++ b/SVUITheme_Warcraft/SVUITheme_Warcraft.toc @@ -0,0 +1,17 @@ +## Interface: 60000 +## Author: S.Jackson +## Version: 1.0.0 +## Title: |cffFF9900SVUI Theme: |r|cff00EFFFWarcraft|r +## Notes: Warcraft Theme for [|cff9911FFSVUI Framework|r]. +## RequiredDeps: SVUI_!Core +## OptionalDeps: LibSharedMedia-3.0 +## LoadOnDemand: 1 +## DefaultState: disabled +## X-SVUITheme: Warcraft +## X-Email: munglunch@gmail.com +## X-Website: http://www.supervillainui.com +## X-Donate: PayPal:munglunch@gmail.com +## X-License: MIT +## X-Category: Interface Enhancements + +SVUITheme_Warcraft.xml diff --git a/SVUITheme_Warcraft/SVUITheme_Warcraft.xml b/SVUITheme_Warcraft/SVUITheme_Warcraft.xml new file mode 100644 index 0000000..f9b5da5 --- /dev/null +++ b/SVUITheme_Warcraft/SVUITheme_Warcraft.xml @@ -0,0 +1,267 @@ +<Ui xmlns="http://www.blizzard.com/wow/ui/"> + <Frame name="SVUITheme_Warcraft_Default" virtual="true"> + <Attributes> + <Attribute name="panelID" type="string" value="default" /> + <Attribute name="panelPadding" type="number" value="1" /> + <Attribute name="panelColor" type="string" value="default" /> + <Attribute name="panelGradient" type="string" value="default" /> + <Attribute name="panelTexUpdate" type="boolean" value="false" /> + <Attribute name="panelSkipUpdate" type="boolean" value="false" /> + <Attribute name="panelBorderColor" type="string" value="light" /> + </Attributes> + <Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\Glues\COMMON\TextPanel-Border" tile="false"> + <EdgeSize val="15" /> + <TileSize val="0" /> + <BackgroundInsets left="0" right="0" top="0" bottom="0" /> + <Color r="0.2" g="0.2" b="0.2" a="1" /> + <BorderColor r="1" g="1" b="1" a="1" /> + </Backdrop> + </Frame> + <Frame name="SVUITheme_Warcraft_Pattern" virtual="true"> + <Attributes> + <Attribute name="panelID" type="string" value="pattern" /> + <Attribute name="panelPadding" type="number" value="3" /> + <Attribute name="panelColor" type="string" value="special" /> + <Attribute name="panelGradient" type="string" value="special" /> + <Attribute name="panelTexUpdate" type="boolean" value="true" /> + <Attribute name="panelSkipUpdate" type="boolean" value="false" /> + </Attributes> + <Backdrop bgFile="Interface\FrameGeneral\UI-Background-Marble" edgeFile="Interface\Glues\COMMON\TextPanel-Border" tile="false"> + <EdgeSize val="15" /> + <TileSize val="0" /> + <BackgroundInsets left="0" right="0" top="0" bottom="0" /> + <Color r="0.37" g="0.32" b="0.29" a="1" /> + <BorderColor r="0" g="0" b="0" a="1" /> + </Backdrop> + <Frames> + <Frame parentKey="Shadow" inherits="SVUI_ShadowTemplate" /> + </Frames> + </Frame> + <Frame name="SVUITheme_Warcraft_DockButton" virtual="true"> + <Attributes> + <Attribute name="panelID" type="string" value="heavy" /> + <Attribute name="panelPadding" type="number" value="1" /> + <Attribute name="panelColor" type="string" value="default" /> + <Attribute name="panelGradient" type="string" value="default" /> + <Attribute name="panelTexUpdate" type="boolean" value="true" /> + <Attribute name="panelSkipUpdate" type="boolean" value="false" /> + </Attributes> + <Backdrop bgFile="Interface\BUTTONS\WHITE8X8" edgeFile="Interface\BUTTONS\WHITE8X8" tile="false"> + <EdgeSize val="1" /> + <TileSize val="0" /> + <BackgroundInsets left="0" right="0" top="0" bottom="0" /> + <Color r="0.2" g="0.2" b="0.2" a="1" /> + <BorderColor r="0" g="0" b="0" a="1" /> + </Backdrop> + <Layers> + <Layer level="BACKGROUND" textureSubLevel="1"> + <Texture parentKey="Skin" nonBlocking="true" file="Interface\AddOns\SVUITheme_Warcraft\assets\artwork\HEAVY" setAllPoints="true" /> + <Color r="0.2" g="0.2" b="0.2" a="1" /> + </Layer> + <Layer level="BORDER"> + <Texture parentKey="BorderLeft" file="Interface\BUTTONS\WHITE8X8"> + <Anchors> + <Anchor point="TOPLEFT" relativePoint="TOPLEFT" /> + <Anchor point="BOTTOMLEFT" relativePoint="BOTTOMLEFT" /> + </Anchors> + <Size> + <AbsDimension x="1" /> + </Size> + <Color r="0" g="0" b="0" a="1" /> + </Texture> + <Texture parentKey="BorderRight" file="Interface\BUTTONS\WHITE8X8"> + <Anchors> + <Anchor point="TOPRIGHT" relativePoint="TOPRIGHT" /> + <Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" /> + </Anchors> + <Size> + <AbsDimension x="1" /> + </Size> + <Color r="0" g="0" b="0" a="1" /> + </Texture> + <Texture parentKey="BorderTop" file="Interface\BUTTONS\WHITE8X8"> + <Anchors> + <Anchor point="TOPLEFT" relativePoint="TOPLEFT" /> + <Anchor point="TOPRIGHT" relativePoint="TOPRIGHT" /> + </Anchors> + <Size> + <AbsDimension y="1" /> + </Size> + <Color r="0" g="0" b="0" a="1" /> + </Texture> + <Texture parentKey="BorderBottom" file="Interface\BUTTONS\WHITE8X8"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativePoint="BOTTOMLEFT" /> + <Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" /> + </Anchors> + <Size> + <AbsDimension y="1" /> + </Size> + <Color r="0" g="0" b="0" a="1" /> + </Texture> + </Layer> + </Layers> + <Frames> + <Frame parentKey="Shadow" inherits="SVUI_ShadowTemplate" /> + </Frames> + </Frame> + <Frame name="SVUITheme_Warcraft_Window" virtual="true"> + <Attributes> + <Attribute name="panelID" type="string" value="window" /> + <Attribute name="panelPadding" type="number" value="2" /> + <Attribute name="panelColor" type="string" value="light" /> + <Attribute name="panelGradient" type="string" value="light" /> + <Attribute name="panelTexUpdate" type="boolean" value="true" /> + <Attribute name="panelSkipUpdate" type="boolean" value="false" /> + <Attribute name="panelOffset" type="number" value="6" /> + <Attribute name="panelBorderColor" type="string" value="light" /> + </Attributes> + <Backdrop bgFile="Interface\FrameGeneral\UI-Background-Rock" edgeFile="Interface\Glues\COMMON\TextPanel-Border" tile="false"> + <EdgeSize val="20" /> + <TileSize val="0" /> + <BackgroundInsets left="3" right="3" top="3" bottom="3" /> + <Color r="1" g="1" b="1" a="1" /> + <BorderColor r="1" g="1" b="1" a="1" /> + </Backdrop> + <Layers> + <Layer level="BACKGROUND" textureSubLevel="2"> + <Texture parentKey="TopLeft" nonBlocking="true" file="Interface\AddOns\SVUI_!Core\assets\textures\EMPTY"> + <Anchors> + <Anchor point="TOPLEFT" relativePoint="TOPLEFT" x="5" y="-5" /> + <Anchor point="TOPRIGHT" relativePoint="TOP" x="0" y="-5" /> + <Anchor point="BOTTOMLEFT" relativePoint="LEFT" x="5" y="0" /> + </Anchors> + <Color r="0.05" g="0.05" b="0.05" a="0.5" /> + </Texture> + <Texture parentKey="TopRight" nonBlocking="true" file="Interface\AddOns\SVUI_!Core\assets\textures\EMPTY"> + <Anchors> + <Anchor point="TOPRIGHT" relativePoint="TOPRIGHT" x="-5" y="-5" /> + <Anchor point="TOPLEFT" relativePoint="TOP" x="0" y="-5" /> + <Anchor point="BOTTOMRIGHT" relativePoint="RIGHT" x="-5" y="0" /> + </Anchors> + <Color r="0.05" g="0.05" b="0.05" a="0.5" /> + </Texture> + <Texture parentKey="BottomLeft" nonBlocking="true" file="Interface\AddOns\SVUI_!Core\assets\textures\EMPTY"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativePoint="BOTTOMLEFT" x="5" y="5" /> + <Anchor point="BOTTOMRIGHT" relativePoint="BOTTOM" x="0" y="5" /> + <Anchor point="TOPLEFT" relativePoint="LEFT" x="5" y="0" /> + </Anchors> + <Color r="0.1" g="0.1" b="0.1" a="0.5" /> + </Texture> + <Texture parentKey="BottomRight" nonBlocking="true" file="Interface\AddOns\SVUI_!Core\assets\textures\EMPTY"> + <Anchors> + <Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" x="-5" y="5" /> + <Anchor point="BOTTOMLEFT" relativePoint="BOTTOM" x="0" y="5" /> + <Anchor point="TOPRIGHT" relativePoint="RIGHT" x="-5" y="0" /> + </Anchors> + <Color r="0.1" g="0.1" b="0.1" a="0.5" /> + </Texture> + </Layer> + </Layers> + </Frame> + <Frame name="SVUITheme_Warcraft_Window2" virtual="true"> + <Attributes> + <Attribute name="panelID" type="string" value="window2" /> + <Attribute name="panelPadding" type="number" value="2" /> + <Attribute name="panelColor" type="string" value="light" /> + <Attribute name="panelGradient" type="string" value="light" /> + <Attribute name="panelTexUpdate" type="boolean" value="true" /> + <Attribute name="panelSkipUpdate" type="boolean" value="false" /> + <Attribute name="panelOffset" type="number" value="6" /> + <Attribute name="panelBorderColor" type="string" value="light" /> + </Attributes> + <Backdrop bgFile="Interface\FrameGeneral\UI-Background-Marble" edgeFile="Interface\Glues\COMMON\TextPanel-Border" tile="false"> + <EdgeSize val="20" /> + <TileSize val="0" /> + <BackgroundInsets left="3" right="3" top="3" bottom="3" /> + <Color r="1" g="1" b="1" a="1" /> + <BorderColor r="1" g="1" b="1" a="1" /> + </Backdrop> + <Layers> + <Layer level="BACKGROUND" textureSubLevel="2"> + <Texture parentKey="TopLeft" nonBlocking="true" file="Interface\AddOns\SVUI_!Core\assets\textures\EMPTY"> + <Anchors> + <Anchor point="TOPLEFT" relativePoint="TOPLEFT" x="5" y="-5" /> + <Anchor point="TOPRIGHT" relativePoint="TOP" x="0" y="-5" /> + <Anchor point="BOTTOMLEFT" relativePoint="LEFT" x="5" y="0" /> + </Anchors> + <Color r="0.05" g="0.05" b="0.05" a="0.5" /> + </Texture> + <Texture parentKey="TopRight" nonBlocking="true" file="Interface\AddOns\SVUI_!Core\assets\textures\EMPTY"> + <Anchors> + <Anchor point="TOPRIGHT" relativePoint="TOPRIGHT" x="-5" y="-5" /> + <Anchor point="TOPLEFT" relativePoint="TOP" x="0" y="-5" /> + <Anchor point="BOTTOMRIGHT" relativePoint="RIGHT" x="-5" y="0" /> + </Anchors> + <Color r="0.05" g="0.05" b="0.05" a="0.5" /> + </Texture> + <Texture parentKey="BottomLeft" nonBlocking="true" file="Interface\AddOns\SVUI_!Core\assets\textures\EMPTY"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativePoint="BOTTOMLEFT" x="5" y="5" /> + <Anchor point="BOTTOMRIGHT" relativePoint="BOTTOM" x="0" y="5" /> + <Anchor point="TOPLEFT" relativePoint="LEFT" x="5" y="0" /> + </Anchors> + <Color r="0.1" g="0.1" b="0.1" a="0.5" /> + </Texture> + <Texture parentKey="BottomRight" nonBlocking="true" file="Interface\AddOns\SVUI_!Core\assets\textures\EMPTY"> + <Anchors> + <Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" x="-5" y="5" /> + <Anchor point="BOTTOMLEFT" relativePoint="BOTTOM" x="0" y="5" /> + <Anchor point="TOPRIGHT" relativePoint="RIGHT" x="-5" y="0" /> + </Anchors> + <Color r="0.1" g="0.1" b="0.1" a="0.5" /> + </Texture> + </Layer> + </Layers> + </Frame> + <Frame name="SVUITheme_Warcraft_ActionPanel" virtual="true"> + <Attributes> + <Attribute name="panelID" type="string" value="actionpanel" /> + <Attribute name="panelPadding" type="number" value="1" /> + <Attribute name="panelColor" type="string" value="darkest" /> + <Attribute name="panelGradient" type="boolean" value="false" /> + <Attribute name="panelTexUpdate" type="boolean" value="false" /> + <Attribute name="panelSkipUpdate" type="boolean" value="false" /> + <Attribute name="panelBorderColor" type="string" value="light" /> + <Attribute name="panelOffset" type="number" value="5" /> + </Attributes> + <Backdrop bgFile="Interface\AddOns\SVUI_!Core\assets\textures\EMPTY" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="false"> + <EdgeSize val="20" /> + <TileSize val="0" /> + <BackgroundInsets left="0" right="0" top="0" bottom="0" /> + <Color r="0" g="0" b="0" a="0" /> + <BorderColor r="1" g="1" b="1" a="1" /> + </Backdrop> + </Frame> + <Frame name="SVUITheme_Warcraft_Minimap" virtual="true"> + <Attributes> + <Attribute name="panelID" type="string" value="minimap" /> + <Attribute name="panelPadding" type="number" value="2" /> + <Attribute name="panelColor" type="string" value="light" /> + <Attribute name="panelGradient" type="string" value="light" /> + <Attribute name="panelTexUpdate" type="boolean" value="true" /> + <Attribute name="panelSkipUpdate" type="boolean" value="false" /> + <Attribute name="panelOffset" type="number" value="0" /> + <Attribute name="panelBorderColor" type="string" value="light" /> + </Attributes> + <Backdrop bgFile="Interface\AddOns\SVUI_!Core\assets\textures\EMPTY" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="false"> + <EdgeSize val="32" /> + <TileSize val="0" /> + <BackgroundInsets left="0" right="0" top="0" bottom="0" /> + <Color r="0" g="0" b="0" a="0" /> + <BorderColor r="1" g="1" b="1" a="1" /> + </Backdrop> + <Layers> + <Layer level="BACKGROUND" textureSubLevel="1"> + <Texture parentKey="Skin" nonBlocking="true" file="Interface\AddOns\SVUI_!Core\assets\textures\EMPTY"> + <Anchor point="TOPLEFT" relativePoint="TOPLEFT" x="5" y="-5" /> + <Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" x="-5" y="5" /> + <Color r="0" g="0" b="0" a="0" /> + </Texture> + </Layer> + </Layers> + </Frame> + + <Script file="SVUITheme_Warcraft.lua"/> +</Ui> diff --git a/SVUITheme_Warcraft/assets/artwork/Dock/DOCK-ICON-ADDON.blp b/SVUITheme_Warcraft/assets/artwork/Dock/DOCK-ICON-ADDON.blp new file mode 100644 index 0000000..c38f93a Binary files /dev/null and b/SVUITheme_Warcraft/assets/artwork/Dock/DOCK-ICON-ADDON.blp differ diff --git a/SVUITheme_Warcraft/assets/artwork/Dock/DOCK-ICON-BREAKSTUFF.blp b/SVUITheme_Warcraft/assets/artwork/Dock/DOCK-ICON-BREAKSTUFF.blp new file mode 100644 index 0000000..b778e24 Binary files /dev/null and b/SVUITheme_Warcraft/assets/artwork/Dock/DOCK-ICON-BREAKSTUFF.blp differ diff --git a/SVUITheme_Warcraft/assets/artwork/Dock/DOCK-ICON-CHAT.blp b/SVUITheme_Warcraft/assets/artwork/Dock/DOCK-ICON-CHAT.blp new file mode 100644 index 0000000..c61c5fa Binary files /dev/null and b/SVUITheme_Warcraft/assets/artwork/Dock/DOCK-ICON-CHAT.blp differ diff --git a/SVUITheme_Warcraft/assets/artwork/Dock/DOCK-ICON-GARRISON.blp b/SVUITheme_Warcraft/assets/artwork/Dock/DOCK-ICON-GARRISON.blp new file mode 100644 index 0000000..cbbe2ac Binary files /dev/null and b/SVUITheme_Warcraft/assets/artwork/Dock/DOCK-ICON-GARRISON.blp differ diff --git a/SVUITheme_Warcraft/assets/artwork/Dock/DOCK-ICON-HEARTH.blp b/SVUITheme_Warcraft/assets/artwork/Dock/DOCK-ICON-HEARTH.blp new file mode 100644 index 0000000..74776c0 Binary files /dev/null and b/SVUITheme_Warcraft/assets/artwork/Dock/DOCK-ICON-HEARTH.blp differ diff --git a/SVUITheme_Warcraft/assets/artwork/Dock/DOCK-ICON-HENCHMAN.blp b/SVUITheme_Warcraft/assets/artwork/Dock/DOCK-ICON-HENCHMAN.blp new file mode 100644 index 0000000..835d005 Binary files /dev/null and b/SVUITheme_Warcraft/assets/artwork/Dock/DOCK-ICON-HENCHMAN.blp differ diff --git a/SVUITheme_Warcraft/assets/artwork/Dock/DOCK-ICON-QUESTS.blp b/SVUITheme_Warcraft/assets/artwork/Dock/DOCK-ICON-QUESTS.blp new file mode 100644 index 0000000..0b7ee68 Binary files /dev/null and b/SVUITheme_Warcraft/assets/artwork/Dock/DOCK-ICON-QUESTS.blp differ diff --git a/SVUITheme_Warcraft/assets/artwork/Dock/DOCK-ICON-RAIDTOOL.blp b/SVUITheme_Warcraft/assets/artwork/Dock/DOCK-ICON-RAIDTOOL.blp new file mode 100644 index 0000000..7d2a6a4 Binary files /dev/null and b/SVUITheme_Warcraft/assets/artwork/Dock/DOCK-ICON-RAIDTOOL.blp differ diff --git a/SVUITheme_Warcraft/assets/artwork/Dock/DOCK-ICON-SNACK.blp b/SVUITheme_Warcraft/assets/artwork/Dock/DOCK-ICON-SNACK.blp new file mode 100644 index 0000000..27e176d Binary files /dev/null and b/SVUITheme_Warcraft/assets/artwork/Dock/DOCK-ICON-SNACK.blp differ diff --git a/SVUITheme_Warcraft/assets/artwork/Dock/DOCK-SPARKS-1.blp b/SVUITheme_Warcraft/assets/artwork/Dock/DOCK-SPARKS-1.blp new file mode 100644 index 0000000..03281c6 Binary files /dev/null and b/SVUITheme_Warcraft/assets/artwork/Dock/DOCK-SPARKS-1.blp differ diff --git a/SVUITheme_Warcraft/assets/artwork/Dock/DOCK-SPARKS-2.blp b/SVUITheme_Warcraft/assets/artwork/Dock/DOCK-SPARKS-2.blp new file mode 100644 index 0000000..9a4b442 Binary files /dev/null and b/SVUITheme_Warcraft/assets/artwork/Dock/DOCK-SPARKS-2.blp differ diff --git a/SVUITheme_Warcraft/assets/artwork/Dock/DOCK-SPARKS-3.blp b/SVUITheme_Warcraft/assets/artwork/Dock/DOCK-SPARKS-3.blp new file mode 100644 index 0000000..6f07c90 Binary files /dev/null and b/SVUITheme_Warcraft/assets/artwork/Dock/DOCK-SPARKS-3.blp differ diff --git a/SVUITheme_Warcraft/assets/artwork/Dock/LABEL-DUR.blp b/SVUITheme_Warcraft/assets/artwork/Dock/LABEL-DUR.blp new file mode 100644 index 0000000..0021afa Binary files /dev/null and b/SVUITheme_Warcraft/assets/artwork/Dock/LABEL-DUR.blp differ diff --git a/SVUITheme_Warcraft/assets/artwork/Dock/LABEL-REP.blp b/SVUITheme_Warcraft/assets/artwork/Dock/LABEL-REP.blp new file mode 100644 index 0000000..a455cf9 Binary files /dev/null and b/SVUITheme_Warcraft/assets/artwork/Dock/LABEL-REP.blp differ diff --git a/SVUITheme_Warcraft/assets/artwork/Dock/LABEL-XP.blp b/SVUITheme_Warcraft/assets/artwork/Dock/LABEL-XP.blp new file mode 100644 index 0000000..d1033e1 Binary files /dev/null and b/SVUITheme_Warcraft/assets/artwork/Dock/LABEL-XP.blp differ diff --git a/SVUITheme_Warcraft/assets/artwork/Dock/PROFESSIONS.blp b/SVUITheme_Warcraft/assets/artwork/Dock/PROFESSIONS.blp new file mode 100644 index 0000000..c1f8518 Binary files /dev/null and b/SVUITheme_Warcraft/assets/artwork/Dock/PROFESSIONS.blp differ diff --git a/SVUITheme_Warcraft/assets/artwork/HEAVY.blp b/SVUITheme_Warcraft/assets/artwork/HEAVY.blp new file mode 100644 index 0000000..9b1b0d3 Binary files /dev/null and b/SVUITheme_Warcraft/assets/artwork/HEAVY.blp differ diff --git a/SVUITheme_Warcraft/assets/artwork/SPLASH.blp b/SVUITheme_Warcraft/assets/artwork/SPLASH.blp new file mode 100644 index 0000000..e58d74f Binary files /dev/null and b/SVUITheme_Warcraft/assets/artwork/SPLASH.blp differ diff --git a/SVUITheme_Warcraft/assets/artwork/THEMED-BORDER1.blp b/SVUITheme_Warcraft/assets/artwork/THEMED-BORDER1.blp new file mode 100644 index 0000000..fd7098e Binary files /dev/null and b/SVUITheme_Warcraft/assets/artwork/THEMED-BORDER1.blp differ diff --git a/SVUI_!Core/libs/_SVUI_Lib/Registry.lua b/SVUI_!Core/libs/_SVUI_Lib/Registry.lua index e752229..8df333e 100644 --- a/SVUI_!Core/libs/_SVUI_Lib/Registry.lua +++ b/SVUI_!Core/libs/_SVUI_Lib/Registry.lua @@ -477,7 +477,7 @@ function lib:LiveUpdate(forced) if(forced or PRIVATE_SV.SAFEDATA.NEEDSLIVEUPDATE) then if(CoreObject.ReLoad) then CoreObject.Timers:ClearAllTimers() - if(forced) then CoreObject:ReLoad() end + CoreObject:ReLoad() end self:RefreshAll() if((not InCombatLockdown()) and (not C_PetBattles.IsInBattle())) then @@ -571,7 +571,7 @@ local function UpdateProfileSources(newKey) end if(not MEDIA_SV.profiles[THEME_KEY]) then MEDIA_SV.profiles[THEME_KEY] = {} end if(not MEDIA_SV.profiles[THEME_KEY][PROFILE_KEY]) then MEDIA_SV.profiles[THEME_KEY][PROFILE_KEY] = {} end - + DirtyDataList[PROFILE_KEY] = THEME_KEY; if(not newKey) then if((CoreObject.initialized) and (PREVIOUS_PROFILE_KEY ~= PROFILE_KEY)) then @@ -1188,7 +1188,7 @@ function lib:CopyDatabase(key, linked) export = MEDIA_SV.profiles[THEME_KEY][key]; saved = MEDIA_SV.profiles[THEME_KEY][PROFILE_KEY]; tablecopy(saved, export); - + DirtyDataList[PROFILE_KEY] = THEME_KEY; ReloadUI() diff --git a/SVUI_!Core/system/api.lua b/SVUI_!Core/system/api.lua index 09a177f..b6ea6dc 100644 --- a/SVUI_!Core/system/api.lua +++ b/SVUI_!Core/system/api.lua @@ -67,7 +67,6 @@ LOCALS ]]-- local MAC_DISPLAY; local BASE_MOD = 0.64; -local SCREEN_MOD = 1; local LIVE_UPDATE_FRAMES = {}; --[[ ########################################################## @@ -157,9 +156,6 @@ local function ScreenUpdate() end end - SCREEN_MOD = (gxMod / gxScale); - SV.Scale = SCREEN_MOD; - return gxWidth, gxHeight, gxScale, customScale end --[[ @@ -167,13 +163,6 @@ end APPENDED POSITIONING METHODS ########################################################## ]]-- -local ModSize = function(self, width, height) - if(type(width) == "number") then - local h = (height and type(height) == "number") and height or width - self:SetSize(width, h) - end -end - local WrapPoints = function(self, parent, x, y) x = type(x) == "number" and x or 1 y = y or x @@ -1375,10 +1364,6 @@ local function AppendFrameMethods(OBJECT) local META = getmetatable(OBJECT).__index if not OBJECT.SetStyle then META.SetStyle = SetStyle end if not OBJECT.SetPanelColor then META.SetPanelColor = SetPanelColor end - if not OBJECT.ModSize then META.ModSize = ModSize end - if not OBJECT.ModWidth then META.ModWidth = META.SetWidth end - if not OBJECT.ModHeight then META.ModHeight = META.SetHeight end - if not OBJECT.ModPoint then META.ModPoint = META.SetPoint end if not OBJECT.WrapPoints then META.WrapPoints = WrapPoints end if not OBJECT.InsetPoints then META.InsetPoints = InsetPoints end if not OBJECT.Die then META.Die = Die end @@ -1392,10 +1377,6 @@ end local function AppendTextureMethods(OBJECT) local META = getmetatable(OBJECT).__index - if not OBJECT.ModSize then META.ModSize = ModSize end - if not OBJECT.ModWidth then META.ModWidth = META.SetWidth end - if not OBJECT.ModHeight then META.ModHeight = META.SetHeight end - if not OBJECT.ModPoint then META.ModPoint = META.SetPoint end if not OBJECT.WrapPoints then META.WrapPoints = WrapPoints end if not OBJECT.InsetPoints then META.InsetPoints = InsetPoints end if not OBJECT.Die then META.Die = Die end @@ -1406,10 +1387,6 @@ end local function AppendFontStringMethods(OBJECT) local META = getmetatable(OBJECT).__index - if not OBJECT.ModSize then META.ModSize = ModSize end - if not OBJECT.ModWidth then META.ModWidth = META.SetWidth end - if not OBJECT.ModHeight then META.ModHeight = META.SetHeight end - if not OBJECT.ModPoint then META.ModPoint = META.SetPoint end if not OBJECT.WrapPoints then META.WrapPoints = WrapPoints end if not OBJECT.InsetPoints then META.InsetPoints = InsetPoints end end diff --git a/SVUI_!Core/system/core.lua b/SVUI_!Core/system/core.lua index 6c35704..b334378 100644 --- a/SVUI_!Core/system/core.lua +++ b/SVUI_!Core/system/core.lua @@ -203,7 +203,6 @@ end -- has no method for parsing them in LUA. local SV = SVUILib:NewCore("SVUI_Global", "SVUI_Errors", "SVUI_Private", "SVUI_Media") -SV.Scale = 1; SV.ConfigID = "SVUI_!Options"; SV.class = playerClass; SV.GUID = UnitGUID('player'); diff --git a/SVUI_!Core/system/media.lua b/SVUI_!Core/system/media.lua index dd44416..4bd9347 100644 --- a/SVUI_!Core/system/media.lua +++ b/SVUI_!Core/system/media.lua @@ -676,8 +676,10 @@ function SV:FontManager(obj, template, arg, sizeMod, styleOverride, colorR, colo obj:SetShadowColor(0, 0, 0, 0.75) obj:SetShadowOffset(2, -2) elseif(not isSystemFont) then - if(info.outline and info.outline ~= "NONE") then + if((not info.outline) or info.outline ~= "NONE") then obj:SetShadowColor(0, 0, 0, 0) + elseif(info.outline and info.outline == "NONE") then + obj:SetShadowColor(0, 0, 0, 0.75) else obj:SetShadowColor(0, 0, 0, 0.2) end diff --git a/SVUI_!Core/system/overrides.lua b/SVUI_!Core/system/overrides.lua index c86e748..301b938 100644 --- a/SVUI_!Core/system/overrides.lua +++ b/SVUI_!Core/system/overrides.lua @@ -435,11 +435,10 @@ local function MakeSlots(id) end local function CreateRollButton(rollFrame, type, locale, anchor) - local btnSize = LOOT_HEIGHT - 4; local preset = RollTypePresets[type]; local rollButton = CreateFrame("Button", nil, rollFrame) rollButton:SetPoint("LEFT", anchor, "RIGHT", tonumber(preset[4]), tonumber(preset[5])) - rollButton:SetSize(btnSize, btnSize) + rollButton:SetSize((LOOT_HEIGHT - 4), (LOOT_HEIGHT - 4)) rollButton:SetNormalTexture(preset[1]) if preset[2] and preset[2] ~= "" then rollButton:SetPushedTexture(preset[2]) @@ -460,7 +459,6 @@ end local function CreateRollFrame() UpdateLootUpvalues() - local btnSize = LOOT_HEIGHT - 2; local rollFrame = CreateFrame("Frame", nil, UIParent) rollFrame:SetSize(LOOT_WIDTH,LOOT_HEIGHT) rollFrame:SetStyle("!_Frame", 'Default') @@ -469,7 +467,7 @@ local function CreateRollFrame() rollFrame:Hide() rollFrame.button = CreateFrame("Button",nil,rollFrame) rollFrame.button:SetPoint("RIGHT",rollFrame,'LEFT',0,0) - rollFrame.button:SetSize(btnSize, btnSize) + rollFrame.button:SetSize((LOOT_HEIGHT - 2), (LOOT_HEIGHT - 2)) rollFrame.button:SetStyle("Frame", 'Default') rollFrame.button:SetScript("OnEnter",LootItem_SetTooltip) rollFrame.button:SetScript("OnLeave",LootItem_OnLeave) diff --git a/SVUI_!Core/system/reports.lua b/SVUI_!Core/system/reports.lua index e3eaf70..730028d 100644 --- a/SVUI_!Core/system/reports.lua +++ b/SVUI_!Core/system/reports.lua @@ -151,7 +151,7 @@ end local _hook_TooltipOnShow = function(self) self:SetBackdrop({ - bgFile = SV.media.background.transparent, + bgFile = SV.BaseTexture, edgeFile = [[Interface\BUTTONS\WHITE8X8]], tile = false, edgeSize = 1 diff --git a/SVUI_Chat/SVUI_Chat.lua b/SVUI_Chat/SVUI_Chat.lua index aed1ede..fad2f33 100644 --- a/SVUI_Chat/SVUI_Chat.lua +++ b/SVUI_Chat/SVUI_Chat.lua @@ -737,6 +737,8 @@ do local chatID = chat:GetID(); local tabName = chatName.."Tab"; local tabText = _G[chatName.."TabText"] + SV:FontManager(chat, "chatdialog", "LEFT") + SV:FontManager(tabText, "chattab") if(not chat.Panel) then chat:SetStyle("Frame", "Transparent", true, 1, 3, 6) chat.Panel:Hide() @@ -753,9 +755,6 @@ do local editBoxName = chatName.."EditBox"; local editBox = _G[editBoxName] ------------------------------------------- - SV:FontManager(chat, "chatdialog", "LEFT") - SV:FontManager(tabText, "chattab") - ------------------------------------------- chat:SetFrameLevel(4) chat:SetClampRectInsets(0, 0, 0, 0) chat:SetClampedToScreen(false) diff --git a/SVUI_Inventory/SVUI_Inventory.lua b/SVUI_Inventory/SVUI_Inventory.lua index 17b46db..4683966 100644 --- a/SVUI_Inventory/SVUI_Inventory.lua +++ b/SVUI_Inventory/SVUI_Inventory.lua @@ -314,6 +314,21 @@ function MOD:INVENTORY_SEARCH_UPDATE() SearchInBags(self.BagFrame) SearchInBags(self.BankFrame) SearchInBags(self.ReagentFrame) + -- if(self.ReagentFrame and self.ReagentFrame:IsShown()) then + -- for i = 1, self.ReagentFrame.numSlots do + -- local _, _, _, _, _, _, _, isFiltered = GetContainerItemInfo(REAGENTBANK_CONTAINER, i) + -- local item = self.ReagentFrame.Bags[REAGENTBANK_CONTAINER][i] + -- if(item and item:IsShown()) then + -- if isFiltered then + -- SetItemButtonDesaturated(item, 1) + -- item:SetAlpha(0.4) + -- else + -- SetItemButtonDesaturated(item) + -- item:SetAlpha(1) + -- end + -- end + -- end + -- end end local SlotUpdate = function(self, slotID) @@ -492,9 +507,8 @@ local ContainerFrame_UpdateLayout = function(self) local lastMenu; for i, bagID in ipairs(self.BagIDs) do if((not isBank and bagID <= 3) or (isBank and bagID ~= -1 and numContainerSlots >= 1 and not (i - 1 > numContainerSlots))) then - local menuWidth = ((buttonSize + buttonSpacing) * (isBank and i - 1 or i)) + buttonSpacing; - local menuHeight = buttonSize + (buttonSpacing * 2); - menu:SetSize(menuWidth, menuHeight) + + menu:SetSize(((buttonSize + buttonSpacing) * (isBank and i - 1 or i)) + buttonSpacing, buttonSize + (buttonSpacing * 2)) local bagSlot = menu[i]; if(not bagSlot) then @@ -1270,9 +1284,7 @@ do frame.sortButton:SetSize(25, 25) StyleBagToolButton(frame.sortButton, MOD.media.cleanupIcon) frame.sortButton.ttText = L["Sort Bags"] - frame.sortButton.altText = L["Filtered Cleanup (Default Sorting)"] - frame.sortButton.ttText2 = L["Hold Alt:"] - frame.sortButton.ttText2desc = L["Default Sorting"] + frame.sortButton.altText = L["Filtered Cleanup"] frame.sortButton:SetScript("OnEnter", Tooltip_Show) frame.sortButton:SetScript("OnLeave", Tooltip_Hide) local Sort_OnClick = MOD:RunSortingProcess(MOD.Sort, "bags", SortBags) @@ -1420,9 +1432,7 @@ do frame.sortButton:SetSize(25, 25) StyleBagToolButton(frame.sortButton, MOD.media.cleanupIcon) frame.sortButton.ttText = L["Sort Bank"] - frame.sortButton.altText = L["Filtered Cleanup (Default Sorting)"] - frame.sortButton.ttText2 = L["Hold Alt:"] - frame.sortButton.ttText2desc = L["Default Sorting"] + frame.sortButton.altText = L["Filtered Cleanup"] frame.sortButton:SetScript("OnEnter", Tooltip_Show) frame.sortButton:SetScript("OnLeave", Tooltip_Hide) diff --git a/SVUI_Maps/SVUI_Maps.lua b/SVUI_Maps/SVUI_Maps.lua index 007bc93..8798f2c 100644 --- a/SVUI_Maps/SVUI_Maps.lua +++ b/SVUI_Maps/SVUI_Maps.lua @@ -60,12 +60,12 @@ local WM_TINY = false; local MM_COLOR = "darkest" local MM_BRDR = 0 local MM_SIZE = 240 -local MM_BTN_SIZE = 30 local MM_OFFSET_TOP = (MM_SIZE * 0.07) local MM_OFFSET_BOTTOM = (MM_SIZE * 0.11) local MM_WIDTH = MM_SIZE + (MM_BRDR * 2) local MM_HEIGHT = (MM_SIZE - (MM_OFFSET_TOP + MM_OFFSET_BOTTOM) + (MM_BRDR * 2)) local WM_ALPHA = false; +local MM_BTN_SIZE = 30; local MM_SHAPE = 'RECTANGLE'; local NARR_TEXT = "Meanwhile"; local NARR_PREFIX = "In "; @@ -121,8 +121,8 @@ do if(not SV.db.Maps.minimapbar.enable) then return end MMBBar:SetPoint("CENTER", MMBHolder, "CENTER", 0, 0) - MMBBar:SetHeight(SV.db.Maps.minimapbar.buttonSize + 4) - MMBBar:SetWidth(SV.db.Maps.minimapbar.buttonSize + 4) + MMBBar:SetHeight(MM_BTN_SIZE + 4) + MMBBar:SetWidth(MM_BTN_SIZE + 4) MMBBar:SetFrameStrata("LOW") MMBBar:SetFrameLevel(0) @@ -178,9 +178,9 @@ do end if (SV.db.Maps.minimapbar.styleType ~= "NOANCHOR" and (count > 0)) then if SV.db.Maps.minimapbar.styleType == "HORIZONTAL" then - MMBBar:SetWidth((SV.db.Maps.minimapbar.buttonSize * count) + count * 2) + MMBBar:SetWidth((MM_BTN_SIZE * count) + count * 2) else - MMBBar:SetHeight((SV.db.Maps.minimapbar.buttonSize * count) + count * 2) + MMBBar:SetHeight((MM_BTN_SIZE * count) + count * 2) end MMBHolder:SetSize(MMBBar:GetSize()) MMBBar:Show() @@ -767,7 +767,7 @@ function MOD:UpdateLocals() MM_OFFSET_BOTTOM = (MM_SIZE * 0.11) MM_WIDTH = MM_SIZE + (MM_BRDR * 2) MM_SHAPE = db.mapShape; - MM_BTN_SIZE = db.minimapbar.buttonSize; + MM_BTN_SIZE = db.minimapbar.buttonSize MM_HEIGHT = (MM_SHAPE == 'RECTANGLE') and (MM_SIZE - (MM_OFFSET_TOP + MM_OFFSET_BOTTOM) + (MM_BRDR * 2)) or MM_WIDTH WM_ALPHA = GetCVarBool("mapFade") end diff --git a/SVUI_NamePlates/SVUI_NamePlates.lua b/SVUI_NamePlates/SVUI_NamePlates.lua index 5c67975..9ac7b08 100644 --- a/SVUI_NamePlates/SVUI_NamePlates.lua +++ b/SVUI_NamePlates/SVUI_NamePlates.lua @@ -156,7 +156,6 @@ local HBWidth = 108; local HBHeight = 9; local NPIcons = 14; -local ICON_SIZE = 20; local CBColor = {0.1,0.81,0} local CBNoInterrupt = {1,0.25,0.25} @@ -250,7 +249,6 @@ local function SetTextStyle(style, min, max) end local function CreatePlateBorder(plate) - local noscalemult = 2 * SV.Scale; if(not plate.backdrop) then plate.backdrop = plate:CreateTexture(nil, "BORDER") @@ -260,30 +258,30 @@ local function CreatePlateBorder(plate) plate.backdrop:SetVertexColor(0.1,0.1,0.1) plate.bordertop = plate:CreateTexture(nil, "BORDER") - plate.bordertop:SetPoint("TOPLEFT", plate, "TOPLEFT", -noscalemult, noscalemult) - plate.bordertop:SetPoint("TOPRIGHT", plate, "TOPRIGHT", noscalemult, noscalemult) - plate.bordertop:SetHeight(noscalemult) + plate.bordertop:SetPoint("TOPLEFT", plate, "TOPLEFT", -2, 2) + plate.bordertop:SetPoint("TOPRIGHT", plate, "TOPRIGHT", 2, 2) + plate.bordertop:SetHeight(2) plate.bordertop:SetTexture(0,0,0) plate.bordertop:SetDrawLayer("BORDER", 1) plate.borderbottom = plate:CreateTexture(nil, "BORDER") - plate.borderbottom:SetPoint("BOTTOMLEFT", plate, "BOTTOMLEFT", -noscalemult, -noscalemult) - plate.borderbottom:SetPoint("BOTTOMRIGHT", plate, "BOTTOMRIGHT", noscalemult, -noscalemult) - plate.borderbottom:SetHeight(noscalemult) + plate.borderbottom:SetPoint("BOTTOMLEFT", plate, "BOTTOMLEFT", -2, -2) + plate.borderbottom:SetPoint("BOTTOMRIGHT", plate, "BOTTOMRIGHT", 2, -2) + plate.borderbottom:SetHeight(2) plate.borderbottom:SetTexture(0,0,0) plate.borderbottom:SetDrawLayer("BORDER", 1) plate.borderleft = plate:CreateTexture(nil, "BORDER") - plate.borderleft:SetPoint("TOPLEFT", plate, "TOPLEFT", -noscalemult, noscalemult) - plate.borderleft:SetPoint("BOTTOMLEFT", plate, "BOTTOMLEFT", noscalemult, -noscalemult) - plate.borderleft:SetWidth(noscalemult) + plate.borderleft:SetPoint("TOPLEFT", plate, "TOPLEFT", -2, 2) + plate.borderleft:SetPoint("BOTTOMLEFT", plate, "BOTTOMLEFT", 2, -2) + plate.borderleft:SetWidth(2) plate.borderleft:SetTexture(0,0,0) plate.borderleft:SetDrawLayer("BORDER", 1) plate.borderright = plate:CreateTexture(nil, "BORDER") - plate.borderright:SetPoint("TOPRIGHT", plate, "TOPRIGHT", noscalemult, noscalemult) - plate.borderright:SetPoint("BOTTOMRIGHT", plate, "BOTTOMRIGHT", -noscalemult, -noscalemult) - plate.borderright:SetWidth(noscalemult) + plate.borderright:SetPoint("TOPRIGHT", plate, "TOPRIGHT", 2, 2) + plate.borderright:SetPoint("BOTTOMRIGHT", plate, "BOTTOMRIGHT", -2, -2) + plate.borderright:SetWidth(2) plate.borderright:SetTexture(0,0,0) plate.borderright:SetDrawLayer("BORDER", 1) end @@ -568,15 +566,14 @@ local function SaveDuration(spellID, duration) end local function CreateAuraIcon(auras, plate) - local noscalemult = 2 * SV.Scale; local button = CreateFrame("Frame", nil, auras) button.bord = button:CreateTexture(nil, "BACKGROUND") button.bord:SetDrawLayer('BACKGROUND', 2) button.bord:SetTexture(0,0,0,1) - button.bord:SetPoint("TOPLEFT", button, "TOPLEFT", -noscalemult, noscalemult) - button.bord:SetPoint("BOTTOMRIGHT", button, "BOTTOMRIGHT", noscalemult, -noscalemult) + button.bord:SetPoint("TOPLEFT", button, "TOPLEFT", -2, 2) + button.bord:SetPoint("BOTTOMRIGHT", button, "BOTTOMRIGHT", 2, -2) button.Icon = button:CreateTexture(nil, "BORDER") button.Icon:SetPoint("TOPLEFT",button,"TOPLEFT") @@ -803,8 +800,7 @@ do if(not plate.setting.scaled and not plate.setting.tiny and frame.health:GetWidth() ~= (HBWidth * scale)) then frame.health:SetSize(HBWidth * scale, HBHeight * scale) - local scaledIconSize = CBHeight + (HBHeight * scale) + 5; - plate.cast.icon:SetSize(scaledIconSize, scaledIconSize) + plate.cast.icon:SetSize(CBHeight + (HBHeight * scale) + 5, CBHeight + (HBHeight * scale) + 5) end end @@ -1118,7 +1114,8 @@ do SVUI_PLATE.health.icon:Hide() if SVUI_PLATE.health then SVUI_PLATE.health:SetSize(HBWidth, HBHeight) - plate.cast.icon:SetSize(ICON_SIZE, ICON_SIZE) + local iconSize = CBHeight + HBHeight + 5 + plate.cast.icon:SetSize(iconSize, iconSize) end if PLATE_AURAS then for index = 1, #PLATE_AURAICONS do @@ -1148,7 +1145,8 @@ do SVUI_PLATE.cast:SetStatusBarTexture(NPBarTex) SVUI_PLATE.cast.text:SetFont(SV.media.font.default, 8, "OUTLINE") plate.cast.text:SetFont(SV.media.font.default, 8, "OUTLINE") - plate.cast.icon:SetSize(ICON_SIZE, ICON_SIZE) + local iconSize = (CBHeight + HBHeight) + 5 + plate.cast.icon:SetSize(iconSize, iconSize) PLATE_REF.raidicon:ClearAllPoints() SV:SetReversePoint(PLATE_REF.raidicon, RIAnchor, SVUI_PLATE.health, RIXoffset, RIYoffset) PLATE_REF.raidicon:SetSize(RISize, RISize) @@ -1555,8 +1553,6 @@ function MOD:UpdateLocals() CBXoffset = db.castBar.text.xOffset; CBYoffset = db.castBar.text.yOffset; - ICON_SIZE = CBHeight + HBHeight + 5 - NPUsePointer = db.pointer.enable; NPPointerMatch = db.pointer.colorMatchHealthBar; NPPointerColor = {db.pointer.color[1], db.pointer.color[2], db.pointer.color[3], 0.5}; diff --git a/SVUI_Skins/components/addons/DXE.lua b/SVUI_Skins/components/addons/DXE.lua index 30455ca..0de14e4 100644 --- a/SVUI_Skins/components/addons/DXE.lua +++ b/SVUI_Skins/components/addons/DXE.lua @@ -1,7 +1,7 @@ --[[ ########################################################## S V U I By: Munglunch -########################################################## +########################################################## LOCALIZED LUA FUNCTIONS ########################################################## ]]-- @@ -13,8 +13,8 @@ local pairs = _G.pairs; local string = _G.string; --[[ STRING METHODS ]]-- local format = string.format; ---[[ -########################################################## +--[[ +########################################################## GET ADDON DATA ########################################################## ]]-- @@ -25,8 +25,8 @@ local Schema = MOD.Schema; local playerName = UnitName("player"); local playerRealm = GetRealmName(); local playerKey = ("%s - %s"):format(playerName, playerRealm) ---[[ -########################################################## +--[[ +########################################################## DXE ########################################################## ]]-- @@ -95,7 +95,7 @@ local function StyleDXE() local DXEAlerts = DXE:GetModule("Alerts") local frame = CreateFrame("Frame") - + frame.elapsed = 1 frame:SetScript("OnUpdate", function(frame,elapsed) frame.elapsed = frame.elapsed + elapsed @@ -116,9 +116,9 @@ local function StyleDXE() if not DXEDB["profiles"][playerKey]["Globals"] then DXEDB["profiles"][playerKey]["Globals"] = {} end DXEDB["profiles"][playerKey]["Globals"]["BackgroundTexture"] = [[Interface\BUTTONS\WHITE8X8]] - DXEDB["profiles"][playerKey]["Globals"]["BarTexture"] = SV.media.statusbar.default + DXEDB["profiles"][playerKey]["Globals"]["BarTexture"] = SV.BaseTexture DXEDB["profiles"][playerKey]["Globals"]["Border"] = "None" DXEDB["profiles"][playerKey]["Globals"]["Font"] = SV.media.font.dialog DXEDB["profiles"][playerKey]["Globals"]["TimerFont"] = SV.media.font.dialog end -MOD:SaveAddonStyle("DXE", StyleDXE) +MOD:SaveAddonStyle("DXE", StyleDXE) \ No newline at end of file diff --git a/SVUI_Skins/components/addons/MasterPlan.lua b/SVUI_Skins/components/addons/MasterPlan.lua index ec59970..3c35351 100644 --- a/SVUI_Skins/components/addons/MasterPlan.lua +++ b/SVUI_Skins/components/addons/MasterPlan.lua @@ -14,17 +14,17 @@ local SV = _G['SVUI']; local L = SV.L; local MOD = SV.Skins; local Schema = MOD.Schema; ---[[ -########################################################## +--[[ +########################################################## HELPERS ########################################################## ]]-- local RING_TEXTURE = [[Interface\AddOns\SVUI_Skins\artwork\FOLLOWER-RING]] local LVL_TEXTURE = [[Interface\AddOns\SVUI_Skins\artwork\FOLLOWER-LEVEL]] -local HIGHLIGHT_TEXTURE = SV.media.background.default +local HIGHLIGHT_TEXTURE = SV.BaseTexture local DEFAULT_COLOR = {r = 0.25, g = 0.25, b = 0.25}; ---[[ -########################################################## +--[[ +########################################################## STYLE ########################################################## ]]-- @@ -109,10 +109,10 @@ local function StyleMasterPlan() SV.API:Set("Tab", GarrisonMissionFrameTab3) SV.API:Set("Tab", GarrisonMissionFrameTab4) -end ---[[ -########################################################## +end +--[[ +########################################################## MOD LOADING ########################################################## ]]-- -MOD:SaveAddonStyle("MasterPlan", StyleMasterPlan, false, true) +MOD:SaveAddonStyle("MasterPlan", StyleMasterPlan, false, true) \ No newline at end of file diff --git a/SVUI_Skins/components/addons/TinyDPS.lua b/SVUI_Skins/components/addons/TinyDPS.lua index 82d342e..4f1cd75 100644 --- a/SVUI_Skins/components/addons/TinyDPS.lua +++ b/SVUI_Skins/components/addons/TinyDPS.lua @@ -1,7 +1,7 @@ --[[ ########################################################## S V U I By: Munglunch -########################################################## +########################################################## LOCALIZED LUA FUNCTIONS ########################################################## ]]-- @@ -13,8 +13,8 @@ local pairs = _G.pairs; local string = _G.string; --[[ STRING METHODS ]]-- local format = string.format; ---[[ -########################################################## +--[[ +########################################################## GET ADDON DATA ########################################################## ]]-- @@ -22,8 +22,8 @@ local SV = _G['SVUI']; local L = SV.L; local MOD = SV.Skins; local Schema = MOD.Schema; ---[[ -########################################################## +--[[ +########################################################## TINYDPS ########################################################## ]]-- @@ -31,20 +31,20 @@ local function StyleTinyDPS() assert(tdpsFrame, "AddOn Not Loaded") SV.API:Set("Frame", tdpsFrame) - + tdpsFrame:HookScript("OnShow", function() - if InCombatLockdown() then return end + if InCombatLockdown() then return end if MOD.Docklet:IsEmbedded("TinyDPS") then MOD.Docklet:Show() end end) if tdpsStatusBar then - tdpsStatusBar:SetBackdrop({bgFile = SV.media.background.default, edgeFile = [[Interface\AddOns\SVUI_!Core\assets\textures\EMPTY]], tile = false, tileSize = 0, edgeSize = 1}) + tdpsStatusBar:SetBackdrop({bgFile = SV.BaseTexture, edgeFile = S.Blank, tile = false, tileSize = 0, edgeSize = 1}) tdpsStatusBar:SetStatusBarTexture(SV.media.statusbar.default) end tdpsRefresh() end -MOD:SaveAddonStyle("TinyDPS", StyleTinyDPS) +MOD:SaveAddonStyle("TinyDPS", StyleTinyDPS) \ No newline at end of file diff --git a/SVUI_Skins/components/addons/VEM.lua b/SVUI_Skins/components/addons/VEM.lua index b4d4165..4adbc4e 100644 --- a/SVUI_Skins/components/addons/VEM.lua +++ b/SVUI_Skins/components/addons/VEM.lua @@ -1,7 +1,7 @@ --[[ ########################################################## S V U I By: Munglunch -########################################################## +########################################################## LOCALIZED LUA FUNCTIONS ########################################################## ]]-- @@ -13,8 +13,8 @@ local pairs = _G.pairs; local string = _G.string; --[[ STRING METHODS ]]-- local format = string.format; ---[[ -########################################################## +--[[ +########################################################## GET ADDON DATA ########################################################## ]]-- @@ -22,8 +22,8 @@ local SV = _G['SVUI']; local L = SV.L; local MOD = SV.Skins; local Schema = MOD.Schema; ---[[ -########################################################## +--[[ +########################################################## VEM ########################################################## ]]-- @@ -85,7 +85,7 @@ local function StyleBars(self) icon2:ClearAllPoints() icon2:InsetPoints(icon2.overlay) - texture:SetTexture(SV.media.statusbar.default) + texture:SetTexture(SV.BaseTexture) tbar:InsetPoints(frame) frame:SetStyle("!_Frame") @@ -132,7 +132,7 @@ local StyleBossTitle = function() header[1]:SetFont(SV.media.font.dialog, 12, 'OUTLINE') header[1]:SetTextColor(1, 1, 1) header[1]:SetShadowColor(0, 0, 0, 0) - anchor.styled = true + anchor.styled = true end header = nil end @@ -147,7 +147,7 @@ local StyleBoss = function() local progress = _G[bar:GetName()..'Bar'] local name = _G[bar:GetName()..'BarName'] local timer = _G[bar:GetName()..'BarTimer'] - local prev = _G[format('VEM_BossHealth_Bar_%d', count-1)] + local prev = _G[format('VEM_BossHealth_Bar_%d', count-1)] local _, anch, _ ,_, _ = bar:GetPoint() bar:ClearAllPoints() if count == 1 then @@ -174,7 +174,7 @@ local StyleBoss = function() timer:ClearAllPoints() timer:SetJustifyH('RIGHT') timer:SetShadowColor(0, 0, 0, 0) - + bar:SetHeight(22) name:SetPoint('LEFT', bar, 'LEFT', 4, 0) timer:SetPoint('RIGHT', bar, 'RIGHT', -4, 0) @@ -236,4 +236,4 @@ local function StyleVEM(event, addon) MOD:SafeEventRemoval("VEM", event) end end -MOD:SaveAddonStyle("VEM", StyleVEM, nil, true) +MOD:SaveAddonStyle("VEM", StyleVEM, nil, true) \ No newline at end of file diff --git a/SVUI_Skins/components/atlas.lua b/SVUI_Skins/components/atlas.lua index cf02325..8538392 100644 --- a/SVUI_Skins/components/atlas.lua +++ b/SVUI_Skins/components/atlas.lua @@ -14,16 +14,17 @@ local SV = _G['SVUI']; local L = SV.L; local MOD = SV.Skins; local Schema = MOD.Schema; ---[[ -########################################################## +--[[ +########################################################## HELPERS ########################################################## ]]-- local RING_TEXTURE = [[Interface\AddOns\SVUI_Skins\artwork\FOLLOWER-RING]] local LVL_TEXTURE = [[Interface\AddOns\SVUI_Skins\artwork\FOLLOWER-LEVEL]] +local HIGHLIGHT_TEXTURE = SV.BaseTexture local DEFAULT_COLOR = {r = 0.25, g = 0.25, b = 0.25}; ---[[ -########################################################## +--[[ +########################################################## STYLE ########################################################## ]]-- @@ -52,4 +53,4 @@ SV:SetAtlasFilter("Garr_FollowerToast-Rare"); SV:SetAtlasFilter("GarrLanding-MinimapIcon-Horde-Up"); SV:SetAtlasFilter("GarrLanding-MinimapIcon-Horde-Down"); SV:SetAtlasFilter("GarrLanding-MinimapIcon-Alliance-Up"); -SV:SetAtlasFilter("GarrLanding-MinimapIcon-Alliance-Down"); +SV:SetAtlasFilter("GarrLanding-MinimapIcon-Alliance-Down"); \ No newline at end of file diff --git a/SVUI_Skins/components/atlas/garrison.lua b/SVUI_Skins/components/atlas/garrison.lua index cf02325..8538392 100644 --- a/SVUI_Skins/components/atlas/garrison.lua +++ b/SVUI_Skins/components/atlas/garrison.lua @@ -14,16 +14,17 @@ local SV = _G['SVUI']; local L = SV.L; local MOD = SV.Skins; local Schema = MOD.Schema; ---[[ -########################################################## +--[[ +########################################################## HELPERS ########################################################## ]]-- local RING_TEXTURE = [[Interface\AddOns\SVUI_Skins\artwork\FOLLOWER-RING]] local LVL_TEXTURE = [[Interface\AddOns\SVUI_Skins\artwork\FOLLOWER-LEVEL]] +local HIGHLIGHT_TEXTURE = SV.BaseTexture local DEFAULT_COLOR = {r = 0.25, g = 0.25, b = 0.25}; ---[[ -########################################################## +--[[ +########################################################## STYLE ########################################################## ]]-- @@ -52,4 +53,4 @@ SV:SetAtlasFilter("Garr_FollowerToast-Rare"); SV:SetAtlasFilter("GarrLanding-MinimapIcon-Horde-Up"); SV:SetAtlasFilter("GarrLanding-MinimapIcon-Horde-Down"); SV:SetAtlasFilter("GarrLanding-MinimapIcon-Alliance-Up"); -SV:SetAtlasFilter("GarrLanding-MinimapIcon-Alliance-Down"); +SV:SetAtlasFilter("GarrLanding-MinimapIcon-Alliance-Down"); \ No newline at end of file diff --git a/SVUI_Skins/components/blizzard/achievement.lua b/SVUI_Skins/components/blizzard/achievement.lua index 542c1f1..c32eb24 100644 --- a/SVUI_Skins/components/blizzard/achievement.lua +++ b/SVUI_Skins/components/blizzard/achievement.lua @@ -19,30 +19,30 @@ local SV = _G['SVUI']; local L = SV.L; local MOD = SV.Skins; local Schema = MOD.Schema; ---[[ -########################################################## +--[[ +########################################################## HELPERS ########################################################## ]]-- local AchievementFrameList = { - "AchievementFrame", - "AchievementFrameCategories", - "AchievementFrameSummary", - "AchievementFrameHeader", - "AchievementFrameSummaryCategoriesHeader", - "AchievementFrameSummaryAchievementsHeader", - "AchievementFrameStatsBG", - "AchievementFrameAchievements", - "AchievementFrameComparison", - "AchievementFrameComparisonHeader", - "AchievementFrameComparisonSummaryPlayer", + "AchievementFrame", + "AchievementFrameCategories", + "AchievementFrameSummary", + "AchievementFrameHeader", + "AchievementFrameSummaryCategoriesHeader", + "AchievementFrameSummaryAchievementsHeader", + "AchievementFrameStatsBG", + "AchievementFrameAchievements", + "AchievementFrameComparison", + "AchievementFrameComparisonHeader", + "AchievementFrameComparisonSummaryPlayer", "AchievementFrameComparisonSummaryFriend" } local AchievementTextureList = { - "AchievementFrameStats", - "AchievementFrameSummary", - "AchievementFrameAchievements", + "AchievementFrameStats", + "AchievementFrameSummary", + "AchievementFrameAchievements", "AchievementFrameComparison" } @@ -57,23 +57,23 @@ local AchievementItemButtons = { } local _hook_DescriptionColor = function(self, r, g, b) - if(r ~= 0.6 or g ~= 0.6 or b ~= 0.6) then + if(r ~= 0.6 or g ~= 0.6 or b ~= 0.6) then self:SetTextColor(0.6, 0.6, 0.6) - end + end end local _hook_HiddenDescriptionColor = function(self, r, g, b) - if(r ~= 1 or g ~= 1 or b ~= 1) then + if(r ~= 1 or g ~= 1 or b ~= 1) then self:SetTextColor(1, 1, 1) - end + end end local _hook_TrackingPoint = function(self, anchor, parent, relative, x, y) local actual = self.ListParent - if(anchor ~= "BOTTOMLEFT" or parent ~= actual or relative ~= "BOTTOMLEFT" or x ~= 5 or y ~= 5) then + if(anchor ~= "BOTTOMLEFT" or parent ~= actual or relative ~= "BOTTOMLEFT" or x ~= 5 or y ~= 5) then self:ClearAllPoints() self:SetPoint("BOTTOMLEFT", actual, "BOTTOMLEFT", 5, 5) - end + end end local _hook_AchievementsUpdate = function() @@ -95,11 +95,11 @@ local _hook_AchievementsUpdate = function() if(desc) then desc:SetTextColor(0.6, 0.6, 0.6) end if(iconbling) then iconbling:Die() end if(iconover) then iconover:Die() end - if(icontex) then + if(icontex) then icontex:SetTexCoord(unpack(_G.SVUI_ICON_COORDS)) icontex:InsetPoints() end - if(icon and not icon.Panel) then + if(icon and not icon.Panel) then icon:SetStyle("!_Frame", "Icon") icon:SetHeight(icon:GetHeight() - 14) icon:SetWidth(icon:GetWidth() - 14) @@ -107,9 +107,9 @@ local _hook_AchievementsUpdate = function() icon:SetPoint("LEFT", 6, 0) end - if summary.accountWide then + if summary.accountWide then summary:SetBackdropBorderColor(ACHIEVEMENTUI_BLUEBORDER_R, ACHIEVEMENTUI_BLUEBORDER_G, ACHIEVEMENTUI_BLUEBORDER_B) - else + else summary:SetBackdropBorderColor(0,0,0,1) end end @@ -121,47 +121,47 @@ local function BarStyleHelper(bar) bar:SetStatusBarTexture(SV.media.statusbar.default) bar:SetStatusBarColor(4/255, 179/255, 30/255) bar:SetStyle("Frame", "Default") - if _G[bar:GetName().."Title"]then + if _G[bar:GetName().."Title"]then _G[bar:GetName().."Title"]:SetPoint("LEFT", 4, 0) - end - if _G[bar:GetName().."Label"]then + end + if _G[bar:GetName().."Label"]then _G[bar:GetName().."Label"]:SetPoint("LEFT", 4, 0) - end - if _G[bar:GetName().."Text"]then + end + if _G[bar:GetName().."Text"]then _G[bar:GetName().."Text"]:SetPoint("RIGHT", -4, 0) - end -end ---[[ -########################################################## + end +end +--[[ +########################################################## ACHIEVEMENTFRAME MODR ########################################################## ]]-- local function AchievementStyle() - if SV.db.Skins.blizzard.enable ~= true or SV.db.Skins.blizzard.achievement ~= true then - return + if SV.db.Skins.blizzard.enable ~= true or SV.db.Skins.blizzard.achievement ~= true then + return end AchievementFrameHeader:EnableMouse(false) - for _, gName in pairs(AchievementFrameList) do + for _, gName in pairs(AchievementFrameList) do local frame = _G[gName] if(frame) then frame:RemoveTextures(true) end end - + for _, gName in pairs(AchievementTextureList) do local frame = _G[gName] if(frame) then local count = frame:GetNumChildren() - for i = 1, count do + for i = 1, count do local childFrame = select(i, frame:GetChildren()) - if(childFrame and not childFrame:GetName()) then + if(childFrame and not childFrame:GetName()) then childFrame:SetBackdrop(nil) - end + end end end - end + end SV.API:Set("Window", AchievementFrame, false, false, 1, 4, 8) @@ -191,7 +191,7 @@ local function AchievementStyle() SV.API:Set("Tab", tab) tab:SetFrameLevel(tab:GetFrameLevel() + 2) end - end + end BarStyleHelper(AchievementFrameSummaryCategoriesStatusBar) BarStyleHelper(AchievementFrameComparisonSummaryPlayerStatusBar) @@ -219,19 +219,19 @@ local function AchievementStyle() end AchievementFrame:HookScript("OnShow", function(self) - if(self.containerStyled) then return end + if(self.containerStyled) then return end for i = 1, 20 do SV.API:Set("!_ItemButton", _G["AchievementFrameCategoriesContainerButton"..i]) - end - self.containerStyled = true + end + self.containerStyled = true end) hooksecurefunc("AchievementButton_DisplayAchievement", function(self) - if(self.accountWide and self.bg3) then + if(self.accountWide and self.bg3) then self.bg3:SetBackdropBorderColor(ACHIEVEMENTUI_BLUEBORDER_R, ACHIEVEMENTUI_BLUEBORDER_G, ACHIEVEMENTUI_BLUEBORDER_B) - elseif self.bg3 then + elseif self.bg3 then self.bg3:SetBackdropBorderColor(0,0,0) - end + end end) hooksecurefunc("AchievementFrameSummary_UpdateAchievements", _hook_AchievementsUpdate) @@ -277,7 +277,7 @@ local function AchievementStyle() local tex = _G[gName.."IconTexture"] if(bling) then bling:Die() end if(over) then over:Die() end - if(tex) then + if(tex) then tex:SetTexCoord(unpack(_G.SVUI_ICON_COORDS)) tex:InsetPoints() end @@ -288,7 +288,7 @@ local function AchievementStyle() icon:ClearAllPoints() icon:SetPoint("LEFT", 6, 0) end - + if(track) then track:ClearAllPoints() track:SetPoint("BOTTOMLEFT", 1, 5) @@ -300,18 +300,18 @@ local function AchievementStyle() end local u = {"Player", "Friend"} - for c, v in pairs(u) do - for f = 1, 9 do + for c, v in pairs(u) do + for f = 1, 9 do local d = "AchievementFrameComparisonContainerButton"..f..v; _G[d]:RemoveTextures() _G[d.."Background"]:Die() - if _G[d.."Description"]then + if _G[d.."Description"]then _G[d.."Description"]:SetTextColor(0.6, 0.6, 0.6) hooksecurefunc(_G[d.."Description"], "SetTextColor", _hook_DescriptionColor) - end + end _G[d].bg1 = _G[d]:CreateTexture(nil, "BACKGROUND") _G[d].bg1:SetDrawLayer("BACKGROUND", 4) - _G[d].bg1:SetTexture(SV.media.background.transparent) + _G[d].bg1:SetTexture(SV.BaseTexture) _G[d].bg1:SetVertexColor(unpack(SV.media.color.default)) _G[d].bg1:SetPoint("TOPLEFT", 4, -4) _G[d].bg1:SetPoint("BOTTOMRIGHT", -4, 4) @@ -331,9 +331,9 @@ local function AchievementStyle() _G[d].bg4:SetPoint("TOPLEFT", 1, -1) _G[d].bg4:SetPoint("BOTTOMRIGHT", -1, 1) - if v == "Friend"then + if v == "Friend"then _G[d.."Shield"]:SetPoint("TOPRIGHT", _G["AchievementFrameComparisonContainerButton"..f.."Friend"], "TOPRIGHT", -20, -3) - end + end _G[d.."IconBling"]:Die() _G[d.."IconOverlay"]:Die() @@ -344,28 +344,28 @@ local function AchievementStyle() _G[d.."Icon"]:SetPoint("LEFT", 6, 0) _G[d.."IconTexture"]:SetTexCoord(unpack(_G.SVUI_ICON_COORDS)) _G[d.."IconTexture"]:InsetPoints() - end + end end hooksecurefunc("AchievementFrameComparison_DisplayAchievement", function(i) local w = i.player; - local x = i.friend + local x = i.friend w.titleBar:Die() x.titleBar:Die() - if not w.bg3 or not x.bg3 then - return - end - if w.accountWide then + if not w.bg3 or not x.bg3 then + return + end + if w.accountWide then w.bg3:SetTexture(ACHIEVEMENTUI_BLUEBORDER_R, ACHIEVEMENTUI_BLUEBORDER_G, ACHIEVEMENTUI_BLUEBORDER_B) - else + else w.bg3:SetTexture(0,0,0,1) - end + end - if x.accountWide then + if x.accountWide then x.bg3:SetTexture(ACHIEVEMENTUI_BLUEBORDER_R, ACHIEVEMENTUI_BLUEBORDER_G, ACHIEVEMENTUI_BLUEBORDER_B) - else + else x.bg3:SetTexture(0,0,0,1) - end + end end) for f = 1, 20 do @@ -385,8 +385,8 @@ local function AchievementStyle() hooksecurefunc("AchievementButton_GetProgressBar", function(y) local d = _G["AchievementFrameProgressBar"..y] - if d then - if not d.styled then + if d then + if not d.styled then d:RemoveTextures() d:SetStatusBarTexture(SV.media.statusbar.default) d:SetStatusBarColor(4/255, 179/255, 30/255) @@ -394,7 +394,7 @@ local function AchievementStyle() d:SetHeight(d:GetHeight()-2) d.bg1 = d:CreateTexture(nil, "BACKGROUND") d.bg1:SetDrawLayer("BACKGROUND", 4) - d.bg1:SetTexture(SV.media.background.transparent) + d.bg1:SetTexture(SV.BaseTexture) d.bg1:SetVertexColor(unpack(SV.media.color.default)) d.bg1:SetAllPoints() d.bg3 = d:CreateTexture(nil, "BACKGROUND") @@ -405,58 +405,58 @@ local function AchievementStyle() d.text:ClearAllPoints() d.text:SetPoint("CENTER", d, "CENTER", 0, -1) d.text:SetJustifyH("CENTER") - if y>1 then + if y>1 then d:ClearAllPoints() d:SetPoint("TOP", _G["AchievementFrameProgressBar"..y-1], "BOTTOM", 0, -5) hooksecurefunc(d, "SetPoint", function(k, p, q, r, s, t, z) - if not z then + if not z then k:ClearAllPoints()k:SetPoint("TOP", _G["AchievementFrameProgressBar"..y-1], "BOTTOM", 0, -5, true) - end + end end) - end - d.styled = true - end - end + end + d.styled = true + end + end end) hooksecurefunc("AchievementObjectives_DisplayCriteria", function(A, B) local C = GetAchievementNumCriteria(B) local D, E = 0, 0; - for f = 1, C do + for f = 1, C do local F, G, H, I, J, K, L, M, N = GetAchievementCriteriaInfo(B, f) - if G == CRITERIA_TYPE_ACHIEVEMENT and M then + if G == CRITERIA_TYPE_ACHIEVEMENT and M then E = E+1; local O = AchievementButton_GetMeta(E) - if A.completed and H then + if A.completed and H then O.label:SetShadowOffset(0, 0) O.label:SetTextColor(1, 1, 1, 1) - elseif H then + elseif H then O.label:SetShadowOffset(1, -1) O.label:SetTextColor(0, 1, 0, 1) - else + else O.label:SetShadowOffset(1, -1) O.label:SetTextColor(.6, .6, .6, 1) - end - elseif G ~= 1 then + end + elseif G ~= 1 then D = D+1; local P = AchievementButton_GetCriteria(D) - if A.completed and H then + if A.completed and H then P.name:SetTextColor(1, 1, 1, 1) P.name:SetShadowOffset(0, 0) - elseif H then + elseif H then P.name:SetTextColor(0, 1, 0, 1) P.name:SetShadowOffset(1, -1) - else + else P.name:SetTextColor(.6, .6, .6, 1) P.name:SetShadowOffset(1, -1) - end - end - end + end + end + end end) -end ---[[ -########################################################## +end +--[[ +########################################################## MOD LOADING ########################################################## ]]-- -MOD:SaveBlizzardStyle("Blizzard_AchievementUI", AchievementStyle) +MOD:SaveBlizzardStyle("Blizzard_AchievementUI", AchievementStyle) \ No newline at end of file diff --git a/SVUI_Skins/components/blizzard/guild.lua b/SVUI_Skins/components/blizzard/guild.lua index 83cdee2..5552a5e 100644 --- a/SVUI_Skins/components/blizzard/guild.lua +++ b/SVUI_Skins/components/blizzard/guild.lua @@ -18,15 +18,15 @@ local SV = _G['SVUI']; local L = SV.L; local MOD = SV.Skins; local Schema = MOD.Schema; ---[[ -########################################################## +--[[ +########################################################## HELPERS ########################################################## ]]-- local format = string.format; local internalTest = false; -local GuildFrameList = { +local GuildFrameList = { "GuildNewPerksFrame", "GuildFrameInset", "GuildFrameBottomInset", @@ -84,7 +84,7 @@ local CalendarIconList = { [CALENDAR_EVENTTYPE_OTHER] = "Interface\\Calendar\\UI-Calendar-Event-Other" }; -local LFGFrameList = { +local LFGFrameList = { "LookingForGuildPvPButton", "LookingForGuildWeekendsButton", "LookingForGuildWeekdaysButton", @@ -98,13 +98,13 @@ local function GCTabHelper(tab) tab.Panel:Hide() tab.bg1 = tab:CreateTexture(nil,"BACKGROUND") tab.bg1:SetDrawLayer("BACKGROUND",4) - tab.bg1:SetTexture(SV.media.background.transparent) + tab.bg1:SetTexture(SV.BaseTexture) tab.bg1:SetVertexColor(unpack(SV.media.color.default)) tab.bg1:InsetPoints(tab.Panel,1) tab.bg3 = tab:CreateTexture(nil,"BACKGROUND") tab.bg3:SetDrawLayer("BACKGROUND",2) tab.bg3:SetTexture(0,0,0,1) - tab.bg3:SetAllPoints(tab.Panel) + tab.bg3:SetAllPoints(tab.Panel) end local function Tab_OnEnter(this) @@ -138,20 +138,20 @@ local function ChangeTabHelper(this) local a,b,c,d,e = this:GetPoint() this:SetPoint(a,b,c,1,e) -end +end local function StyleSortingButton(button) - if button.styled then return end + if button.styled then return end local outer = button:CreateTexture(nil, "OVERLAY") outer:WrapPoints(button, 6, 6) outer:SetTexture(SV.media.button.round) - outer:SetGradient("VERTICAL", 0.4, 0.47, 0.5, 0.3, 0.33, 0.35) - + outer:SetGradient("VERTICAL", 0.4, 0.47, 0.5, 0.3, 0.33, 0.35) + local icon = button:CreateTexture(nil, "OVERLAY") icon:WrapPoints(button, 6, 6) - if button.SetNormalTexture then + if button.SetNormalTexture then local iconTex = button:GetNormalTexture() iconTex:SetGradient("VERTICAL", 0.5, 0.53, 0.55, 0.8, 0.8, 1) SetPortraitToTexture(icon, iconTex) @@ -163,53 +163,53 @@ local function StyleSortingButton(button) hover:SetTexture(SV.media.button.round) hover:SetGradient(unpack(SV.media.gradient.yellow)) - if button.SetPushedTexture then + if button.SetPushedTexture then local pushed = button:CreateTexture(nil, "BORDER") pushed:WrapPoints(button, 6, 6) pushed:SetTexture(SV.media.button.round) pushed:SetGradient(unpack(SV.media.gradient.highlight)) button:SetPushedTexture(pushed) - end + end - if button.SetCheckedTexture then + if button.SetCheckedTexture then local checked = button:CreateTexture(nil, "BORDER") checked:WrapPoints(button, 6, 6) checked:SetTexture(SV.media.button.round) checked:SetGradient(unpack(SV.media.gradient.green)) button:SetCheckedTexture(checked) - end + end - if button.SetDisabledTexture then + if button.SetDisabledTexture then local disabled = button:CreateTexture(nil, "BORDER") disabled:WrapPoints(button, 6, 6) disabled:SetTexture(SV.media.button.round) disabled:SetGradient(unpack(SV.media.gradient.default)) button:SetDisabledTexture(disabled) - end + end local cd = button:GetName() and _G[button:GetName().."Cooldown"] - if cd then + if cd then cd:ClearAllPoints() cd:InsetPoints() - end + end button.styled = true end local _hook_RankOrder_OnUpdate = function() - for i = 1, GuildControlGetNumRanks()do + for i = 1, GuildControlGetNumRanks()do local frame = _G["GuildControlUIRankOrderFrameRank"..i] - if frame then + if frame then frame.downButton:SetStyle("Button") frame.upButton:SetStyle("Button") frame.deleteButton:SetStyle("Button") - if not frame.nameBox.Panel then + if not frame.nameBox.Panel then frame.nameBox:SetStyle("Editbox") - end + end frame.nameBox.Panel:SetPoint("TOPLEFT",-2,-4) frame.nameBox.Panel:SetPoint("BOTTOMRIGHT",-4,4) - end - end -end + end + end +end local function GuildInfoEvents_SetButton(button, eventIndex) local dateData = date("*t") @@ -217,34 +217,34 @@ local function GuildInfoEvents_SetButton(button, eventIndex) local formattedTime = GameTime_GetFormattedTime(hour, minute, true) local unformattedText; if dateData["day"] == day and dateData["month"] == month then - unformattedText = NORMAL_FONT_COLOR_CODE..GUILD_EVENT_TODAY..FONT_COLOR_CODE_CLOSE + unformattedText = NORMAL_FONT_COLOR_CODE..GUILD_EVENT_TODAY..FONT_COLOR_CODE_CLOSE else local year = dateData["year"] if month < dateData["month"] then - year = year + 1 - end + year = year + 1 + end local newTime = time{year = year, month = month, day = day} if(((newTime - time()) < 518400) and CALENDAR_WEEKDAY_NAMES[weekday]) then unformattedText = CALENDAR_WEEKDAY_NAMES[weekday] - elseif CALENDAR_WEEKDAY_NAMES[weekday]and day and month then + elseif CALENDAR_WEEKDAY_NAMES[weekday]and day and month then unformattedText = format(GUILD_NEWS_DATE, CALENDAR_WEEKDAY_NAMES[weekday], day, month) - end - end + end + end if button.text and unformattedText then button.text:SetFormattedText(GUILD_EVENT_FORMAT, unformattedText, formattedTime, title) - end + end button.index = eventIndex; if button.icon.type ~= "event" then button.icon.type = "event" button.icon:SetTexCoord(0, 1, 0, 1) button.icon:SetWidth(14) button.icon:SetHeight(14) - end + end if CalendarIconList[eventType] then button.icon:SetTexture(CalendarIconList[eventType]) else button.icon:SetTexture("Interface\\LFGFrame\\LFGIcon-"..textureName) - end + end end local _hook_UIRankOrder = function(self) @@ -252,7 +252,7 @@ local _hook_UIRankOrder = function(self) end local _hook_GuildBankFrame_Update = function(self) - if GuildBankFrame.mode ~= "bank" then return end + if GuildBankFrame.mode ~= "bank" then return end local curTab = GetCurrentGuildBankTab() local numSlots = NUM_SLOTS_PER_GUILDBANK_GROUP local maxSlots = MAX_GUILDBANK_SLOTS_PER_TAB @@ -260,7 +260,7 @@ local _hook_GuildBankFrame_Update = function(self) for i = 1, maxSlots do btnID = i % numSlots if btnID == 0 then - btnID = numSlots + btnID = numSlots end slotID = ceil((i - 0.5) / numSlots) btnName = ("GuildBankColumn%dButton%d"):format(slotID, btnID) @@ -273,10 +273,10 @@ local _hook_GuildBankFrame_Update = function(self) if(quality > 1) then r, g, b = GetItemQualityColor(quality) end - end + end button:SetBackdropBorderColor(r, g, b, a) end - end + end end local _hook_BankTabPermissions = function(self) @@ -284,15 +284,15 @@ local _hook_BankTabPermissions = function(self) tabs = GetNumGuildBankTabs() - if tabs < MAX_BUY_GUILDBANK_TABS then - tabs = tabs + 1 + if tabs < MAX_BUY_GUILDBANK_TABS then + tabs = tabs + 1 end - for i = 1, tabs do + for i = 1, tabs do baseName = ("GuildControlBankTab%d"):format(i) ownedName = ("%sOwned"):format(baseName) tab = _G[ownedName] - + if(tab) then if(tab.tabIcon) then tab.tabIcon:SetTexCoord(unpack(_G.SVUI_ICON_COORDS)) end if(tab.editBox) then tab.editBox:SetStyle("Editbox") end @@ -324,17 +324,17 @@ local _hook_BankTabPermissions = function(self) end end end - end - internalTest = true + end + internalTest = true end ---[[ -########################################################## +--[[ +########################################################## GUILDFRAME MODRS ########################################################## ]]-- local function GuildBankStyle() if SV.db.Skins.blizzard.enable ~= true or SV.db.Skins.blizzard.gbank ~= true then - return + return end SV.API:Set("Window", GuildBankFrame) @@ -343,11 +343,11 @@ local function GuildBankStyle() GuildBankMoneyFrameBackground:Die() SV.API:Set("ScrollFrame", GuildBankPopupScrollFrameScrollBar) - for i = 1, GuildBankFrame:GetNumChildren() do + for i = 1, GuildBankFrame:GetNumChildren() do local child = select(i, GuildBankFrame:GetChildren()) if(child and child.GetPushedTexture and child:GetPushedTexture() and not child:GetName()) then SV.API:Set("CloseButton", child) - end + end end GuildBankFrameDepositButton:SetStyle("Button") @@ -360,7 +360,7 @@ local function GuildBankStyle() -- local sortButton = CreateFrame("Button", nil, GuildBankFrame) -- sortButton:SetPoint("BOTTOMLEFT", GuildBankFrame, "BOTTOMRIGHT", 2, 0) -- sortButton:SetSize(36, 36) - -- sortButton:SetStyle("DockButton") + -- sortButton:SetStyle("DockButton") -- sortButton:SetNormalTexture(BAGS.media.cleanupIcon) -- StyleSortingButton(sortButton) -- local Sort_OnClick = BAGS:RunSortingProcess(BAGS.Sort, "guild") @@ -372,13 +372,13 @@ local function GuildBankStyle() GuildBankInfoScrollFrame:RemoveTextures() GuildBankInfoScrollFrame:SetWidth(GuildBankInfoScrollFrame:GetWidth()-8) GuildBankTransactionsScrollFrame:RemoveTextures() - + for i = 1, NUM_GUILDBANK_COLUMNS do local frame = _G["GuildBankColumn"..i] if(frame) then frame:RemoveTextures() local baseName = ("GuildBankColumn%dButton"):format(i) - for slotID = 1, NUM_SLOTS_PER_GUILDBANK_GROUP do + for slotID = 1, NUM_SLOTS_PER_GUILDBANK_GROUP do local btnName = ("%s%d"):format(baseName, slotID) local button = _G[btnName] if(button) then @@ -397,7 +397,7 @@ local function GuildBankStyle() end end end - end + end for i = 1, 8 do local baseName = ("GuildBankTab%d"):format(i) @@ -416,7 +416,7 @@ local function GuildBankStyle() end end end - end + end for i = 1, 4 do local baseName = ("GuildBankFrameTab%d"):format(i) @@ -424,7 +424,7 @@ local function GuildBankStyle() if(frame) then SV.API:Set("Tab", _G[baseName]) end - end + end hooksecurefunc('GuildBankFrame_Update', _hook_GuildBankFrame_Update) @@ -457,17 +457,17 @@ local function GuildBankStyle() icon:SetTexCoord(unpack(_G.SVUI_ICON_COORDS)) end end - end + end SV.API:Set("ScrollFrame", GuildBankTransactionsScrollFrameScrollBar) SV.API:Set("ScrollFrame", GuildBankInfoScrollFrameScrollBar) -end +end local function GuildFrameStyle() if SV.db.Skins.blizzard.enable ~= true or SV.db.Skins.blizzard.guild ~= true then - return + return end - + SV.API:Set("Window", GuildFrame) SV.API:Set("CloseButton", GuildMemberDetailCloseButton) @@ -488,12 +488,12 @@ local function GuildFrameStyle() button:RemoveTextures(true) button:SetStyle("Button") end - end + end for i = 1, #GuildCheckBoxList do local check = _G[GuildCheckBoxList[i]] if(check) then check:SetStyle("Checkbox") end - end + end for i = 1, 5 do local tab = _G["GuildFrameTab"..i] @@ -504,7 +504,7 @@ local function GuildFrameStyle() end end end - + GuildNewsBossModel:SetStyle("Frame", 'Transparent') GuildNewsBossModelTextFrame:SetStyle("Frame", "Default") GuildNewsBossModelTextFrame.Panel:SetPoint("TOPLEFT", GuildNewsBossModel.Panel, "BOTTOMLEFT", 0, -1) @@ -515,11 +515,11 @@ local function GuildFrameStyle() GuildRecruitmentDamagerButton.checkButton:SetStyle("Checkbox") GuildFactionBar:RemoveTextures() - GuildFactionBar.progress:SetTexture(SV.media.statusbar.default) + GuildFactionBar.progress:SetTexture(SV.BaseTexture) GuildFactionBar:SetStyle("Frame", "Inset") GuildFactionBar.Panel:SetPoint("TOPLEFT", GuildFactionBar.progress, "TOPLEFT", -1, 1) GuildFactionBar.Panel:SetPoint("BOTTOMRIGHT", GuildFactionBar, "BOTTOMRIGHT", 1, 1) - + GuildRosterContainer:SetStyle("Frame", "Inset") SV.API:Set("ScrollFrame", GuildRosterContainerScrollBar, 4, -4) GuildRosterShowOfflineButton:SetStyle("Checkbox") @@ -529,7 +529,7 @@ local function GuildFrameStyle() if(btn) then btn:RemoveTextures(true) end - end + end SV.API:Set("DropDown", GuildRosterViewDropdown, 200) @@ -557,8 +557,8 @@ local function GuildFrameStyle() if(btn.header) then btn.header:Die() end btn:RemoveTextures() btn:SetStyle("Button") - end - end + end + end GuildNewsFiltersFrame:RemoveTextures() GuildNewsFiltersFrame:SetStyle("!_Frame", "Transparent", true) @@ -569,7 +569,7 @@ local function GuildFrameStyle() if(btn) then btn:SetStyle("Checkbox") end - end + end GuildNewsFiltersFrame:SetPoint("TOPLEFT", GuildFrame, "TOPRIGHT", 4, -20) SV.API:Set("ScrollFrame", GuildNewsContainerScrollBar, 4, 4) @@ -604,7 +604,7 @@ local function GuildFrameStyle() local editChildren = GuildTextEditFrame:GetNumChildren() - for i = 1, editChildren do + for i = 1, editChildren do local child = select(i, GuildTextEditFrame:GetChildren()) if(child:GetName() == "GuildTextEditFrameCloseButton") then if(child:GetWidth() < 33) then @@ -612,7 +612,7 @@ local function GuildFrameStyle() else child:SetStyle("Button") end - end + end end SV.API:Set("ScrollFrame", GuildLogScrollFrameScrollBar, 4, 4) @@ -620,22 +620,22 @@ local function GuildFrameStyle() local logChildren = GuildLogFrame:GetNumChildren() - for i = 1, logChildren do + for i = 1, logChildren do local child = select(i, GuildLogFrame:GetChildren()) - if child:GetName() == "GuildLogFrameCloseButton" then + if child:GetName() == "GuildLogFrameCloseButton" then if(child:GetWidth() < 33) then SV.API:Set("CloseButton", child) else child:SetStyle("Button") end - end - end + end + end GuildRewardsFrame:SetStyle("Frame", "Inset") SV.API:Set("ScrollFrame", GuildRewardsContainerScrollBar, 4, -4) SV.API:Set("ScrollFrame", GuildPerksContainerScrollBar, 4, 2) - for i = 1, 8 do + for i = 1, 8 do local button = _G["GuildPerksContainerButton"..i] if button then button:RemoveTextures() @@ -648,15 +648,15 @@ local function GuildFrameStyle() icon:SetParent(button.Panel) end end - end - - for i = 1, 8 do + end + + for i = 1, 8 do local button = _G["GuildRewardsContainerButton"..i] if button then button:RemoveTextures() SV.API:Set("ItemButton", button) end - end + end local maxCalendarEvents = CalendarGetNumGuildEvents(); local scrollFrame = GuildInfoFrameApplicantsContainer; @@ -669,8 +669,8 @@ local function GuildFrameStyle() button.selectedTex:Die() button:GetHighlightTexture():Die() button:SetBackdrop(nil) - end -end + end +end local function GuildControlStyle() if SV.db.Skins.blizzard.enable~=true or SV.db.Skins.blizzard.guildcontrol~=true then return end @@ -694,7 +694,7 @@ local function GuildControlStyle() for i=1, NUM_RANK_FLAGS do local check = _G["GuildControlUIRankSettingsFrameCheckbox"..i] - if(check) then check:SetStyle("Checkbox") end + if(check) then check:SetStyle("Checkbox") end end GuildControlUIRankOrderFrameNewButton:SetStyle("Button") @@ -709,7 +709,7 @@ local function GuildControlStyle() SV.API:Set("DropDown", GuildControlUIRankBankFrameRankDropDown, 180) GuildControlUIRankBankFrameRankDropDownButton:SetWidth(20) -end +end local function LFGuildFrameStyle() if(SV.db.Skins.blizzard.enable ~= true or SV.db.Skins.blizzard.lfguild ~= true) then return end @@ -720,7 +720,7 @@ local function LFGuildFrameStyle() local check = _G[LFGFrameList[i]] if(check) then check:SetStyle("Checkbox") end end - + LookingForGuildTankButton.checkButton:SetStyle("Checkbox") LookingForGuildHealerButton.checkButton:SetStyle("Checkbox") LookingForGuildDamagerButton.checkButton:SetStyle("Checkbox") @@ -756,13 +756,13 @@ local function LFGuildFrameStyle() GuildFinderRequestMembershipFrameCancelButton:SetStyle("Button") GuildFinderRequestMembershipFrameInputFrame:RemoveTextures() GuildFinderRequestMembershipFrameInputFrame:SetStyle("!_Frame", "Default") -end ---[[ -########################################################## +end +--[[ +########################################################## MOD LOADING ########################################################## ]]-- MOD:SaveBlizzardStyle("Blizzard_GuildBankUI",GuildBankStyle) MOD:SaveBlizzardStyle("Blizzard_GuildUI",GuildFrameStyle) MOD:SaveBlizzardStyle("Blizzard_GuildControlUI",GuildControlStyle) -MOD:SaveBlizzardStyle("Blizzard_LookingForGuildUI",LFGuildFrameStyle) +MOD:SaveBlizzardStyle("Blizzard_LookingForGuildUI",LFGuildFrameStyle) \ No newline at end of file diff --git a/SVUI_Skins/components/blizzard/pvp.lua b/SVUI_Skins/components/blizzard/pvp.lua index 8394126..b827083 100644 --- a/SVUI_Skins/components/blizzard/pvp.lua +++ b/SVUI_Skins/components/blizzard/pvp.lua @@ -12,8 +12,8 @@ local SV = _G['SVUI']; local L = SV.L; local MOD = SV.Skins; local Schema = MOD.Schema; ---[[ -########################################################## +--[[ +########################################################## PVP MODR ########################################################## ]]-- @@ -32,7 +32,7 @@ end local function PVPFrameStyle() if (SV.db.Skins and (SV.db.Skins.blizzard.enable ~= true or SV.db.Skins.blizzard.pvp ~= true)) then - return + return end local HonorFrame = _G.HonorFrame; @@ -40,16 +40,16 @@ local function PVPFrameStyle() local PVPUIFrame = _G.PVPUIFrame; local WarGamesFrame = _G.WarGamesFrame; local PVPReadyDialog = _G.PVPReadyDialog; - + SV.API:Set("Window", PVPUIFrame, true) - + SV.API:Set("CloseButton", PVPUIFrameCloseButton) for g = 1, 2 do SV.API:Set("Tab", _G["PVPUIFrameTab"..g]) end - for i = 1, 4 do + for i = 1, 4 do local btn = _G["PVPQueueFrameCategoryButton"..i] if(btn) then btn.Background:Die() @@ -77,7 +77,7 @@ local function PVPFrameStyle() HonorFrame.BonusFrame.RandomBGButton:SetStyle("Button") HonorFrame.BonusFrame.RandomBGButton.SelectedTexture:InsetPoints() HonorFrame.BonusFrame.RandomBGButton.SelectedTexture:SetTexture(1, 1, 0, 0.1) - + HonorFrame.BonusFrame.DiceButton:DisableDrawLayer("ARTWORK") HonorFrame.BonusFrame.DiceButton:SetHighlightTexture("") HonorFrame.RoleInset:RemoveTextures() @@ -95,16 +95,16 @@ local function PVPFrameStyle() n.bg:SetDesaturated(true) end end) - + local ConquestPointsBar = _G.ConquestPointsBar; - + ConquestFrame.Inset:RemoveTextures() ConquestPointsBarLeft:Die() ConquestPointsBarRight:Die() ConquestPointsBarMiddle:Die() ConquestPointsBarBG:Die() ConquestPointsBarShadow:Die() - ConquestPointsBar.progress:SetTexture(SV.media.statusbar.default) + ConquestPointsBar.progress:SetTexture(SV.BaseTexture) ConquestPointsBar:SetStyle("!_Frame", 'Inset') ConquestPointsBar.Panel:WrapPoints(ConquestPointsBar, nil, -2) ConquestFrame:RemoveTextures() @@ -125,7 +125,7 @@ local function PVPFrameStyle() SV.API:Set("ScrollFrame", WarGamesFrameScrollFrameScrollBar) SV.API:Set("ScrollFrame", WarGamesFrameInfoScrollFrameScrollBar) WarGamesFrame.HorizontalBar:RemoveTextures() - + PVPReadyDialog:RemoveTextures() PVPReadyDialog:SetStyle("Frame", "Pattern") PVPReadyDialogEnterBattleButton:SetStyle("Button") @@ -133,17 +133,17 @@ local function PVPFrameStyle() SV.API:Set("CloseButton", PVPReadyDialogCloseButton) PVPReadyDialogRoleIcon.texture:SetTexture("Interface\\LFGFrame\\UI-LFG-ICONS-ROLEBACKGROUNDS") PVPReadyDialogRoleIcon.texture:SetAlpha(0.5) - + ConquestFrame.Inset:SetStyle("!_Frame", "Inset") WarGamesFrameScrollFrame:SetStyle("Frame", "Inset",false,2,2,6) hooksecurefunc("PVPReadyDialog_Display", _hook_PVPReadyDialogDisplay) -end ---[[ -########################################################## +end +--[[ +########################################################## MOD LOADING ########################################################## ]]-- MOD:SaveBlizzardStyle('Blizzard_PVPUI', PVPFrameStyle) --- /script StaticPopupSpecial_Show(PVPReadyDialog) +-- /script StaticPopupSpecial_Show(PVPReadyDialog) \ No newline at end of file diff --git a/SVUI_TrackOMatic/components/_load.xml b/SVUI_TrackOMatic/components/_load.xml index 620029a..de680a2 100644 --- a/SVUI_TrackOMatic/components/_load.xml +++ b/SVUI_TrackOMatic/components/_load.xml @@ -1,5 +1,4 @@ -<Ui xmlns="http://www.blizzard.com/wow/ui/"> +<Ui xmlns="http://www.blizzard.com/wow/ui/"> <Script file="triangulate.lua"/> <Script file="unitframe_gps.lua"/> - <Script file="guides.lua"/> -</Ui> +</Ui> \ No newline at end of file diff --git a/SVUI_TrackOMatic/components/guides.lua b/SVUI_TrackOMatic/components/guides.lua deleted file mode 100644 index 8e329a3..0000000 --- a/SVUI_TrackOMatic/components/guides.lua +++ /dev/null @@ -1,84 +0,0 @@ ---[[ -########################################################## -S V U I By: S.Jackson -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local select = _G.select; -local assert = _G.assert; -local type = _G.type; -local error = _G.error; -local pcall = _G.pcall; -local print = _G.print; -local ipairs = _G.ipairs; -local pairs = _G.pairs; -local next = _G.next; -local tostring = _G.tostring; -local tonumber = _G.tonumber; -local collectgarbage = _G.collectgarbage; -local tinsert = _G.tinsert; -local tremove = _G.tremove; -local string = _G.string; -local math = _G.math; -local bit = _G.bit; -local table = _G.table; ---[[ STRING METHODS ]]-- -local format, find, lower, match = string.format, string.find, string.lower, string.match; ---[[ MATH METHODS ]]-- -local abs, ceil, floor, round = math.abs, math.ceil, math.floor, math.round; -- Basic -local fmod, modf, sqrt = math.fmod, math.modf, math.sqrt; -- Algebra -local atan2, cos, deg, rad, sin = math.atan2, math.cos, math.deg, math.rad, math.sin; -- Trigonometry -local min, huge, random = math.min, math.huge, math.random; -- Uncommon -local sqrt2, max = math.sqrt(2), math.max; ---[[ TABLE METHODS ]]-- -local tcopy, twipe, tsort, tconcat, tdump = table.copy, table.wipe, table.sort, table.concat, table.dump; ---[[ BINARY METHODS ]]-- -local band = bit.band; ---BLIZZARD API -local InCombatLockdown = _G.InCombatLockdown; -local CreateFrame = _G.CreateFrame; -local IsInRaid = _G.IsInRaid; -local IsInGroup = _G.IsInGroup; -local IsInInstance = _G.IsInInstance; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SV = _G["SVUI"]; -local L = SV.L; -local PLUGIN = select(2, ...); -local CONFIGS = SV.defaults[PLUGIN.Schema]; - -local JOURNAL_CACHE = {}; - -local function CacheEncounterData() - local instanceID = EJ_GetCurrentInstance() - local difficultyID = GetDungeonDifficultyID() - EJ_SetDifficulty(difficultyID) - local bossIndex = 1; - local _, _, encounterID = EJ_GetEncounterInfoByIndex(bossIndex); - while encounterID do - local stack, encounter, _, _, curSectionID = {}, EJ_GetEncounterInfo(encounterID); - - repeat - local title, desc, _, _, _, siblingID, nextSectionID = EJ_GetSectionInfo(curSectionID) - JOURNAL_CACHE[curSectionID] = {title, desc} - table.insert(stack, siblingID) - table.insert(stack, nextSectionID) - curSectionID = table.remove(stack) - until not curSectionID - - bossIndex = bossIndex + 1; - _, _, encounterID = EJ_GetEncounterInfoByIndex(bossIndex); - end -end - -function PLUGIN:InitializeGuides() - LoadAddOn("Blizzard_EncounterJournal") - CacheEncounterData() -end diff --git a/SVUI_UnitFrames/Loader.lua b/SVUI_UnitFrames/Loader.lua index c0b7325..19da913 100644 --- a/SVUI_UnitFrames/Loader.lua +++ b/SVUI_UnitFrames/Loader.lua @@ -73,8 +73,8 @@ MOD.media.afflicted = [[Interface\AddOns\SVUI_UnitFrames\assets\UNIT-AFFLICTED]] SV:AssignMedia("font", "unitprimary", "SVUI Number Font", 11, "OUTLINE"); SV:AssignMedia("font", "unitsecondary", "SVUI Number Font", 11, "OUTLINE"); -SV:AssignMedia("font", "unitaura", "SVUI Alert Font", 10, "OUTLINE"); -SV:AssignMedia("font", "unitaurabar", "SVUI Caps Font", 12, "OUTLINE"); +SV:AssignMedia("font", "unitaura", "SVUI Default Font", 14, "OUTLINE"); +SV:AssignMedia("font", "unitaurabar", "SVUI Caps Font", 12, "NONE"); SV:AssignMedia("font", "unitaurasmall", "SVUI Pixel Font", 8, "MONOCHROMEOUTLINE"); SV:AssignMedia("globalfont", "unitprimary", "SVUI_Font_Unit"); SV:AssignMedia("globalfont", "unitsecondary", "SVUI_Font_Unit_Small"); diff --git a/SVUI_UnitFrames/SVUI_UnitFrames.lua b/SVUI_UnitFrames/SVUI_UnitFrames.lua index ef0b737..6248d1f 100644 --- a/SVUI_UnitFrames/SVUI_UnitFrames.lua +++ b/SVUI_UnitFrames/SVUI_UnitFrames.lua @@ -676,8 +676,8 @@ function MOD:RefreshUnitLayout(frame, template) frame.InfoPanel:SetPoint("TOPLEFT", POWER_GRIP, "BOTTOMLEFT", 0, 1) frame.InfoPanel:SetPoint("TOPRIGHT", POWER_GRIP, "BOTTOMRIGHT", 0, 1) else - frame.InfoPanel:SetPoint("TOPLEFT", frame.ActionPanel, "BOTTOMLEFT", 0, 1) - frame.InfoPanel:SetPoint("TOPRIGHT", frame.ActionPanel, "BOTTOMRIGHT", 0, 1) + frame.InfoPanel:SetPoint("TOPLEFT", frame, "BOTTOMLEFT", 0, 1) + frame.InfoPanel:SetPoint("TOPRIGHT", frame, "BOTTOMRIGHT", 0, 1) end end else @@ -753,7 +753,7 @@ function MOD:RefreshUnitLayout(frame, template) else PORTRAIT_GRIP:SetPoint(TOP_ANCHOR1, MASTER_GRIP, TOP_ANCHOR2, 0, -2) PORTRAIT_GRIP:SetPoint(BOTTOM_ANCHOR2, MASTER_GRIP, BOTTOM_ANCHOR1, 0, 2) - PORTRAIT_GRIP:SetWidth(PORTRAIT_WIDTH) + PORTRAIT_GRIP:SetWidth(PORTRAIT_WIDTH - 2) PORTRAIT_GRIP.Outline:Show() end diff --git a/SVUI_UnitFrames/class_resources/druid.lua b/SVUI_UnitFrames/class_resources/druid.lua index 8c10ca8..06d18c8 100644 --- a/SVUI_UnitFrames/class_resources/druid.lua +++ b/SVUI_UnitFrames/class_resources/druid.lua @@ -161,46 +161,6 @@ end DRUID ECLIPSE BAR ########################################################## ]]-- -local EclipseDirection = function(self) - if(self.inEclipse) then - local status = GetEclipseDirection() - - if(status == "sun") then - --self.Text:SetText("<") - --self.Text:SetTextColor(0.2, 1, 1, 0.5) - if(not self.Moon[1].anim:IsPlaying()) then - self.Sun[1]:Hide() - self.Sun[1].anim:Finish() - self.Moon[1]:Show() - self.Moon[1].anim:Play() - end - elseif(status == "moon") then - --self.Text:SetText(">") - --self.Text:SetTextColor(1, 0.5, 0, 0.5) - if(not self.Sun[1].anim:IsPlaying()) then - self.Moon[1]:Hide() - self.Moon[1].anim:Finish() - self.Sun[1]:Show() - self.Sun[1].anim:Play() - end - else - --self.Text:SetText("<") - --self.Text:SetTextColor(0.2, 1, 1, 0.5) - self.Sun[1]:Hide() - self.Sun[1].anim:Finish() - self.Moon[1]:Hide() - self.Moon[1].anim:Finish() - end - else - --self.Text:SetText("<") - --self.Text:SetTextColor(0.2, 1, 1, 0.5) - self.Sun[1]:Hide() - self.Sun[1].anim:Finish() - self.Moon[1]:Hide() - self.Moon[1].anim:Finish() - end -end - function MOD:CreateClassBar(playerFrame) local bar = CreateFrame('Frame', nil, playerFrame) bar:SetFrameLevel(playerFrame.TextGrip:GetFrameLevel() + 30) @@ -268,8 +228,31 @@ function MOD:CreateClassBar(playerFrame) chicken.Text:SetShadowOffset(0,0) chicken.Text:SetJustifyH("CENTER") - chicken.PostUpdatePower = EclipseDirection; - chicken.PostUpdateAura = EclipseDirection; + chicken.PostDirectionChange = { + ["sun"] = function(this) + --this.Text:SetText("<") + --this.Text:SetTextColor(0.2, 1, 1, 0.5) + this.Sun[1]:Hide() + this.Sun[1].anim:Finish() + this.Moon[1]:Show() + this.Moon[1].anim:Play() + end, + ["moon"] = function(this) + --this.Text:SetText(">") + --this.Text:SetTextColor(1, 0.5, 0, 0.5) + this.Moon[1]:Hide() + this.Moon[1].anim:Finish() + this.Sun[1]:Show() + this.Sun[1].anim:Play() + end, + ["none"] = function(this) + this.Text:SetText() + this.Sun[1]:Hide() + this.Sun[1].anim:Finish() + this.Moon[1]:Hide() + this.Moon[1].anim:Finish() + end + } local cat = CreateFrame('Frame',nil,bar) cat:SetAllPoints(bar) diff --git a/SVUI_UnitFrames/class_resources/shaman.lua b/SVUI_UnitFrames/class_resources/shaman.lua index b73a7b1..0ea7e52 100644 --- a/SVUI_UnitFrames/class_resources/shaman.lua +++ b/SVUI_UnitFrames/class_resources/shaman.lua @@ -1,7 +1,7 @@ --[[ ########################################################## S V U I By: Munglunch -########################################################## +########################################################## LOCALIZED LUA FUNCTIONS ########################################################## ]]-- @@ -20,8 +20,8 @@ local assert = _G.assert; local math = _G.math; --[[ MATH METHODS ]]-- local random = math.random; ---[[ -########################################################## +--[[ +########################################################## GET ADDON DATA ########################################################## ]]-- @@ -30,13 +30,13 @@ local L = SV.L; local LSM = _G.LibStub("LibSharedMedia-3.0") local MOD = SV.UnitFrames -if(not MOD) then return end +if(not MOD) then return end local oUF_SVUI = MOD.oUF assert(oUF_SVUI, "SVUI UnitFrames: unable to locate oUF.") -if(SV.class ~= "SHAMAN") then return end ---[[ -########################################################## +if(SV.class ~= "SHAMAN") then return end +--[[ +########################################################## LOCALS ########################################################## ]]-- @@ -46,19 +46,10 @@ local totemTextures = { [EARTH_TOTEM_SLOT] = [[Interface\Addons\SVUI_UnitFrames\assets\Class\SHAMAN-EARTH]], [FIRE_TOTEM_SLOT] = [[Interface\Addons\SVUI_UnitFrames\assets\Class\SHAMAN-FIRE]], [WATER_TOTEM_SLOT] = [[Interface\Addons\SVUI_UnitFrames\assets\Class\SHAMAN-WATER]], - [AIR_TOTEM_SLOT] = [[Interface\Addons\SVUI_UnitFrames\assets\Class\SHAMAN-AIR]], -}; - -SV.SpecialFX:Register("air", [[Spells\whiteflame_low.m2]], -12, 12, 12, -12, 0.22, 0, 0.52) - -local specEffects = { - [EARTH_TOTEM_SLOT] = "earth", - [FIRE_TOTEM_SLOT] = "fire", - [WATER_TOTEM_SLOT] = "water", - [AIR_TOTEM_SLOT] = "air", + [AIR_TOTEM_SLOT] = [[Interface\Addons\SVUI_UnitFrames\assets\Class\SHAMAN-AIR]], }; ---[[ -########################################################## +--[[ +########################################################## POSITIONING ########################################################## ]]-- @@ -87,15 +78,15 @@ local Reposition = function(self) bar[i]:SetHeight(size) bar[i]:SetWidth(size) bar[i]:GetStatusBarTexture():SetHorizTile(false) - if i==1 then + if i==1 then bar[i]:SetPoint("TOPLEFT", bar, "TOPLEFT", 0, 0) - else - bar[i]:SetPoint("LEFT", bar[i - 1], "RIGHT", -1, 0) + else + bar[i]:SetPoint("LEFT", bar[i - 1], "RIGHT", -1, 0) end - end -end ---[[ -########################################################## + end +end +--[[ +########################################################## SHAMAN ########################################################## ]]-- @@ -115,9 +106,7 @@ function MOD:CreateClassBar(playerFrame) bar[i].backdrop:SetDesaturated(true) bar[i].backdrop:SetVertexColor(0.2,0.2,0.2,0.7) bar[i]:EnableMouse(true) - - SV.SpecialFX:SetFXFrame(bar[i], specEffects[totemPriorities[i]], true) - end + end local classBarHolder = CreateFrame("Frame", "Player_ClassBar", bar) classBarHolder:SetPoint("TOPLEFT", playerFrame, "BOTTOMLEFT", 0, -2) @@ -128,5 +117,5 @@ function MOD:CreateClassBar(playerFrame) playerFrame.MaxClassPower = totemMax; playerFrame.RefreshClassBar = Reposition; playerFrame.TotemBars = bar - return 'TotemBars' -end + return 'TotemBars' +end \ No newline at end of file diff --git a/SVUI_UnitFrames/elements/auras.lua b/SVUI_UnitFrames/elements/auras.lua index fa49dbc..26672a2 100644 --- a/SVUI_UnitFrames/elements/auras.lua +++ b/SVUI_UnitFrames/elements/auras.lua @@ -200,7 +200,7 @@ local PostCreateAuraBars = function(self) local bar = self.statusBar local barTexture = LSM:Fetch("statusbar", SV.db.UnitFrames.auraBarStatusbar) bar:SetStatusBarTexture(barTexture) - bar.spelltime:SetFontObject(SVUI_Font_UnitAura); + bar.spelltime:SetFontObject(SVUI_Font_UnitAura_Bar); bar.spelltime:SetTextColor(1 ,1, 1) bar.spelltime:SetShadowOffset(1, -1) bar.spelltime:SetShadowColor(0, 0, 0) diff --git a/SVUI_UnitFrames/elements/essentials.lua b/SVUI_UnitFrames/elements/essentials.lua index 56be10c..d736f8b 100644 --- a/SVUI_UnitFrames/elements/essentials.lua +++ b/SVUI_UnitFrames/elements/essentials.lua @@ -232,23 +232,23 @@ end local function ADDInfoBG(frame) local bg = frame.InfoPanel:CreateTexture(nil, "BACKGROUND") - bg:SetPoint("TOPLEFT", frame.ActionPanel, "BOTTOMLEFT", 0, 1) - bg:SetPoint("BOTTOMRIGHT", frame.InfoPanel, "BOTTOMRIGHT", 0, 0) + bg:SetPoint("TOPLEFT", frame.InfoPanel, "TOPLEFT", 0, 1) + bg:SetPoint("BOTTOMRIGHT", frame.InfoPanel, "BOTTOMRIGHT", 0, 1) bg:SetTexture(1, 1, 1, 1) bg:SetGradientAlpha("VERTICAL", 0, 0, 0, 0, 0, 0, 0, 0.7) frame.InfoPanelBG = bg local left = frame.InfoPanel:CreateTexture(nil, "BACKGROUND") - left:SetPoint("TOPLEFT", frame.ActionPanel, "TOPLEFT", 0, -1) - left:SetPoint("BOTTOMLEFT", frame.InfoPanel, "BOTTOMLEFT", 0, 0) + left:SetPoint("TOPLEFT", frame.InfoPanel, "TOPLEFT", 0, -1) + left:SetPoint("BOTTOMLEFT", frame.InfoPanel, "BOTTOMLEFT", 0, -2) left:SetWidth(2) left:SetTexture(1, 1, 1, 1) left:SetGradientAlpha("VERTICAL", 0, 0, 0, 0, 0, 0, 0, 1) frame.InfoPanelLeft = left local right = frame.InfoPanel:CreateTexture(nil, "BACKGROUND") - right:SetPoint("TOPRIGHT", frame.ActionPanel, "TOPRIGHT", 0, -1) - right:SetPoint("BOTTOMRIGHT", frame.InfoPanel, "BOTTOMRIGHT", 0, 0) + right:SetPoint("TOPRIGHT", frame.InfoPanel, "TOPRIGHT", 0, -1) + right:SetPoint("BOTTOMRIGHT", frame.InfoPanel, "BOTTOMRIGHT", 0, -2) right:SetWidth(2) right:SetTexture(1, 1, 1, 1) right:SetGradientAlpha("VERTICAL", 0, 0, 0, 0, 0, 0, 0, 1) @@ -264,8 +264,8 @@ function MOD:SetActionPanel(frame, unit, noHealthText, noPowerText, noMiscText) local info = CreateFrame("Frame", nil, frame) info:SetFrameStrata("BACKGROUND") info:SetFrameLevel(0) - info:SetPoint("TOPLEFT", frame.ActionPanel, "BOTTOMLEFT", 0, 1) - info:SetPoint("TOPRIGHT", frame.ActionPanel, "BOTTOMRIGHT", 0, 1) + info:SetPoint("TOPLEFT", frame, "BOTTOMLEFT", 0, 1) + info:SetPoint("TOPRIGHT", frame, "BOTTOMRIGHT", 0, 1) info:SetHeight(baseSize) frame.TextGrip = CreateFrame("Frame", nil, info) @@ -755,11 +755,8 @@ function MOD:CreatePortrait(frame,smallUnit,isPlayer) portrait2Danchor:SetFrameStrata("LOW") portrait2Danchor:SetFrameLevel(2) - if smallUnit then - portrait2Danchor:SetStyle("Frame", "Transparent") - else - portrait2Danchor:SetStyle("Frame", "Transparent") - end + portrait2Danchor:SetStyle("Frame") + portrait2Danchor:SetPanelColor("darkest") portrait2Danchor.Outline = CreateFrame("Frame", nil, portrait2Danchor) portrait2Danchor.Outline:WrapPoints(portrait2Danchor) diff --git a/SVUI_UnitFrames/elements/misc.lua b/SVUI_UnitFrames/elements/misc.lua index 9abfef8..12ebe9f 100644 --- a/SVUI_UnitFrames/elements/misc.lua +++ b/SVUI_UnitFrames/elements/misc.lua @@ -131,8 +131,8 @@ function MOD:CreateAfflicted(frame) afflicted:SetTexture(MOD.media.afflicted) afflicted:SetVertexColor(0, 0, 0, 0) afflicted:SetBlendMode("ADD") - afflicted.ClassFilter = true - afflicted.MaxAlpha = 0.75 + frame.AfflictedFilter = true + frame.AfflictedAlpha = 0.75 return afflicted end diff --git a/SVUI_UnitFrames/frames.lua b/SVUI_UnitFrames/frames.lua index ba3a022..6115ac4 100644 --- a/SVUI_UnitFrames/frames.lua +++ b/SVUI_UnitFrames/frames.lua @@ -758,13 +758,13 @@ local UpdateArenaFrame = function(self) local pvp = self.Gladiator local trinket = pvp.Trinket local badge = pvp.Badge + local trinketsize = db.pvp.trinketSize + local specsize = db.pvp.specSize local leftAnchor = self local rightAnchor = self - local trinketSize = db.pvp.trinketSize - local specSize = db.pvp.specSize - trinket:SetSize(trinketSize, trinketSize) + trinket:SetSize(trinketsize, trinketsize) trinket:ClearAllPoints() if(db.pvp.trinketPosition == "RIGHT") then trinket:SetPoint("LEFT", rightAnchor, "RIGHT", db.pvp.trinketX, db.pvp.trinketY) @@ -774,7 +774,7 @@ local UpdateArenaFrame = function(self) leftAnchor = trinket end - badge:SetSize(specSize, specSize) + badge:SetSize(specsize, specsize) badge:ClearAllPoints() if(db.pvp.specPosition == "RIGHT") then badge:SetPoint("LEFT", rightAnchor, "RIGHT", db.pvp.specX, db.pvp.specY) diff --git a/SVUI_UnitFrames/groups.lua b/SVUI_UnitFrames/groups.lua index fc62c2e..c4a653e 100644 --- a/SVUI_UnitFrames/groups.lua +++ b/SVUI_UnitFrames/groups.lua @@ -42,12 +42,12 @@ local L = SV.L; local LSM = _G.LibStub("LibSharedMedia-3.0") local MOD = SV.UnitFrames -if(not MOD) then return end +if(not MOD) then return end local oUF_SVUI = MOD.oUF assert(oUF_SVUI, "SVUI UnitFrames: unable to locate oUF.") ---[[ -########################################################## +--[[ +########################################################## LOCALIZED GLOBALS ########################################################## ]]-- @@ -70,15 +70,15 @@ local RegisterUnitWatch = _G.RegisterUnitWatch; local UnregisterUnitWatch = _G.UnregisterUnitWatch; local FACTION_BAR_COLORS = _G.FACTION_BAR_COLORS; local RAID_CLASS_COLORS = _G.RAID_CLASS_COLORS ---[[ -########################################################## +--[[ +########################################################## LOCAL DATA ########################################################## ]]-- local GroupCounts = { ['raid'] = 8, ['raidpet'] = 2, - ['party'] = 1 + ['party'] = 1 }; local sortMapping = { @@ -161,27 +161,27 @@ FRAME HELPERS ########################################################## ]]-- local DetachSubFrames = function(...) - for i = 1, select("#", ...) do + for i = 1, select("#", ...) do local frame = select(i,...) frame:ClearAllPoints() - end + end end local UpdateTargetGlow = function(self) - if not self.unit then return end + if not self.unit then return end local unit = self.unit; - if(UnitIsUnit(unit, "target")) then + if(UnitIsUnit(unit, "target")) then self.TargetGlow:Show() local reaction = UnitReaction(unit, "player") - if(reaction) then + if(reaction) then local colors = FACTION_BAR_COLORS[reaction] self.TargetGlow:SetBackdropBorderColor(colors.r, colors.g, colors.b) - else + else self.TargetGlow:SetBackdropBorderColor(0.2, 1, 0.3) - end - else + end + else self.TargetGlow:Hide() - end + end end --[[ ########################################################## @@ -190,15 +190,15 @@ TEMPLATES AND PROTOTYPES ]]-- local BuildTemplates = {}; local UpdateTemplates = {}; ---[[ -########################################################## +--[[ +########################################################## COMMON ########################################################## ]]-- local AllowElement = function(self) if InCombatLockdown() then return; end - - if not self.isForced then + + if not self.isForced then self.sourceElement = self.unit; self.unit = "player" self.isForced = true; @@ -211,9 +211,9 @@ local AllowElement = function(self) RegisterUnitWatch(self, true) self:Show() - if self:IsVisible() and self.Update then + if self:IsVisible() and self.Update then self:Update() - end + end end local RestrictElement = function(self) @@ -224,19 +224,19 @@ local RestrictElement = function(self) UnregisterUnitWatch(self) RegisterUnitWatch(self) - if self.sourceEvent then + if self.sourceEvent then self:SetScript("OnUpdate", self.sourceEvent) - self.sourceEvent = nil + self.sourceEvent = nil end self.unit = self.sourceElement or self.unit; - if self:IsVisible() and self.Update then + if self:IsVisible() and self.Update then self:Update() - end + end end ---[[ -########################################################## +--[[ +########################################################## PARTY FRAMES ########################################################## ]]-- @@ -246,27 +246,27 @@ local PartyUnitUpdate = function(self) self:RegisterForClicks(SV.db.UnitFrames.fastClickTarget and 'AnyDown' or 'AnyUp') MOD.RefreshUnitMedia(self, "party") - if self.isChild then + if self.isChild then local altDB = db.petsGroup; - if self == _G[self.originalParent:GetName()..'Target'] then - altDB = db.targetsGroup - end - if not self.originalParent.childList then + if self == _G[self.originalParent:GetName()..'Target'] then + altDB = db.targetsGroup + end + if not self.originalParent.childList then self.originalParent.childList = {} - end + end self.originalParent.childList[self] = true; - if not InCombatLockdown()then + if not InCombatLockdown()then if altDB.enable then - local UNIT_WIDTH, UNIT_HEIGHT = MOD:GetActiveSize(altDB) + local UNIT_WIDTH, UNIT_HEIGHT = MOD:GetActiveSize(altDB) self:SetParent(self.originalParent) self:SetSize(UNIT_WIDTH, UNIT_HEIGHT) self:ClearAllPoints() SV:SetReversePoint(self, altDB.anchorPoint, self.originalParent, altDB.xOffset, altDB.yOffset) - else + else self:SetParent(SV.Hidden) - end - end - do + end + end + do local health = self.Health; health.Smooth = nil; health.frequentUpdates = nil; @@ -277,18 +277,18 @@ local PartyUnitUpdate = function(self) health:ClearAllPoints() health:SetPoint("TOPRIGHT", self, "TOPRIGHT", -1, -1) health:SetPoint("BOTTOMLEFT", self, "BOTTOMLEFT", 1, 1) - end - do + end + do local nametext = self.TextGrip.Name self:Tag(nametext, altDB.tags) - end - else + end + else if not InCombatLockdown() then local UNIT_WIDTH, UNIT_HEIGHT = MOD:GetActiveSize(db, "party") - self:SetSize(UNIT_WIDTH, UNIT_HEIGHT) - end + self:SetSize(UNIT_WIDTH, UNIT_HEIGHT) + end MOD:RefreshUnitLayout(self, "party") - end + end self:EnableElement('ReadyCheck') self:UpdateAllElements() end @@ -298,7 +298,7 @@ UpdateTemplates["party"] = function(self) local db = SV.db.UnitFrames.party local groupFrame = self:GetParent() - if not groupFrame.positioned then + if not groupFrame.positioned then groupFrame:ClearAllPoints() groupFrame:SetPoint("BOTTOMLEFT", SV.Dock.BottomLeft, "TOPLEFT", 0, 80) RegisterStateDriver(groupFrame, "visibility", "[group:party,nogroup:raid][@raid6,noexists,group:raid] show;hide") @@ -317,12 +317,12 @@ UpdateTemplates["party"] = function(self) childName = childFrame:GetName() petFrame = _G[("%sPet"):format(childName)] targetFrame = _G[("%sTarget"):format(childName)] - - if(petFrame) then + + if(petFrame) then petFrame:UnitUpdate() end - if(targetFrame) then + if(targetFrame) then targetFrame:UnitUpdate() end @@ -361,7 +361,7 @@ BuildTemplates["party"] = function(self, unit) self:RegisterEvent("PLAYER_TARGET_CHANGED", UpdateTargetGlow) self:RegisterEvent("PLAYER_ENTERING_WORLD", UpdateTargetGlow) self:RegisterEvent("GROUP_ROSTER_UPDATE", UpdateTargetGlow) - end + end self.Range = { insideAlpha = 1, outsideAlpha = 1 } @@ -369,10 +369,10 @@ BuildTemplates["party"] = function(self, unit) self.Allow = AllowElement self.UnitUpdate = PartyUnitUpdate - return self + return self end ---[[ -########################################################## +--[[ +########################################################## RAID FRAMES ########################################################## ]]-- @@ -383,9 +383,9 @@ local RaidUnitUpdate = function(self) self:RegisterForClicks(SV.db.UnitFrames.fastClickTarget and "AnyDown" or "AnyUp") local UNIT_WIDTH, UNIT_HEIGHT = MOD:GetActiveSize(db) - if not InCombatLockdown() then - self:SetSize(UNIT_WIDTH, UNIT_HEIGHT) - end + if not InCombatLockdown() then + self:SetSize(UNIT_WIDTH, UNIT_HEIGHT) + end do local rdBuffs = self.RaidDebuffs; @@ -397,10 +397,10 @@ local RaidUnitUpdate = function(self) rdBuffs:SetSize(actualSz, actualSz) rdBuffs:SetPoint("CENTER", self, "CENTER", db.rdebuffs.xOffset, db.rdebuffs.yOffset) rdBuffs:Show() - else + else self:DisableElement("RaidDebuffs") rdBuffs:Hide() - end + end end MOD.RefreshUnitMedia(self, token) @@ -422,7 +422,7 @@ UpdateTemplates["raid"] = function(self) groupFrame:SetPoint("BOTTOMLEFT", SV.Dock.BottomLeft, "TOPLEFT", 0, 80) RegisterStateDriver(groupFrame, "visibility", "[@raid6,exists,group:raid] show;hide") SV:NewAnchor(groupFrame, "Raid Frames") - groupFrame.positioned = true + groupFrame.positioned = true end local index = 1; @@ -436,12 +436,12 @@ UpdateTemplates["raid"] = function(self) childName = childFrame:GetName() petFrame = _G[("%sPet"):format(childName)] targetFrame = _G[("%sTarget"):format(childName)] - - if(petFrame) then + + if(petFrame) then petFrame:UnitUpdate() end - if(targetFrame) then + if(targetFrame) then targetFrame:UnitUpdate() end @@ -484,8 +484,8 @@ BuildTemplates["raid"] = function(self, unit) return self end ---[[ -########################################################## +--[[ +########################################################## RAID PETS ########################################################## ]]-- @@ -494,7 +494,7 @@ UpdateTemplates["raidpet"] = function(self) local db = SV.db.UnitFrames.raidpet local groupFrame = self:GetParent() - if not groupFrame.positioned then + if not groupFrame.positioned then groupFrame:ClearAllPoints() groupFrame:SetPoint("BOTTOMLEFT", SV.Screen, "BOTTOMLEFT", 4, 433) RegisterStateDriver(groupFrame, "visibility", "[group:raid] show;hide") @@ -513,12 +513,12 @@ UpdateTemplates["raidpet"] = function(self) childName = childFrame:GetName() petFrame = _G[("%sPet"):format(childName)] targetFrame = _G[("%sTarget"):format(childName)] - - if(petFrame) then + + if(petFrame) then petFrame:UnitUpdate() end - if(targetFrame) then + if(targetFrame) then targetFrame:UnitUpdate() end @@ -551,10 +551,10 @@ BuildTemplates["raidpet"] = function(self, unit) self:RegisterEvent("PLAYER_TARGET_CHANGED", UpdateTargetGlow) self:RegisterEvent("PLAYER_ENTERING_WORLD", UpdateTargetGlow) - return self + return self end ---[[ -########################################################## +--[[ +########################################################## TANK ########################################################## ]]-- @@ -563,36 +563,36 @@ local TankUnitUpdate = function(self) self.colors = oUF_SVUI.colors; self:RegisterForClicks(SV.db.UnitFrames.fastClickTarget and "AnyDown" or "AnyUp") MOD.RefreshUnitMedia(self, "tank") - if self.isChild and self.originalParent then + if self.isChild and self.originalParent then local targets = db.targetsGroup; - if not self.originalParent.childList then + if not self.originalParent.childList then self.originalParent.childList = {} - end + end self.originalParent.childList[self] = true; - if not InCombatLockdown()then + if not InCombatLockdown()then if targets.enable then local UNIT_WIDTH, UNIT_HEIGHT = MOD:GetActiveSize(targets) self:SetParent(self.originalParent) self:SetSize(UNIT_WIDTH, UNIT_HEIGHT) self:ClearAllPoints() SV:SetReversePoint(self, targets.anchorPoint, self.originalParent, targets.xOffset, targets.yOffset) - else + else self:SetParent(SV.Hidden) - end - end + end + end elseif not InCombatLockdown() then local UNIT_WIDTH, UNIT_HEIGHT = MOD:GetActiveSize(db) self:SetSize(UNIT_WIDTH, UNIT_HEIGHT) - end + end MOD:RefreshUnitLayout(self, "tank") - do + do local nametext = self.TextGrip.Name; - if oUF_SVUI.colors.healthclass then + if oUF_SVUI.colors.healthclass then self:Tag(nametext, "[name:10]") - else + else self:Tag(nametext, "[name:color][name:10]") - end - end + end + end self:UpdateAllElements() end @@ -600,10 +600,10 @@ UpdateTemplates["tank"] = function(self) if(SV.NeedsFrameAudit) then return end local db = SV.db.UnitFrames.tank - if db.enable ~= true then + if db.enable ~= true then UnregisterAttributeDriver(self, "state-visibility") self:Hide() - return + return end self:Hide() @@ -618,18 +618,18 @@ UpdateTemplates["tank"] = function(self) DetachSubFrames(self:GetChildren()) self:SetAttribute("yOffset", 7) - if not self.positioned then + if not self.positioned then self:ClearAllPoints() self:SetPoint("BOTTOMLEFT", SV.Dock.TopLeft, "BOTTOMLEFT", 0, 0) SV:NewAnchor(self, L["Tank Frames"]) self.Grip.positionOverride = "TOPLEFT" self:SetAttribute("minHeight", self.dirtyHeight) self:SetAttribute("minWidth", self.dirtyWidth) - self.positioned = true + self.positioned = true end local childFrame, childName, petFrame, targetFrame - for i = 1, self:GetNumChildren() do + for i = 1, self:GetNumChildren() do childFrame = select(i, self:GetChildren()) childFrame:UnitUpdate() @@ -637,10 +637,10 @@ UpdateTemplates["tank"] = function(self) petFrame = _G[("%sPet"):format(childName)] targetFrame = _G[("%sTarget"):format(childName)] - if(petFrame) then + if(petFrame) then petFrame:UnitUpdate() end - if(targetFrame) then + if(targetFrame) then targetFrame:UnitUpdate() end end @@ -665,10 +665,10 @@ BuildTemplates["tank"] = function(self, unit) self.originalParent = self:GetParent() self:UnitUpdate() - return self + return self end ---[[ -########################################################## +--[[ +########################################################## ASSIST ########################################################## ]]-- @@ -677,38 +677,38 @@ local AssistUnitUpdate = function(self) self.colors = oUF_SVUI.colors; self:RegisterForClicks(SV.db.UnitFrames.fastClickTarget and "AnyDown" or "AnyUp") MOD.RefreshUnitMedia(self, "assist") - if self.isChild and self.originalParent then + if self.isChild and self.originalParent then local targets = db.targetsGroup; - if not self.originalParent.childList then + if not self.originalParent.childList then self.originalParent.childList = {} - end + end self.originalParent.childList[self] = true; - if not InCombatLockdown()then + if not InCombatLockdown()then if targets.enable then local UNIT_WIDTH, UNIT_HEIGHT = MOD:GetActiveSize(targets) self:SetParent(self.originalParent) self:SetSize(UNIT_WIDTH, UNIT_HEIGHT) self:ClearAllPoints() SV:SetReversePoint(self, targets.anchorPoint, self.originalParent, targets.xOffset, targets.yOffset) - else + else self:SetParent(SV.Hidden) - end - end + end + end elseif not InCombatLockdown() then local UNIT_WIDTH, UNIT_HEIGHT = MOD:GetActiveSize(db) self:SetSize(UNIT_WIDTH, UNIT_HEIGHT) - end + end MOD:RefreshUnitLayout(self, "assist") - do + do local nametext = self.TextGrip.Name; - if oUF_SVUI.colors.healthclass then + if oUF_SVUI.colors.healthclass then self:Tag(nametext, "[name:10]") - else + else self:Tag(nametext, "[name:color][name:10]") - end - end + end + end self:UpdateAllElements() end @@ -728,18 +728,18 @@ UpdateTemplates["assist"] = function(self) DetachSubFrames(self:GetChildren()) self:SetAttribute("yOffset", 7) - if not self.positioned then + if not self.positioned then self:ClearAllPoints() self:SetPoint("TOPLEFT", SV.Dock.TopLeft, "BOTTOMLEFT", 0, -10) SV:NewAnchor(self, L["Assist Frames"]) self.Grip.positionOverride = "TOPLEFT" self:SetAttribute("minHeight", self.dirtyHeight) self:SetAttribute("minWidth", self.dirtyWidth) - self.positioned = true + self.positioned = true end local childFrame, childName, petFrame, targetFrame - for i = 1, self:GetNumChildren() do + for i = 1, self:GetNumChildren() do childFrame = select(i, self:GetChildren()) childFrame:UnitUpdate() @@ -747,10 +747,10 @@ UpdateTemplates["assist"] = function(self) petFrame = _G[("%sPet"):format(childName)] targetFrame = _G[("%sTarget"):format(childName)] - if(petFrame) then + if(petFrame) then petFrame:UnitUpdate() end - if(targetFrame) then + if(targetFrame) then targetFrame:UnitUpdate() end end @@ -775,7 +775,7 @@ BuildTemplates["assist"] = function(self, unit) self.originalParent = self:GetParent() self:UnitUpdate() - return self + return self end --[[ ########################################################## @@ -791,16 +791,16 @@ local HeaderMediaUpdate = function(self) while childFrame do MOD.RefreshUnitMedia(childFrame, token) - + childName = childFrame:GetName() petFrame = _G[("%sPet"):format(childName)] targetFrame = _G[("%sTarget"):format(childName)] - - if(petFrame) then + + if(petFrame) then MOD.RefreshUnitMedia(petFrame, token) end - if(targetFrame) then + if(targetFrame) then MOD.RefreshUnitMedia(targetFrame, token) end @@ -843,19 +843,19 @@ local HeaderEnableChildren = function(self) childFrame.TargetGlow:SetAlpha(0) childFrame:Allow() end - end + end end local HeaderDisableChildren = function(self) self.isForced = nil; - for i=1, select("#", self:GetChildren()) do + for i=1, select("#", self:GetChildren()) do local childFrame = select(i, self:GetChildren()) if(childFrame and childFrame.RegisterForClicks) then childFrame:RegisterForClicks(SV.db.UnitFrames.fastClickTarget and 'AnyDown' or 'AnyUp') childFrame.TargetGlow:SetAlpha(1) childFrame:Restrict() end - end + end end function MOD:SetGroupHeader(parentFrame, filter, layout, headerName, token, groupTag) @@ -876,12 +876,12 @@ function MOD:SetGroupHeader(parentFrame, filter, layout, headerName, token, grou end local UNIT_WIDTH, UNIT_HEIGHT = self:GetActiveSize(db) - local groupHeader = oUF_SVUI:SpawnHeader(headerName, template2, nil, - "oUF-initialConfigFunction", ("self:SetWidth(%d); self:SetHeight(%d); self:SetFrameLevel(5)"):format(UNIT_WIDTH, UNIT_HEIGHT), - "groupFilter", filter, - "showParty", true, - "showRaid", true, - "showSolo", true, + local groupHeader = oUF_SVUI:SpawnHeader(headerName, template2, nil, + "oUF-initialConfigFunction", ("self:SetWidth(%d); self:SetHeight(%d); self:SetFrameLevel(5)"):format(UNIT_WIDTH, UNIT_HEIGHT), + "groupFilter", filter, + "showParty", true, + "showRaid", true, + "showSolo", true, template1 and "template", template1 ) groupHeader.___groupkey = token; @@ -904,7 +904,7 @@ function MOD:SetGroupHeader(parentFrame, filter, layout, headerName, token, grou groupHeader.GroupTag = tag end - return groupHeader + return groupHeader end --[[ ########################################################## @@ -913,14 +913,14 @@ GROUP CONSTRUCTS ]]-- local GroupUpdate = function(self) local token = self.___groupkey - if SV.db.UnitFrames[token].enable ~= true then + if SV.db.UnitFrames[token].enable ~= true then UnregisterAttributeDriver(self, "state-visibility") self:Hide() - return + return end for i=1,#self.groups do self.groups[i]:Update() - end + end end local GroupMediaUpdate = function(self) @@ -938,18 +938,18 @@ local GroupSetVisibility = function(self) local frame = self.groups[i] if(db.allowedGroup[i]) then frame:Show() - else - if frame.forceShow then + else + if frame.forceShow then frame:Hide() frame:DisableChildren() frame:SetAttribute('startingIndex',1) - else + else frame:UnsetAttributes() - end + end end end - end - end + end + end end local GroupConfigure = function(self) @@ -970,29 +970,29 @@ local GroupConfigure = function(self) local frameEnabled = true; if(frame) then - if(settings.showBy == "UP") then + if(settings.showBy == "UP") then settings.showBy = "UP_RIGHT" end - if(settings.showBy == "DOWN") then + if(settings.showBy == "DOWN") then settings.showBy = "DOWN_RIGHT" end - if(isHorizontal) then + if(isHorizontal) then frame:SetAttribute("xOffset", settings.wrapXOffset * horizontal) frame:SetAttribute("yOffset", 0) frame:SetAttribute("columnSpacing", settings.wrapYOffset) - else + else frame:SetAttribute("xOffset", 0) frame:SetAttribute("yOffset", settings.wrapYOffset * vertical) frame:SetAttribute("columnSpacing", settings.wrapXOffset) end - if(not frame.isForced) then - if not frame.initialized then + if(not frame.isForced) then + if not frame.initialized then frame:SetAttribute("startingIndex", -4) frame:Show() - frame.initialized = true + frame.initialized = true end frame:SetAttribute("startingIndex", 1) end @@ -1033,7 +1033,7 @@ local GroupConfigure = function(self) end end - if(not settings.allowedGroup[i]) then + if(not settings.allowedGroup[i]) then frame:Hide() frameEnabled = false; else @@ -1042,50 +1042,50 @@ local GroupConfigure = function(self) end if(frameEnabled) then - if (i - 1) % settings.gRowCol == 0 then - if isHorizontal then - if(frame) then + if (i - 1) % settings.gRowCol == 0 then + if isHorizontal then + if(frame) then frame:SetPoint(anchorPoint, self, anchorPoint, 0, heightCalc * vertical) end heightCalc = heightCalc + UNIT_HEIGHT + settings.wrapYOffset; - yCalc = yCalc + 1 - else + yCalc = yCalc + 1 + else if(frame) then frame:SetPoint(anchorPoint, self, anchorPoint, widthCalc * horizontal, 0) end widthCalc = widthCalc + UNIT_WIDTH + settings.wrapXOffset; - xCalc = xCalc + 1 - end + xCalc = xCalc + 1 + end else - if isHorizontal then - if yCalc == 1 then - if(frame) then + if isHorizontal then + if yCalc == 1 then + if(frame) then frame:SetPoint(anchorPoint, self, anchorPoint, widthCalc * horizontal, 0) end widthCalc = widthCalc + (UNIT_WIDTH + settings.wrapXOffset) * 5; - xCalc = xCalc + 1 - elseif(frame) then + xCalc = xCalc + 1 + elseif(frame) then frame:SetPoint(anchorPoint, self, anchorPoint, (((UNIT_WIDTH + settings.wrapXOffset) * 5) * ((i - 1) % settings.gRowCol)) * horizontal, ((UNIT_HEIGHT + settings.wrapYOffset) * (yCalc - 1)) * vertical) - end - else - if xCalc == 1 then - if(frame) then + end + else + if xCalc == 1 then + if(frame) then frame:SetPoint(anchorPoint, self, anchorPoint, 0, heightCalc * vertical) end heightCalc = heightCalc + (UNIT_HEIGHT + settings.wrapYOffset) * 5; - yCalc = yCalc + 1 - elseif(frame) then + yCalc = yCalc + 1 + elseif(frame) then frame:SetPoint(anchorPoint, self, anchorPoint, ((UNIT_WIDTH + settings.wrapXOffset) * (xCalc - 1)) * horizontal, (((UNIT_HEIGHT + settings.wrapYOffset) * 5) * ((i - 1) % settings.gRowCol)) * vertical) - end - end + end + end end - if heightCalc == 0 then - heightCalc = heightCalc + (UNIT_HEIGHT + settings.wrapYOffset) * 5 - elseif widthCalc == 0 then - widthCalc = widthCalc + (UNIT_WIDTH + settings.wrapXOffset) * 5 + if heightCalc == 0 then + heightCalc = heightCalc + (UNIT_HEIGHT + settings.wrapYOffset) * 5 + elseif widthCalc == 0 then + widthCalc = widthCalc + (UNIT_WIDTH + settings.wrapXOffset) * 5 end end end @@ -1094,7 +1094,7 @@ local GroupConfigure = function(self) end function MOD:GetGroupFrame(token, layout) - if(not self.Headers[token]) then + if(not self.Headers[token]) then oUF_SVUI:RegisterStyle(layout, BuildTemplates[token]) oUF_SVUI:SetActiveStyle(layout) local groupFrame = CreateFrame("Frame", layout, _G.SVUI_UnitFrameParent, "SecureHandlerStateTemplate") @@ -1113,7 +1113,7 @@ function MOD:GetGroupFrame(token, layout) end function MOD:SetCustomFrame(token, layout) - if(not self.Headers[token]) then + if(not self.Headers[token]) then oUF_SVUI:RegisterStyle(layout, BuildTemplates[token]) oUF_SVUI:SetActiveStyle(layout) local groupFrame = self:SetGroupHeader(_G.SVUI_UnitFrameParent, nil, layout, layout, token) @@ -1138,7 +1138,7 @@ function MOD:SetGroupFrame(token, forceUpdate) if(token ~= "raidpet" and settings.enable ~= true) then UnregisterStateDriver(groupFrame, "visibility") groupFrame:Hide() - return + return end local groupCount = GroupCounts[token] or 1 @@ -1153,19 +1153,19 @@ function MOD:SetGroupFrame(token, forceUpdate) groupFrame:SetVisibility() - if(forceUpdate or not groupFrame.Grip) then + if(forceUpdate or not groupFrame.Grip) then groupFrame:Configure() - if(not groupFrame.isForced and settings.visibility) then + if(not groupFrame.isForced and settings.visibility) then RegisterStateDriver(groupFrame, "visibility", settings.visibility) - end - else + end + else groupFrame:Configure() groupFrame:Update() end - if(token == "raidpet" and settings.enable ~= true) then + if(token == "raidpet" and settings.enable ~= true) then UnregisterStateDriver(groupFrame, "visibility") groupFrame:Hide() - return + return end -end \ No newline at end of file +end diff --git a/SVUI_UnitFrames/libs/Plugins/oUF_Afflicted/oUF_Afflicted.lua b/SVUI_UnitFrames/libs/Plugins/oUF_Afflicted/oUF_Afflicted.lua index 22b11d1..def4e56 100644 --- a/SVUI_UnitFrames/libs/Plugins/oUF_Afflicted/oUF_Afflicted.lua +++ b/SVUI_UnitFrames/libs/Plugins/oUF_Afflicted/oUF_Afflicted.lua @@ -15,7 +15,7 @@ local GetActiveSpecGroup = _G.GetActiveSpecGroup; local _, ns = ... local oUF = oUF or ns.oUF if not oUF then return end - + local playerClass = select(2,UnitClass("player")) local CanDispel = { PRIEST = { Magic = true, Disease = true }, @@ -44,7 +44,6 @@ local blackList = { [GetSpellInfo(136182)] = true, --Improved Synapses [GetSpellInfo(136180)] = true, --Keen Eyesight } - local function GetDebuffType(unit, filter) if not unit or not UnitCanAssist("player", unit) then return nil end local i = 1 @@ -58,46 +57,45 @@ local function GetDebuffType(unit, filter) end end -local function UpdateTalentSpec(self, event, levels) - if event == "CHARACTER_POINTS_CHANGED" and levels > 0 then return end - - local currentSpec = 0; +local function CheckTalentTree(tree) local activeGroup = GetActiveSpecGroup() - - if(activeGroup) then - currentSpec = GetSpecialization(false, false, activeGroup) - end; - + if activeGroup and GetSpecialization(false, false, activeGroup) then + return tree == GetSpecialization(false, false, activeGroup) + end +end + +local function CheckSpec(self, event, levels) + if event == "CHARACTER_POINTS_CHANGED" and levels > 0 then return end if playerClass == "PRIEST" then - if currentSpec == 3 then + if CheckTalentTree(3) then dispellist.Disease = false else - dispellist.Disease = true - end + dispellist.Disease = true + end elseif playerClass == "PALADIN" then - if currentSpec == 1 then + if CheckTalentTree(1) then dispellist.Magic = true else - dispellist.Magic = false + dispellist.Magic = false end elseif playerClass == "SHAMAN" then - if currentSpec == 3 then + if CheckTalentTree(3) then dispellist.Magic = true else - dispellist.Magic = false + dispellist.Magic = false end elseif playerClass == "DRUID" then - if currentSpec == 4 then + if CheckTalentTree(4) then dispellist.Magic = true else - dispellist.Magic = false + dispellist.Magic = false end elseif playerClass == "MONK" then - if currentSpec == 2 then + if CheckTalentTree(2) then dispellist.Magic = true else - dispellist.Magic = false - end + dispellist.Magic = false + end end end @@ -108,53 +106,46 @@ local function CheckSymbiosis() dispellist.Disease = false end end - -local function Update(self, event, unit) - if unit ~= self.unit then return; end - local afflicted = self.Afflicted - local debuffType, texture = GetDebuffType(unit, afflicted.ClassFilter) + +local function Update(object, event, unit) + if unit ~= object.unit then return; end + local debuffType, texture = GetDebuffType(unit, object.AfflictedFilter) if debuffType then local color = AfflictedColor[debuffType] - afflicted:SetVertexColor(color.r, color.g, color.b, afflicted.MaxAlpha) + object.Afflicted:SetVertexColor(color.r, color.g, color.b, object.AfflictedAlpha or .5) else - afflicted:SetVertexColor(0,0,0,0) + object.Afflicted:SetVertexColor(0,0,0,0) end end - -local function Enable(self) - local afflicted = self.Afflicted - if(not afflicted) then return end - if(afflicted.ClassFilter and (not CanDispel[playerClass])) then return end - - afflicted.MaxAlpha = afflicted.MaxAlpha or 0.7 - - self:RegisterEvent("UNIT_AURA", Update) - self:RegisterEvent("PLAYER_TALENT_UPDATE", UpdateTalentSpec) - self:RegisterEvent("CHARACTER_POINTS_CHANGED", UpdateTalentSpec) - - UpdateTalentSpec(self) - - self:RegisterUnitEvent("UNIT_AURA", self.unit) - - if playerClass == "DRUID" then - self:RegisterEvent("SPELLS_CHANGED", CheckSymbiosis) + +local function Enable(object) + if not object.Afflicted then + return + end + if object.AfflictedFilter and not CanDispel[playerClass] then + return end + object:RegisterEvent("UNIT_AURA", Update) + object:RegisterEvent("PLAYER_TALENT_UPDATE", CheckSpec) + object:RegisterEvent("CHARACTER_POINTS_CHANGED", CheckSpec) + CheckSpec(object) + object:RegisterUnitEvent("UNIT_AURA", object.unit) + if playerClass == "DRUID" then + object:RegisterEvent("SPELLS_CHANGED", CheckSymbiosis) + end return true end - -local function Disable(self) - local afflicted = self.Afflicted - if(not afflicted) then return end - self:UnregisterEvent("UNIT_AURA", Update) - self:UnregisterEvent("PLAYER_TALENT_UPDATE", UpdateTalentSpec) - self:UnregisterEvent("CHARACTER_POINTS_CHANGED", UpdateTalentSpec) + +local function Disable(object) + object:UnregisterEvent("UNIT_AURA", Update) + object:UnregisterEvent("PLAYER_TALENT_UPDATE", CheckSpec) + object:UnregisterEvent("CHARACTER_POINTS_CHANGED", CheckSpec) if playerClass == "DRUID" then - self:UnregisterEvent("SPELLS_CHANGED", CheckSymbiosis) + object:UnregisterEvent("SPELLS_CHANGED", CheckSymbiosis) end - - afflicted:SetVertexColor(0,0,0,0) + object.Afflicted:SetVertexColor(0,0,0,0) end - -oUF:AddElement('Afflicted', Update, Enable, Disable) + +oUF:AddElement('Afflicted', Update, Enable, Disable) \ No newline at end of file diff --git a/SVUI_UnitFrames/libs/Plugins/oUF_Druidness/oUF_Druidness.lua b/SVUI_UnitFrames/libs/Plugins/oUF_Druidness/oUF_Druidness.lua index 1184739..cd9afe4 100644 --- a/SVUI_UnitFrames/libs/Plugins/oUF_Druidness/oUF_Druidness.lua +++ b/SVUI_UnitFrames/libs/Plugins/oUF_Druidness/oUF_Druidness.lua @@ -49,89 +49,64 @@ local TextColors = { [5]={0.1,1,0.1} }; -local UpdateAura = function(self, event, unit) - if((not unit) or (unit ~= self.unit)) then return end - local chicken = self.Druidness.Chicken - if(not chicken) then return end - - for i = 1, 40, 1 do - local name, _, _, _, _, _, _, _, _, _, spellID = UnitAura("player", i, "HELPFUL|PLAYER") - if not name then break end - if spellID == ECLIPSE_BAR_SOLAR_BUFF_ID then - chicken.inEclipse = true - break - elseif spellID == ECLIPSE_BAR_LUNAR_BUFF_ID then - chicken.inEclipse = true - break - end - end - - if(chicken.PostUpdateAura) then - return chicken:PostUpdateAura() - end -end - -local function CatOverMana(mana, form) +local function ManaBarState(mana) if mana.ManaBar:GetValue() < UnitPowerMax('player', SPELL_POWER_MANA) then mana:Show() - return false else mana:Hide() - return form == CAT_FORM end end -local UpdateVisibility = function(self, event) +local UPDATE_VISIBILITY = function(self, event) local bar = self.Druidness local chicken = bar.Chicken local cat = bar.Cat local mana = bar.Mana - local form = GetShapeshiftFormID() - if(form) then - if(form == MOONKIN_FORM) then - chicken:Show() - mana:Hide() - cat:Hide() - self:RegisterEvent('UNIT_AURA', UpdateAura) - else - chicken:Hide() - self:UnregisterEvent('UNIT_AURA', UpdateAura) + -- check form/mastery + local form = GetShapeshiftFormID() - if (form == BEAR_FORM or form == CAT_FORM) then - if(CatOverMana(mana, form)) then - cat:Show() - else - cat:Hide() - end - else - cat:Hide() - mana:Hide() - end - end - else + if(not form) then local ptt = GetSpecialization() if(ptt and ptt == 1) then -- player has balance spec chicken:Show() - self:RegisterEvent('UNIT_AURA', UpdateAura) else chicken:Hide() - self:UnregisterEvent('UNIT_AURA', UpdateAura) end mana:Hide() cat:Hide() + elseif(form == MOONKIN_FORM) then + chicken:Show() + mana:Hide() + cat:Hide() + elseif (form == BEAR_FORM or form == CAT_FORM) then + chicken:Hide() + if(form == CAT_FORM) then + cat:Show() + else + cat:Hide() + end + ManaBarState(mana) + else + chicken:Hide() + cat:Hide() + mana:Hide() + end + + if(bar.PostUpdateVisibility) then + return bar:PostUpdateVisibility(self.unit) end end -local UpdatePower = function(self, event, unit, powerType) +local UNIT_POWER = function(self, event, unit, powerType) if(self.unit ~= unit) then return end local bar = self.Druidness + local chicken = bar.Chicken + local mana = bar.Mana - if(powerType == 'ECLIPSE' and bar.Chicken) then - local chicken = bar.Chicken + if(chicken:IsShown() or powerType == 'ECLIPSE') then local power = UnitPower('player', SPELL_POWER_ECLIPSE) local maxPower = UnitPowerMax('player', SPELL_POWER_ECLIPSE) - if maxPower == 0 then maxPower = 100 end if(chicken.LunarBar) then chicken.LunarBar:SetMinMaxValues(-maxPower, maxPower) @@ -144,57 +119,94 @@ local UpdatePower = function(self, event, unit, powerType) end if(chicken.PostUpdatePower) then - chicken:PostUpdatePower() + return chicken:PostUpdatePower(unit) end end - if(bar.Mana and bar.Mana.ManaBar) then - local mana = bar.Mana - if(mana.PreUpdate) then - mana:PreUpdate(unit) - end - local min, max = UnitPower('player', SPELL_POWER_MANA), UnitPowerMax('player', SPELL_POWER_MANA) - - mana.ManaBar:SetMinMaxValues(0, max) - mana.ManaBar:SetValue(min) - - local r, g, b, t - if(mana.colorPower) then - t = self.colors.power["MANA"] - elseif(mana.colorClass and UnitIsPlayer(unit)) or - (mana.colorClassNPC and not UnitIsPlayer(unit)) or - (mana.colorClassPet and UnitPlayerControlled(unit) and not UnitIsPlayer(unit)) then - local _, class = UnitClass(unit) - t = self.colors.class[class] - elseif(mana.colorReaction and UnitReaction(unit, 'player')) then - t = self.colors.reaction[UnitReaction(unit, "player")] - elseif(mana.colorSmooth) then - r, g, b = self.ColorGradient(min / max, unpack(mana.smoothGradient or self.colors.smooth)) - end + if not (mana.ManaBar) then return end - if(t) then - r, g, b = t[1], t[2], t[3] + if(mana.PreUpdate) then + mana:PreUpdate(unit) + end + local min, max = UnitPower('player', SPELL_POWER_MANA), UnitPowerMax('player', SPELL_POWER_MANA) + + mana.ManaBar:SetMinMaxValues(0, max) + mana.ManaBar:SetValue(min) + + local r, g, b, t + if(mana.colorPower) then + t = self.colors.power["MANA"] + elseif(mana.colorClass and UnitIsPlayer(unit)) or + (mana.colorClassNPC and not UnitIsPlayer(unit)) or + (mana.colorClassPet and UnitPlayerControlled(unit) and not UnitIsPlayer(unit)) then + local _, class = UnitClass(unit) + t = self.colors.class[class] + elseif(mana.colorReaction and UnitReaction(unit, 'player')) then + t = self.colors.reaction[UnitReaction(unit, "player")] + elseif(mana.colorSmooth) then + r, g, b = self.ColorGradient(min / max, unpack(mana.smoothGradient or self.colors.smooth)) + end + + if(t) then + r, g, b = t[1], t[2], t[3] + end + + if(b) then + mana.ManaBar:SetStatusBarColor(r, g, b) + + local bg = mana.bg + if(bg) then + local mu = bg.multiplier or 1 + bg:SetVertexColor(r * mu, g * mu, b * mu) end + end + + UPDATE_VISIBILITY(self) + + if(mana.PostUpdatePower) then + return mana:PostUpdatePower(unit, min, max) + end +end - if(b) then - mana.ManaBar:SetStatusBarColor(r, g, b) +local UNIT_AURA = function(self, event, unit) + if((not unit) or (unit and self.unit ~= unit)) then return end + local bar = self.Druidness + local chicken = bar.Chicken + local mana = bar.Mana + + if(chicken and chicken:IsShown()) then + local i = 1 + local hasSolarEclipse, hasLunarEclipse + repeat + local _, _, _, _, _, _, _, _, _, _, spellID = UnitAura(unit, i, 'HELPFUL') - local bg = mana.bg - if(bg) then - local mu = bg.multiplier or 1 - bg:SetVertexColor(r * mu, g * mu, b * mu) + if(spellID == ECLIPSE_BAR_SOLAR_BUFF_ID) then + hasSolarEclipse = true + elseif(spellID == ECLIPSE_BAR_LUNAR_BUFF_ID) then + hasLunarEclipse = true end - end - if(mana.PostUpdatePower) then - mana:PostUpdatePower(unit, min, max) - end + i = i + 1 + until not spellID + chicken.hasSolarEclipse = hasSolarEclipse + chicken.hasLunarEclipse = hasLunarEclipse end - UpdateVisibility(self) + if(bar.PostUnitAura) then + return bar:PostUnitAura(unit) + end end -local UpdateComboPoints = function(self, event, unit) +local ECLIPSE_DIRECTION_CHANGE = function(self, event, status) + local bar = self.Druidness + local chicken = bar.Chicken + + if(status and chicken:IsVisible() and chicken.PostDirectionChange[status]) then + return chicken.PostDirectionChange[status](chicken) + end +end + +local UPDATE_POINTS = function(self, event, unit) if(unit == 'pet') then return end local bar = self.Druidness; local cpoints = bar.Cat; @@ -226,16 +238,16 @@ local UpdateComboPoints = function(self, event, unit) end end - if(bar.PostUpdateComboPoints) then - return bar:PostUpdateComboPoints(current) + if(bar.PostUpdate) then + return bar:PostUpdate(current) end end local Update = function(self, ...) - UpdatePower(self, ...) - UpdateAura(self, ...) - UpdateComboPoints(self, ...) - return UpdateVisibility(self, ...) + UNIT_POWER(self, ...) + UNIT_AURA(self, ...) + UPDATE_POINTS(self, ...) + return UPDATE_VISIBILITY(self, ...) end local ForceUpdate = function(element) @@ -271,13 +283,15 @@ local function Enable(self) chicken.SolarBar:SetValue(power * -1) end - self:RegisterEvent('UNIT_POWER_FREQUENT', UpdatePower) - self:RegisterEvent('PLAYER_TALENT_UPDATE', UpdateVisibility, true) - self:RegisterEvent('UPDATE_SHAPESHIFT_FORM', UpdateVisibility, true) - self:RegisterEvent('UNIT_COMBO_POINTS', UpdateComboPoints, true) - self:RegisterEvent('PLAYER_TARGET_CHANGED', UpdateComboPoints, true) - - UpdateVisibility(self) + self:RegisterEvent('ECLIPSE_DIRECTION_CHANGE', ECLIPSE_DIRECTION_CHANGE, true) + self:RegisterEvent('PLAYER_TALENT_UPDATE', UPDATE_VISIBILITY, true) + self:RegisterEvent('UNIT_AURA', UNIT_AURA) + self:RegisterEvent('UNIT_POWER_FREQUENT', UNIT_POWER) + --self:RegisterEvent('UNIT_MAXPOWER', UNIT_POWER) + self:RegisterEvent('UPDATE_SHAPESHIFT_FORM', UPDATE_VISIBILITY, true) + self:RegisterEvent('UNIT_COMBO_POINTS', UPDATE_POINTS, true) + self:RegisterEvent('PLAYER_TARGET_CHANGED', UPDATE_POINTS, true) + UPDATE_VISIBILITY(self) return true end end @@ -290,12 +304,14 @@ local function Disable(self) local mana = bar.Mana chicken:Hide() mana:Hide() - - self:RegisterEvent('UNIT_POWER_FREQUENT', UpdatePower) - self:UnregisterEvent('PLAYER_TALENT_UPDATE', UpdateVisibility) - self:UnregisterEvent('UPDATE_SHAPESHIFT_FORM', UpdateVisibility) - self:UnregisterEvent('UNIT_COMBO_POINTS', UpdateComboPoints) - self:UnregisterEvent('PLAYER_TARGET_CHANGED', UpdateComboPoints) + self:UnregisterEvent('ECLIPSE_DIRECTION_CHANGE', ECLIPSE_DIRECTION_CHANGE) + self:UnregisterEvent('PLAYER_TALENT_UPDATE', UPDATE_VISIBILITY) + self:UnregisterEvent('UNIT_AURA', UNIT_AURA) + self:UnregisterEvent('UNIT_POWER_FREQUENT', UNIT_POWER) + --self:UnregisterEvent('UNIT_MAXPOWER', UNIT_POWER) + self:UnregisterEvent('UPDATE_SHAPESHIFT_FORM', UPDATE_VISIBILITY) + self:UnregisterEvent('UNIT_COMBO_POINTS', UPDATE_POINTS) + self:UnregisterEvent('PLAYER_TARGET_CHANGED', UPDATE_POINTS) end end diff --git a/SVUI_UnitFrames/libs/oUF/elements/aura.lua b/SVUI_UnitFrames/libs/oUF/elements/aura.lua index 3cbb94b..684486a 100644 --- a/SVUI_UnitFrames/libs/oUF/elements/aura.lua +++ b/SVUI_UnitFrames/libs/oUF/elements/aura.lua @@ -45,7 +45,7 @@ local DEMO_SPELLS = {47540, 47540, 47540, 47540, 47540} local function FormatTime(seconds) if seconds < MINUTE then - return ("%.1fs"):format(seconds) + return ("%.1f"):format(seconds) elseif seconds < HOUR then return ("%dm %ds"):format(seconds/60%60, seconds%60) elseif seconds < DAY then