diff --git a/SVUI_!Core/setup/presets.lua b/SVUI_!Core/setup/presets.lua index f896f5f..429ccc3 100644 --- a/SVUI_!Core/setup/presets.lua +++ b/SVUI_!Core/setup/presets.lua @@ -551,77 +551,77 @@ local function LoadPresetData() }, ["simple"] = { ["player"] = { - portrait = { - enable = true, - overlay = false, - style = "2D", - } + ["portrait"] = { + ["enable"] = true, + ["overlay"] = false, + ["style"] = "2D", + }, }, ["target"] = { - portrait = { - enable = true, - overlay = false, - style = "2D", - } + ["portrait"] = { + ["enable"] = true, + ["overlay"] = false, + ["style"] = "2D", + }, }, ["pet"] = { - portrait = { - enable = true, - overlay = false, - style = "2D", + ["portrait"] = { + ["enable"] = true, + ["overlay"] = false, + ["style"] = "2D", }, }, ["targettarget"] = { - portrait = { - enable = false, - overlay = false, - style = "2D", + ["portrait"] = { + ["enable"] = false, + ["overlay"] = false, + ["style"] = "2D", }, }, ["boss"] = { - portrait = { - enable = true, - overlay = false, - style = "2D", - } + ["portrait"] = { + ["enable"] = true, + ["overlay"] = false, + ["style"] = "2D", + }, }, ["party"] = { - portrait = { - enable = true, - overlay = false, - style = "2D", + ["portrait"] = { + ["enable"] = true, + ["overlay"] = false, + ["style"] = "2D", }, }, }, ["compact"] = { ["player"] = { - portrait = { - enable = false + ["portrait"] = { + ["enable"] = false } }, ["target"] = { - portrait = { - enable = false + ["portrait"] = { + ["enable"] = false } }, ["pet"] = { - portrait = { - enable = false + ["portrait"] = { + ["enable"] = false }, }, ["targettarget"] = { - portrait = { - enable = false + ["portrait"] = { + ["enable"] = false }, }, ["boss"] = { - portrait = { - enable = false + ["portrait"] = { + ["enable"] = false } }, ["party"] = { - portrait = { - enable = false + ["portrait"] = { + ["enable"] = false }, }, }, @@ -630,17 +630,17 @@ local function LoadPresetData() ["link"] = "UnitFrames", ["default"] = { ["party"] = { - width = 75, - height = 60, - wrapXOffset = 9, - wrapYOffset = 13, - portrait = { - enable = true, - overlay = true, - style = "3DOVERLAY", + ["width"] = 75, + ["height"] = 60, + ["wrapXOffset"] = 9, + ["wrapYOffset"] = 13, + ["portrait"] = { + ["enable"] = true, + ["overlay"] = true, + ["style"] = "3DOVERLAY", }, - icons = { - roleIcon = { + ["icons"] = { + ["roleIcon"] = { ["attachTo"] = "INNERBOTTOMRIGHT", ["xOffset"] = 0, ["yOffset"] = 0, @@ -658,12 +658,12 @@ local function LoadPresetData() }, }, ["raid"] = { - width = 50, - height = 30, - gRowCol = 1, - wrapXOffset = 9, - wrapYOffset = 13, - showBy = "RIGHT_DOWN", + ["width"] = 50, + ["height"] = 30, + ["gRowCol"] = 1, + ["wrapXOffset"] = 9, + ["wrapYOffset"] = 13, + ["showBy"] = "RIGHT_DOWN", ["power"] = { ["enable"] = false, }, @@ -687,14 +687,14 @@ local function LoadPresetData() }, ["healer"] = { ["party"] = { - width = 75, - height = 60, - wrapXOffset = 9, - wrapYOffset = 13, - portrait = { - enable = true, - overlay = true, - style = "3DOVERLAY", + ["width"] = 75, + ["height"] = 60, + ["wrapXOffset"] = 9, + ["wrapYOffset"] = 13, + ["portrait"] = { + ["enable"] = true, + ["overlay"] = true, + ["style"] = "3DOVERLAY", }, ["power"] = { ["enable"] = true, @@ -718,8 +718,8 @@ local function LoadPresetData() }, }, ["raid"] = { - width = 50, - height = 30, + ["width"] = 50, + ["height"] = 30, ["showBy"] = "DOWN_RIGHT", ["gRowCol"] = 1, ["wrapXOffset"] = 4, @@ -747,18 +747,18 @@ local function LoadPresetData() }, ["dps"] = { ["party"] = { - width = 115, - height = 25, - wrapXOffset = 9, - wrapYOffset = 13, + ["width"] = 115, + ["height"] = 50, + ["wrapXOffset"] = 9, + ["wrapYOffset"] = 13, ["power"] = { ["enable"] = false, }, - portrait = { - enable = false, - overlay = false, - style = "2D", - width = 35, + ["portrait"] = { + ["enable"] = false, + ["overlay"] = false, + ["style"] = "2D", + ["width"] = 35, }, ["icons"] = { ["roleIcon"] = { @@ -813,8 +813,8 @@ local function LoadPresetData() ["power"] = { ["enable"] = false, }, - portrait = { - enable = false, + ["portrait"] = { + ["enable"] = false, }, ["grid"] = { ["enable"] = true, diff --git a/SVUI_!Core/system/layout.lua b/SVUI_!Core/system/layout.lua index c058925..ed1377e 100644 --- a/SVUI_!Core/system/layout.lua +++ b/SVUI_!Core/system/layout.lua @@ -433,21 +433,35 @@ local LayoutUpdateHandler = CreateFrame("Frame", nil) local function SetPrecisionSizes() if(not CurrentFrameTarget) then return end if(not CurrentFrameTarget.postsize) then + SVUI_LayoutPrecision:SetHeight(70) + SVUI_LayoutPrecisionWidthAdjust:Hide() + SVUI_LayoutPrecisionHeightAdjust:Hide() + else + local x,y = SVUI_LayoutPrecision:GetCenter() + SVUI_LayoutPrecision:ClearAllPoints() + SVUI_LayoutPrecision:SetPoint("BOTTOMLEFT", SVUIParent, "BOTTOMLEFT", x,y) + SVUI_LayoutPrecision:SetHeight(144) local minRange = CurrentFrameTarget.minRange or 0; local maxRange = CurrentFrameTarget.maxRange or 500; local min2Range = CurrentFrameTarget.min2Range or minRange; local max2Range = CurrentFrameTarget.max2Range or maxRange; + + local curWidth = floor(CurrentFrameTarget:GetWidth()) + local curHeight = floor(CurrentFrameTarget:GetHeight()) + SVUI_LayoutPrecisionWidthAdjust.rangeLow:SetText(minRange); SVUI_LayoutPrecisionWidthAdjust.rangeHigh:SetText(maxRange); + SVUI_LayoutPrecisionWidthAdjust:SetMinMaxValues(minRange, maxRange); + SVUI_LayoutPrecisionWidthAdjust:SetValue(curWidth); + SVUI_LayoutPrecisionWidthAdjust.rangeValue:SetText(curWidth); + SVUI_LayoutPrecisionWidthAdjust:Show() SVUI_LayoutPrecisionHeightAdjust.rangeLow:SetText(min2Range); SVUI_LayoutPrecisionHeightAdjust.rangeHigh:SetText(max2Range); - SVUI_LayoutPrecisionWidthAdjust:Show() + SVUI_LayoutPrecisionHeightAdjust:SetMinMaxValues(minRange, maxRange); + SVUI_LayoutPrecisionHeightAdjust:SetValue(curHeight); + SVUI_LayoutPrecisionHeightAdjust.rangeValue:SetText(curHeight); SVUI_LayoutPrecisionHeightAdjust:Show() - else - SVUI_LayoutPrecision:SetHeight(70) - SVUI_LayoutPrecisionWidthAdjust:Hide() - SVUI_LayoutPrecisionHeightAdjust:Hide() end end @@ -1325,6 +1339,8 @@ local function InitializeMovables() SVUI_LayoutPrecisionRightButton:SetStyle("Button") SVUI_LayoutPrecisionResetButton:SetScript("OnClick", SVUI_LayoutPrecisionResetButton_OnClick) + SVUI_LayoutPrecisionWidthAdjust:SetValueStep(1); + SVUI_LayoutPrecisionHeightAdjust:SetValueStep(1); SVUI_LayoutPrecisionWidthAdjust:SetScript("OnValueChanged", XML_LayoutPrecisionWidthAdjust_OnValueChanged) SVUI_LayoutPrecisionHeightAdjust:SetScript("OnValueChanged", XML_LayoutPrecisionHeightAdjust_OnValueChanged) diff --git a/SVUI_!Core/system/media.lua b/SVUI_!Core/system/media.lua index f96d6b1..87ec816 100644 --- a/SVUI_!Core/system/media.lua +++ b/SVUI_!Core/system/media.lua @@ -562,7 +562,7 @@ if(GetLocale() ~= "enUS") then SV.DialogFontDefault = "SVUI Default Font"; end SV.SplashImage = [[Interface\AddOns\SVUI_!Core\assets\textures\SPLASH]]; -SV.BaseTexture = [[Interface\AddOns\SVUI_!Core\assets\backgrounds\TRANSPARENT]]; +SV.BaseTexture = [[Interface\AddOns\SVUI_!Core\assets\backgrounds\DEFAULT]]; SV.NoTexture = [[Interface\AddOns\SVUI_!Core\assets\textures\EMPTY]]; --[[ ########################################################## diff --git a/SVUI_!Core/xml/templates.xml b/SVUI_!Core/xml/templates.xml index a6ed087..fb643f9 100644 --- a/SVUI_!Core/xml/templates.xml +++ b/SVUI_!Core/xml/templates.xml @@ -1,7 +1,7 @@ <Ui xmlns="http://www.blizzard.com/wow/ui/"> <Slider name="SVUI_HSliderTemplate" orientation="HORIZONTAL" virtual="true" enableMouse="true"> <Size> - <AbsDimension x="144" y="17"/> + <AbsDimension x="144" y="12"/> </Size> <HitRectInsets> <AbsInset left="0" right="0" top="-10" bottom="-10"/> @@ -15,25 +15,25 @@ </Backdrop> <Layers> <Layer level="ARTWORK"> - <FontString name="$parentText" inherits="GameFontHighlight"> + <FontString name="$parentText" inherits="GameFontNormal"> <Anchors> <Anchor point="BOTTOM" relativePoint="TOP"/> </Anchors> </FontString> - <FontString name="$parentLow" inherits="GameFontHighlightSmall" text="LOW"> + <FontString name="$parentLow" inherits="GameFontNormal" text="LOW"> <Anchors> - <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT"> + <Anchor point="RIGHT" relativePoint="LEFT"> <Offset> - <AbsDimension x="-4" y="3"/> + <AbsDimension x="-8" y="0"/> </Offset> </Anchor> </Anchors> </FontString> - <FontString name="$parentHigh" inherits="GameFontHighlightSmall" text="HIGH"> + <FontString name="$parentHigh" inherits="GameFontNormal" text="HIGH"> <Anchors> - <Anchor point="TOPRIGHT" relativePoint="BOTTOMRIGHT"> + <Anchor point="LEFT" relativePoint="RIGHT"> <Offset> - <AbsDimension x="4" y="3"/> + <AbsDimension x="8" y="0"/> </Offset> </Anchor> </Anchors> @@ -55,14 +55,14 @@ </Scripts> <ThumbTexture name="$parentThumb" file="Interface\AddOns\SVUI_!Core\assets\buttons\SCROLLBAR-KNOB"> <Size> - <AbsDimension x="32" y="32"/> + <AbsDimension x="20" y="20"/> </Size> </ThumbTexture> </Slider> <Slider name="SVUI_VSliderTemplate" orientation="VERTICAL" virtual="true" enableMouse="true"> <Size> - <AbsDimension x="17" y="144"/> + <AbsDimension x="12" y="144"/> </Size> <HitRectInsets> <AbsInset left="-10" right="-10" top="0" bottom="0"/> @@ -116,7 +116,7 @@ </Scripts> <ThumbTexture name="$parentThumb" file="Interface\AddOns\SVUI_!Core\assets\buttons\SCROLLBAR-KNOB"> <Size> - <AbsDimension x="32" y="32"/> + <AbsDimension x="20" y="20"/> </Size> </ThumbTexture> </Slider> diff --git a/SVUI_!Core/xml/widgets.xml b/SVUI_!Core/xml/widgets.xml index d1f4458..32928ca 100644 --- a/SVUI_!Core/xml/widgets.xml +++ b/SVUI_!Core/xml/widgets.xml @@ -130,7 +130,7 @@ <Offset x="-30" y="0"/> </Anchor> </Anchors> - <Size y="40"/> + <Size y="20"/> </Texture> </Layer> <Layer level="ARTWORK"> @@ -142,16 +142,16 @@ </FontString> <FontString inherits="NumberFont_Outline_Huge" text="X"> <Anchors> - <Anchor point="LEFT" relativeTo="$parentBG" relativePoint="LEFT"> - <Offset x="0" y="0"/> + <Anchor point="TOPRIGHT" relativeTo="$parentTitleBG" relativePoint="BOTTOMLEFT"> + <Offset x="-8" y="-10"/> </Anchor> </Anchors> <Color r="1" g="0.5" b="0" a="1"/> </FontString> <FontString inherits="NumberFont_Outline_Huge" text="Y"> <Anchors> - <Anchor point="RIGHT" relativeTo="$parentBG" relativePoint="RIGHT"> - <Offset x="0" y="0"/> + <Anchor point="TOPLEFT" relativeTo="$parentTitleBG" relativePoint="BOTTOMRIGHT"> + <Offset x="8" y="-10"/> </Anchor> </Anchors> <Color r="1" g="0.5" b="0" a="1"/> @@ -169,8 +169,8 @@ <EditBox name="$parentSetX" inherits="InputBoxTemplate" autoFocus="false"> <Size x="50" y="17"/> <Anchors> - <Anchor point="TOPRIGHT" relativeTo="$parentBG" relativePoint="CENTER"> - <Offset x="-27" y="6"/> + <Anchor point="TOPRIGHT" relativeTo="$parentTitleBG" relativePoint="BOTTOM"> + <Offset x="-27" y="0"/> </Anchor> </Anchors> @@ -192,8 +192,8 @@ <EditBox name="$parentSetY" inherits="InputBoxTemplate" autoFocus="false"> <Size x="50" y="17"/> <Anchors> - <Anchor point="TOPLEFT" relativeTo="$parentBG" relativePoint="CENTER"> - <Offset x="27" y="6"/> + <Anchor point="TOPLEFT" relativeTo="$parentTitleBG" relativePoint="BOTTOM"> + <Offset x="27" y="0"/> </Anchor> </Anchors> <Scripts> @@ -214,7 +214,7 @@ <Button name="$parentResetButton" inherits="OptionsButtonTemplate" text="Reset"> <Size x="48" y="20"/> <Anchors> - <Anchor point="TOP" relativeTo="$parentBG" relativePoint="CENTER" x="0" y="-14" /> + <Anchor point="TOP" relativeTo="$parentTitleBG" relativePoint="BOTTOM" x="0" y="-22" /> </Anchors> <Scripts> <OnLoad> @@ -308,7 +308,7 @@ </Button> <Slider name="$parentWidthAdjust" inherits="SVUI_HSliderTemplate"> - <Size x="132" y="17"/> + <Size x="132" y="12"/> <Anchors> <Anchor point="TOP" relativeTo="$parentResetButton" relativePoint="BOTTOM"> <Offset> @@ -327,7 +327,7 @@ </Slider> <Slider name="$parentHeightAdjust" inherits="SVUI_HSliderTemplate"> - <Size x="132" y="17"/> + <Size x="132" y="12"/> <Anchors> <Anchor point="TOP" relativeTo="$parentWidthAdjust" relativePoint="BOTTOM"> <Offset> diff --git a/SVUI_!Options/UnitFrames.lua b/SVUI_!Options/UnitFrames.lua index 839c0ac..38d4e6e 100644 --- a/SVUI_!Options/UnitFrames.lua +++ b/SVUI_!Options/UnitFrames.lua @@ -4136,8 +4136,9 @@ SV.Options.args[Schema] = { type = "execute", name = L["Show Indicators"], func = function() - local toggle = (_G["SVUI_Party"].forceShowAuras ~= true) or nil + local toggle = (not _G["SVUI_Party"].forceShowAuras) or nil MOD:ViewGroupFrames(_G["SVUI_Party"], true, toggle) + MOD:SetGroupFrame('party') end, }, configureButton = { @@ -4523,12 +4524,9 @@ SV.Options.args[Schema] = { type = "execute", name = L["Show Indicators"], func = function() - if(not _G["SVUI_Raid"].forceShowAuras) then - _G["SVUI_Raid"].forceShowAuras = true - else - _G["SVUI_Raid"].forceShowAuras = nil - end - MOD:ViewGroupFrames(_G["SVUI_Raid"], true) + local toggle = (not _G["SVUI_Raid"].forceShowAuras) or nil + MOD:ViewGroupFrames(_G["SVUI_Raid"], true, toggle) + MOD:SetGroupFrame("raid") end, }, configureButton = { @@ -4801,12 +4799,9 @@ SV.Options.args[Schema] = { type = "execute", name = L["Show Indicators"], func = function() - if(not _G["SVUI_RaidPet"].forceShowAuras) then - _G["SVUI_RaidPet"].forceShowAuras = true - else - _G["SVUI_RaidPet"].forceShowAuras = nil - end - MOD:ViewGroupFrames(_G["SVUI_RaidPet"], true) + local toggle = (not _G["SVUI_RaidPet"].forceShowAuras) or nil + MOD:ViewGroupFrames(_G["SVUI_RaidPet"], true, toggle) + MOD:SetGroupFrame('raidpet') end, }, configureButton = { diff --git a/SVUI_UnitFrames/Loader.lua b/SVUI_UnitFrames/Loader.lua index a6b3681..56cf7d0 100644 --- a/SVUI_UnitFrames/Loader.lua +++ b/SVUI_UnitFrames/Loader.lua @@ -1637,7 +1637,7 @@ SV.defaults[Schema] = { ["showPlayer"] = true, ["predict"] = false, ["width"] = 115, - ["height"] = 30, + ["height"] = 50, ["reverseLayout"] = false, ["grid"] = { ["enable"] = false, @@ -1750,9 +1750,9 @@ SV.defaults[Schema] = { ["rdebuffs"] = { ["enable"] = true, - ["size"] = 22, + ["size"] = 35, ["xOffset"] = 0, - ["yOffset"] = 2, + ["yOffset"] = 0, }, ["auraWatch"] = { @@ -1953,9 +1953,9 @@ SV.defaults[Schema] = { ["rdebuffs"] = { ["enable"] = true, - ["size"] = 22, + ["size"] = 25, ["xOffset"] = 0, - ["yOffset"] = 2, + ["yOffset"] = 0, }, ["auraWatch"] = { diff --git a/SVUI_UnitFrames/SVUI_UnitFrames.lua b/SVUI_UnitFrames/SVUI_UnitFrames.lua index bcf97b8..d4c4593 100644 --- a/SVUI_UnitFrames/SVUI_UnitFrames.lua +++ b/SVUI_UnitFrames/SVUI_UnitFrames.lua @@ -889,7 +889,6 @@ function MOD:RefreshUnitLayout(frame, template) BUFF_GRIP.UseBars = db.buffs.useBars or false; --if(template == 'player') then print(db.buffs.useBars) end if(BUFF_GRIP.UseBars and (BUFF_GRIP.UseBars == true)) then - auraSize = db.buffs.barSize; count = db.buffs.barCount; if(db.buffs.anchorPoint == "BELOW") then BUFF_GRIP.down = true @@ -908,13 +907,13 @@ function MOD:RefreshUnitLayout(frame, template) end end - if(not auraSize) then - if(db.buffs.sizeOverride and db.buffs.sizeOverride > 0) then - auraSize = db.buffs.sizeOverride - else - local tempSize = (((UNIT_WIDTH + spacing) - (spacing * (columns - 1))) / columns); - auraSize = min(BEST_SIZE, tempSize) - end + if(db.buffs.sizeOverride and db.buffs.sizeOverride > 0) then + auraSize = db.buffs.sizeOverride + BUFF_GRIP.barHeight = db.buffs.sizeOverride + else + local tempSize = (((UNIT_WIDTH + spacing) - (spacing * (columns - 1))) / columns); + auraSize = min(BEST_SIZE, tempSize) + BUFF_GRIP.barHeight = 16 end if(db.buffs.barWidthOverride and db.buffs.barWidthOverride > 0) then @@ -958,7 +957,6 @@ function MOD:RefreshUnitLayout(frame, template) if(DEBUFF_GRIP.Bars and DEBUFF_GRIP.Icons) then DEBUFF_GRIP.UseBars = db.debuffs.useBars or false; if(DEBUFF_GRIP.UseBars and (DEBUFF_GRIP.UseBars == true)) then - auraSize = db.debuffs.barSize; count = db.debuffs.barCount; if(db.debuffs.anchorPoint == "BELOW") then DEBUFF_GRIP.down = true @@ -975,13 +973,13 @@ function MOD:RefreshUnitLayout(frame, template) end end - if(not auraSize) then - if(db.debuffs.sizeOverride and db.debuffs.sizeOverride > 0) then - auraSize = db.debuffs.sizeOverride - else - local tempSize = (((UNIT_WIDTH + spacing) - (spacing * (columns - 1))) / columns); - auraSize = min(BEST_SIZE, tempSize) - end + if(db.debuffs.sizeOverride and db.debuffs.sizeOverride > 0) then + auraSize = db.debuffs.sizeOverride + DEBUFF_GRIP.barHeight = db.debuffs.sizeOverride + else + local tempSize = (((UNIT_WIDTH + spacing) - (spacing * (columns - 1))) / columns); + auraSize = min(BEST_SIZE, tempSize) + DEBUFF_GRIP.barHeight = 16 end if(db.debuffs.barWidthOverride and db.debuffs.barWidthOverride > 0) then @@ -1154,6 +1152,7 @@ function MOD:RefreshUnitLayout(frame, template) if frame.Afflicted then if SV.db.UnitFrames.debuffHighlighting then + frame.Afflicted.forceShow = frame.forceShowHighlights; frame.Afflicted:ClearAllPoints() frame.Afflicted:SetAllPoints(MASTER_GRIP) if(template ~= "player" and template ~= "target" and template ~= "focus") then @@ -1161,6 +1160,7 @@ function MOD:RefreshUnitLayout(frame, template) end frame:EnableElement('Afflicted') else + frame.Afflicted.forceShow = nil; frame:DisableElement('Afflicted') end end diff --git a/SVUI_UnitFrames/elements/misc.lua b/SVUI_UnitFrames/elements/misc.lua index 0cd7f41..4a387cc 100644 --- a/SVUI_UnitFrames/elements/misc.lua +++ b/SVUI_UnitFrames/elements/misc.lua @@ -82,7 +82,7 @@ RAID DEBUFFS / DEBUFF HIGHLIGHT ]]-- function MOD:CreateRaidDebuffs(frame) local raidDebuff = CreateFrame("Frame", nil, frame.TextGrip) - raidDebuff:SetFrameLevel(30) + raidDebuff:SetFrameLevel(50) raidDebuff:SetStyle("!_Frame", "Icon") raidDebuff.icon = raidDebuff:CreateTexture(nil, "OVERLAY") raidDebuff.icon:SetTexCoord(unpack(_G.SVUI_ICON_COORDS)) @@ -100,7 +100,7 @@ end function MOD:CreateAfflicted(frame) local afflicted = CreateFrame("Frame", nil, frame.TextGrip) - afflicted:SetFrameLevel(50) + afflicted:SetFrameLevel(30) afflicted:SetPoint("TOPLEFT", frame.Health, "TOPLEFT", 0, 0) afflicted:SetPoint("BOTTOMRIGHT", frame.Health, "BOTTOMRIGHT", 0, 0) afflicted.Texture = afflicted:CreateTexture(nil, "OVERLAY", nil, 7) diff --git a/SVUI_UnitFrames/frames.lua b/SVUI_UnitFrames/frames.lua index 91ef460..66c7ac0 100644 --- a/SVUI_UnitFrames/frames.lua +++ b/SVUI_UnitFrames/frames.lua @@ -127,7 +127,7 @@ local AllowElement = function(self) end self:SetScript("OnUpdate", nil) - --self.forceShowAuras = true; + self.forceShowAuras = true; UnregisterUnitWatch(self) RegisterUnitWatch(self, true) @@ -180,7 +180,7 @@ local UpdatePlayerFrame = function(self) self:SetSize(UNIT_WIDTH, UNIT_HEIGHT) local lossSize = UNIT_WIDTH * 0.6 self.LossOfControl.stunned:SetSize(lossSize, lossSize) - _G[self:GetName().."_MOVE"]:SetSize(self:GetSize()) + self.Grip:SetSize(self:GetSize()) MOD:RefreshUnitLayout(self, "player") @@ -310,7 +310,7 @@ local UpdateTargetFrame = function(self) MOD.RefreshUnitMedia(self, "target") self.colors = oUF_SVUI.colors; self:SetSize(UNIT_WIDTH, UNIT_HEIGHT) - _G[self:GetName().."_MOVE"]:SetSize(self:GetSize()) + self.Grip:SetSize(self:GetSize()) if not self:IsElementEnabled("ActionPanel")then self:EnableElement("ActionPanel") end @@ -404,7 +404,7 @@ local UpdateTargetTargetFrame = function(self) MOD.RefreshUnitMedia(self, "targettarget") self.colors = oUF_SVUI.colors; self:SetSize(UNIT_WIDTH, UNIT_HEIGHT) - _G[self:GetName().."_MOVE"]:SetSize(self:GetSize()) + self.Grip:SetSize(self:GetSize()) MOD:RefreshUnitLayout(self, "targettarget") self:UpdateAllElements() end @@ -446,7 +446,7 @@ local UpdatePetFrame = function(self) MOD.RefreshUnitMedia(self, "pet") self.colors = oUF_SVUI.colors; self:SetSize(UNIT_WIDTH, UNIT_HEIGHT) - _G[self:GetName().."_MOVE"]:SetSize(self:GetSize()) + self.Grip:SetSize(self:GetSize()) MOD:RefreshUnitLayout(self, "pet") do if SVUI_Player and not InCombatLockdown()then @@ -495,7 +495,7 @@ local UpdatePetTargetFrame = function(self) MOD.RefreshUnitMedia(self, "pettarget") self.colors = oUF_SVUI.colors; self:SetSize(UNIT_WIDTH, UNIT_HEIGHT) - _G[self:GetName().."_MOVE"]:SetSize(self:GetSize()) + self.Grip:SetSize(self:GetSize()) MOD:RefreshUnitLayout(self, "pettarget") do if SVUI_Pet and not InCombatLockdown()then @@ -541,7 +541,7 @@ local UpdateFocusFrame = function(self) MOD.RefreshUnitMedia(self, "focus") self.colors = oUF_SVUI.colors; self:SetSize(UNIT_WIDTH, UNIT_HEIGHT) - _G[self:GetName().."_MOVE"]:SetSize(self:GetSize()) + self.Grip:SetSize(self:GetSize()) MOD:RefreshUnitLayout(self, "focus") self:UpdateAllElements() @@ -618,7 +618,7 @@ local UpdateFocusTargetFrame = function(self) MOD.RefreshUnitMedia(self, "focustarget") self.colors = oUF_SVUI.colors; self:SetSize(UNIT_WIDTH, UNIT_HEIGHT) - _G[self:GetName().."_MOVE"]:SetSize(self:GetSize()) + self.Grip:SetSize(self:GetSize()) MOD:RefreshUnitLayout(self, "focustarget") self:UpdateAllElements() end @@ -655,7 +655,7 @@ BOSS local UpdateBossFrame = function(self) local db = SV.db.UnitFrames["boss"] local INDEX = self:GetID() or 1; - local holder = _G["SVUI_Boss_MOVE"] + local holder = self.Grip local UNIT_WIDTH = db.width; local UNIT_HEIGHT = db.height; @@ -715,7 +715,7 @@ CONSTRUCTORS["boss"] = function(self, unit) self.Range = { insideAlpha = 1, outsideAlpha = 1 } self:SetAttribute("type2", "focus") - if(not _G["SVUI_Boss_MOVE"]) then + if(not self.Grip) then self:SetPoint("RIGHT", SV.Screen, "RIGHT", -105, 0) --SV:NewAnchor(self, L["Boss Frames"], nil, nil, "SVUI_Boss") SV:NewAnchor(self, L["Boss Frames"]) @@ -737,7 +737,7 @@ ARENA local UpdateArenaFrame = function(self) local db = SV.db.UnitFrames["arena"] local INDEX = self:GetID() or 1; - local holder = _G["SVUI_Arena_MOVE"] + local holder = self.Grip local UNIT_WIDTH = db.width; local UNIT_HEIGHT = db.height @@ -888,7 +888,7 @@ CONSTRUCTORS["arena"] = function(self, unit) prep:Hide() end - if(not _G["SVUI_Arena_MOVE"]) then + if(not self.Grip) then self:SetPoint("RIGHT", SV.Screen, "RIGHT", -105, 0) --SV:NewAnchor(self, L["Arena Frames"], nil, nil, "SVUI_Arena") SV:NewAnchor(self, L["Arena Frames"]) diff --git a/SVUI_UnitFrames/libs/Plugins/oUF_Afflicted/oUF_Afflicted.lua b/SVUI_UnitFrames/libs/Plugins/oUF_Afflicted/oUF_Afflicted.lua index 3997dcc..fe9ca5b 100644 --- a/SVUI_UnitFrames/libs/Plugins/oUF_Afflicted/oUF_Afflicted.lua +++ b/SVUI_UnitFrames/libs/Plugins/oUF_Afflicted/oUF_Afflicted.lua @@ -5,6 +5,11 @@ local unpack = _G.unpack; local select = _G.select; local assert = _G.assert; local type = _G.type; +--MATH +local math = _G.math; +local floor = math.floor +local ceil = math.ceil +local random = math.random --BLIZZARD API local UnitAura = _G.UnitAura; local UnitCanAssist = _G.UnitCanAssist; @@ -34,6 +39,8 @@ AfflictedColor["Disease"] = { r = 1, g = 0.4, b = 0 }; AfflictedColor["Poison"] = { r = 0.4, g = 1, b = 0 }; AfflictedColor[""] = AfflictedColor["none"]; +local DEMO_COLORS = {"none", "Magic", "Curse", "Disease", "Poison"}; + local SymbiosisName = GetSpellInfo(110309) local CleanseName = GetSpellInfo(4987) local dispellist = CanDispel[playerClass] or {} @@ -110,14 +117,19 @@ local function CheckSymbiosis() end local function Update(self, event, unit) - if unit ~= self.unit then return; end + if(unit ~= self.unit and (not self.Afflicted.forceShow)) then return; end local afflicted = self.Afflicted - local debuffType, texture = GetDebuffType(unit, afflicted.ClassFilter) - if debuffType then - local color = AfflictedColor[debuffType] + if afflicted.forceShow then + local color = AfflictedColor[DEMO_COLORS[random(1,#DEMO_COLORS)]] afflicted.Texture:SetVertexColor(color.r, color.g, color.b, afflicted.MaxAlpha) else - afflicted.Texture:SetVertexColor(0,0,0,0) + local debuffType, texture = GetDebuffType(unit, afflicted.ClassFilter) + if debuffType then + local color = AfflictedColor[debuffType] + afflicted.Texture:SetVertexColor(color.r, color.g, color.b, afflicted.MaxAlpha) + else + afflicted.Texture:SetVertexColor(0,0,0,0) + end end end diff --git a/SVUI_UnitFrames/libs/Plugins/oUF_RaidDebuffs/oUF_RaidDebuffs.lua b/SVUI_UnitFrames/libs/Plugins/oUF_RaidDebuffs/oUF_RaidDebuffs.lua index d42fe72..3c5b4d2 100644 --- a/SVUI_UnitFrames/libs/Plugins/oUF_RaidDebuffs/oUF_RaidDebuffs.lua +++ b/SVUI_UnitFrames/libs/Plugins/oUF_RaidDebuffs/oUF_RaidDebuffs.lua @@ -17,6 +17,7 @@ local format = string.format; local math = _G.math; local floor = math.floor local ceil = math.ceil +local random = math.random --TABLE local table = _G.table; local wipe = _G.wipe; @@ -128,6 +129,8 @@ do DispellFilter = dispellClasses[select(2, UnitClass('player'))] or {} end +local DEMO_SPELLS = {116281,116784,116417,116942,116161,117708,118303,118048,118135,117878,117949} + local function CheckTalentTree(tree) local activeGroup = GetActiveSpecGroup() if activeGroup and GetSpecialization(false, false, activeGroup) then @@ -264,8 +267,6 @@ local blackList = { [137637] = true, -- Warbringer, Slow } -local DEMO_SPELLS = {135000,143436,143579,147383,146124,144851,144358,144774,147207} - local function Update(self, event, unit) if unit ~= self.unit then return end local _name, _icon, _count, _dtype, _duration, _endTime, _spellId @@ -305,7 +306,7 @@ local function Update(self, event, unit) end end - if(self.forceShow) then + if(self.RaidDebuffs.forceShow) then _spellId = DEMO_SPELLS[random(1, #DEMO_SPELLS)]; _name, rank, _icon = GetSpellInfo(_spellId) _count, _dtype, _duration, _endTime = 5, 'Magic', 0, 60 diff --git a/SVUI_UnitFrames/libs/oUF/elements/aura.lua b/SVUI_UnitFrames/libs/oUF/elements/aura.lua index 37b2c8b..bf6aa4a 100644 --- a/SVUI_UnitFrames/libs/oUF/elements/aura.lua +++ b/SVUI_UnitFrames/libs/oUF/elements/aura.lua @@ -492,7 +492,8 @@ local UpdateIconAuras = function(self, cache, unit, index, filter, visible, isEn if(name) then local show = true - local isPlayer = (caster and (caster == "player" or caster == "vehicle")) or false; + local isPlayer = false; + if((not caster) or (caster == "player" or caster == "vehicle")) then isPlayer = true end; if(self.CustomFilter and (not self.forceShow)) then show = self:CustomFilter(isEnemy, isPlayer, name, spellID, debuffType, duration, shouldConsolidate) end @@ -611,7 +612,8 @@ local UpdateBarAuras = function(self, cache, unit, index, filter, visible, isEne if(name) then local show = true - local isPlayer = (caster and (caster == "player" or caster == "vehicle")) or false; + local isPlayer = false; + if((not caster) or (caster == "player" or caster == "vehicle")) then isPlayer = true end; if((not self.forceShow) and self.CustomFilter) then show = self:CustomFilter(isEnemy, isPlayer, name, spellID, debuffType, duration, shouldConsolidate) end diff --git a/SVUI_UnitFrames/view.lua b/SVUI_UnitFrames/view.lua index 19452d3..a2d6e5b 100644 --- a/SVUI_UnitFrames/view.lua +++ b/SVUI_UnitFrames/view.lua @@ -154,13 +154,22 @@ function MOD:ViewEnemyFrames(unit, numGroup) end end -function MOD:ViewGroupFrames(headerFrame, setForced, setAuraForced) +local function TransferVisibility(frame) + for i = 1, select("#", frame:GetChildren()) do + local child = select(i,frame:GetChildren()) + child.forceShowAuras = frame.forceShowAuras + child.forceShowHighlights = frame.forceShowHighlights + end +end + +function MOD:ViewGroupFrames(headerFrame, setForced, setAuraForced, setHighlightForced) if InCombatLockdown() then return end if(not headerFrame) then return end SetProxyEnv() headerFrame.forceShow = setForced; headerFrame.forceShowAuras = setAuraForced; + headerFrame.forceShowHighlights = setAuraForced or setHighlightForced; headerFrame.isForced = setForced; local raidToken = headerFrame.___groupkey @@ -194,6 +203,7 @@ function MOD:ViewGroupFrames(headerFrame, setForced, setAuraForced) if(groupFrame:IsShown()) then groupFrame.forceShow = headerFrame.forceShow; groupFrame.forceShowAuras = headerFrame.forceShowAuras; + groupFrame.forceShowHighlights = headerFrame.forceShowHighlights; groupFrame:HookScript("OnAttributeChanged", AttributeChangeHook) if setForced then @@ -213,6 +223,8 @@ function MOD:ViewGroupFrames(headerFrame, setForced, setAuraForced) groupFrame:Update() end end + + TransferVisibility(groupFrame) end headerFrame:SetVisibility()