diff --git a/Interface/AddOns/SVUI/Bindings.xml b/Interface/AddOns/SVUI/Bindings.xml index d0c3a17..9e47fe2 100644 --- a/Interface/AddOns/SVUI/Bindings.xml +++ b/Interface/AddOns/SVUI/Bindings.xml @@ -8,4 +8,5 @@ <Binding name="SVUI_RIDE" description="Lets Ride" category="ADDONS" runOnUp="false"> SVUILetsRide() </Binding> + <ModifiedClick action="VENDORMARKITEM" default="ALT-BUTTON2"/> </Bindings> \ No newline at end of file diff --git a/Interface/AddOns/SVUI/assets/artwork/Minimap/Thumbs.db b/Interface/AddOns/SVUI/assets/artwork/Minimap/Thumbs.db deleted file mode 100644 index b5ecd0a..0000000 Binary files a/Interface/AddOns/SVUI/assets/artwork/Minimap/Thumbs.db and /dev/null differ diff --git a/Interface/AddOns/SVUI/framework/api/api.xml b/Interface/AddOns/SVUI/framework/api/api.xml index d1f4658..c661a3a 100644 --- a/Interface/AddOns/SVUI/framework/api/api.xml +++ b/Interface/AddOns/SVUI/framework/api/api.xml @@ -654,6 +654,75 @@ </Layers> </Frame> + <Frame name="SVUI_PanelTemplate_ModelBorder" virtual="true"> + <Attributes> + <Attribute name="panelID" type="string" value="model" /> + <Attribute name="panelPadding" type="number" value="2" /> + <Attribute name="panelColor" type="string" value="special" /> + <Attribute name="panelGradient" type="string" value="class" /> + <Attribute name="panelTexUpdate" type="boolean" value="true" /> + <Attribute name="panelSkipUpdate" type="boolean" value="false" /> + </Attributes> + <Backdrop bgFile="Interface\AddOns\SVUI\assets\artwork\Template\Background\COMIC-MODEL" edgeFile="Interface\BUTTONS\WHITE8X8" tile="false"> + <EdgeSize val="2" /> + <TileSize val="0" /> + <BackgroundInsets left="0" right="0" top="0" bottom="0" /> + <Color r="0" g="0" b="0" a="0.5" /> + <BorderColor r="0" g="0" b="0" a="1" /> + </Backdrop> + <Layers> + <Layer level="BACKGROUND" textureSubLevel="1"> + <Texture parentKey="Skin" nonBlocking="true" file="Interface\AddOns\SVUI\assets\artwork\Template\Background\COMIC-MODEL" setAllPoints="true" /> + <Color r="0.37" g="0.32" b="0.29" 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="2" /> + </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="2" /> + </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="2" /> + </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="2" /> + </Size> + <Color r="0" g="0" b="0" a="1" /> + </Texture> + </Layer> + </Layers> + <Frames> + <Frame parentKey="Shadow" inherits="SVUI_ShadowTemplate" /> + </Frames> + </Frame> + <Frame name="SVUI_PanelTemplate_Paper" virtual="true"> <Attributes> <Attribute name="panelID" type="string" value="paper" /> diff --git a/Interface/AddOns/SVUI/framework/api/api_templates.lua b/Interface/AddOns/SVUI/framework/api/api_templates.lua index 8199d92..f1e4347 100644 --- a/Interface/AddOns/SVUI/framework/api/api_templates.lua +++ b/Interface/AddOns/SVUI/framework/api/api_templates.lua @@ -69,6 +69,7 @@ local XML_LOOKUP = { ["Inset"] = "SVUI_PanelTemplate_Inset", ["Comic"] = "SVUI_PanelTemplate_Comic", ["Model"] = "SVUI_PanelTemplate_Model", + ["ModelBorder"] = "SVUI_PanelTemplate_ModelBorder", ["Paper"] = "SVUI_PanelTemplate_Paper", ["Container"] = "SVUI_PanelTemplate_Container", ["Pattern"] = "SVUI_PanelTemplate_Pattern", @@ -642,6 +643,7 @@ local function SetButtonTemplate(self, invisible, overridePadding, xOffset, yOff CreatePanelTemplate(self, "Transparent", underlay, true, padding, x, y, defaultColor) self:SetBackdropColor(0,0,0,0) self:SetBackdropBorderColor(0,0,0,0) + if(self.Panel.BorderLeft) then self.Panel.BorderLeft:SetVertexColor(0,0,0,0) self.Panel.BorderRight:SetVertexColor(0,0,0,0) diff --git a/Interface/AddOns/SVUI/framework/movers/mover_blizzard.lua b/Interface/AddOns/SVUI/framework/movers/mover_blizzard.lua deleted file mode 100644 index 7426602..0000000 --- a/Interface/AddOns/SVUI/framework/movers/mover_blizzard.lua +++ /dev/null @@ -1,173 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local select = _G.select; -local type = _G.type; -local pairs = _G.pairs; -local string = _G.string; -local math = _G.math; ---[[ STRING METHODS ]]-- -local format, split = string.format, string.split; ---[[ MATH METHODS ]]-- -local min, floor = math.min, math.floor; -local parsefloat = math.parsefloat; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SV = select(2, ...) -local L = SV.L; - -local Movable = CreateFrame("Frame", nil) -local MovableFrames = {} -MovableFrames["GameMenuFrame"] = {} ---[[ -########################################################## -LOCAL VARS -########################################################## -]]-- -local DraggableFrames = { - "AchievementFrame", - "AuctionFrame", - "ArchaeologyFrame", - "BattlefieldMinimap", - "BarberShopFrame", - "BlackMarketFrame", - "CalendarFrame", - "CharacterFrame", - "ClassTrainerFrame", - "DressUpFrame", - "EncounterJournal", - "FriendsFrame", - "GameMenuFrame", - "GMSurveyFrame", - "GossipFrame", - "GuildFrame", - "GuildBankFrame", - "GuildRegistrarFrame", - "HelpFrame", - "InterfaceOptionsFrame", - "ItemUpgradeFrame", - "KeyBindingFrame", - "LFGDungeonReadyPopup", - "MacOptionsFrame", - "MacroFrame", - "MailFrame", - "MerchantFrame", - "PlayerTalentFrame", - "PetJournalParent", - "PVEFrame", - "PVPFrame", - "QuestFrame", - "QuestLogFrame", - "RaidBrowserFrame", - "ReadyCheckFrame", - "ReforgingFrame", - "ReportCheatingDialog", - "ReportPlayerNameDialog", - "RolePollPopup", - "ScrollOfResurrectionSelectionFrame", - "SpellBookFrame", - "TabardFrame", - "TaxiFrame", - "TimeManagerFrame", - "TradeSkillFrame", - "TradeFrame", - "TransmorgifyFrame", - "TutorialFrame", - "VideoOptionsFrame", - "VoidStorageFrame", - --"WorldStateAlwaysUpFrame" -}; ---[[ -########################################################## -LOCAL FUNCTIONS -########################################################## -]]-- -local BlizzardFrame_OnUpdate = function(self) - if InCombatLockdown() or self:GetName() == "GameMenuFrame" then return end - if self.IsMoving then return end - self:ClearAllPoints() - if self:GetName() == "QuestFrame" then - if MovableFrames["GossipFrame"].Points ~= nil then - self:SetPoint(unpack(MovableFrames["GossipFrame"].Points)) - end - elseif MovableFrames[self:GetName()].Points ~= nil then - self:SetPoint(unpack(MovableFrames[self:GetName()].Points)) - end -end - -local BlizzardFrame_OnDragStart = function(self) - if not self:IsMovable() then return end - self:StartMoving() - self.IsMoving = true -end - -local BlizzardFrame_OnDragStop = function(self) - if not self:IsMovable() then return end - self.IsMoving = false; - self:StopMovingOrSizing() - if self:GetName() == "GameMenuFrame" then return end - local anchor1, parent, anchor2, x, y = self:GetPoint() - parent = self:GetParent():GetName() - self:ClearAllPoints() - self:SetPoint(anchor1, parent, anchor2, x, y) - if self:GetName() == "QuestFrame" then - MovableFrames["GossipFrame"].Points = {anchor1, parent, anchor2, x, y} - else - MovableFrames[self:GetName()].Points = {anchor1, parent, anchor2, x, y} - end -end - -local Movable_OnEvent = function(self) - for _, frameName in pairs(DraggableFrames) do - local frame = _G[frameName] - if(frame) then - if(frameName ~= "LossOfControlFrame" and (not MovableFrames[frameName])) then - frame:EnableMouse(true) - - if(frameName == "LFGDungeonReadyPopup") then - LFGDungeonReadyDialog:EnableMouse(false) - end - - frame:SetMovable(true) - frame:RegisterForDrag("LeftButton") - frame:SetClampedToScreen(true) - frame:HookScript("OnUpdate", BlizzardFrame_OnUpdate) - frame:SetScript("OnDragStart", BlizzardFrame_OnDragStart) - frame:SetScript("OnDragStop", BlizzardFrame_OnDragStop) - MovableFrames[frameName] = {} - end - end - end -end - -Movable:RegisterEvent("PLAYER_LOGIN") -Movable:RegisterEvent("ADDON_LOADED") -Movable:RegisterEvent("LFG_UPDATE") -Movable:RegisterEvent("ROLE_POLL_BEGIN") -Movable:RegisterEvent("READY_CHECK") -Movable:RegisterEvent("UPDATE_WORLD_STATES") -Movable:RegisterEvent("WORLD_STATE_TIMER_START") -Movable:RegisterEvent("WORLD_STATE_UI_TIMER_UPDATE") - -Movable:SetScript("OnEvent", Movable_OnEvent) \ No newline at end of file diff --git a/Interface/AddOns/SVUI/framework/movers/mover_graph.lua b/Interface/AddOns/SVUI/framework/movers/mover_graph.lua index 0feab5c..ad2915a 100644 --- a/Interface/AddOns/SVUI/framework/movers/mover_graph.lua +++ b/Interface/AddOns/SVUI/framework/movers/mover_graph.lua @@ -48,7 +48,6 @@ function Graph:Toggle(enabled) if((not self.Grid) or (self.CellSize ~= SV.db.general.graphSize)) then self:Generate() end - print(enabled) if(not enabled) then self.Grid:Hide() else diff --git a/Interface/AddOns/SVUI/framework/movers/mover_mentalo.lua b/Interface/AddOns/SVUI/framework/movers/mover_mentalo.lua index c458ff3..29cd08d 100644 --- a/Interface/AddOns/SVUI/framework/movers/mover_mentalo.lua +++ b/Interface/AddOns/SVUI/framework/movers/mover_mentalo.lua @@ -42,19 +42,53 @@ GET ADDON DATA local SV = select(2, ...) local L = SV.L; -local Mentalo = {} - +local Mentalo = CreateFrame("Frame", nil) Mentalo.Frames = {} - -local MentaloUpdateHandler = CreateFrame("Frame", nil) - +Mentalo.Blizzard = {} + +local DraggableFrames = { + "AchievementFrame", "AuctionFrame", "ArchaeologyFrame", + "BattlefieldMinimap", "BarberShopFrame", "BlackMarketFrame", + "CalendarFrame", "CharacterFrame", "ClassTrainerFrame", + "DressUpFrame", + "EncounterJournal", + "FriendsFrame", + "GameMenuFrame", "GMSurveyFrame", "GossipFrame", "GuildFrame", "GuildBankFrame", "GuildRegistrarFrame", + "GarrisonLandingPage", "GarrisonMissionFrame", "GarrisonCapacitiveDisplayFrame", + "HelpFrame", + "InterfaceOptionsFrame", + "ItemUpgradeFrame", + "KeyBindingFrame", + "LFGDungeonReadyPopup", + "MacOptionsFrame", "MacroFrame", "MailFrame", "MerchantFrame", + "PlayerTalentFrame", "PetJournalParent", "PetStableFrame", "PVEFrame", "PVPFrame", + "QuestFrame", "QuestLogFrame", + "RaidBrowserFrame", "ReadyCheckFrame", "ReforgingFrame", "ReportCheatingDialog", "ReportPlayerNameDialog", "RolePollPopup", + "ScrollOfResurrectionSelectionFrame", "SpellBookFrame", + "TabardFrame", "TaxiFrame", "TimeManagerFrame", "TradeSkillFrame", "TradeFrame", "TransmogrifyFrame", "TutorialFrame", + "VideoOptionsFrame", "VoidStorageFrame", + --"WorldStateAlwaysUpFrame" +}; +--[[ + /$$$$$$ /$$ /$$ /$$ + /$$__ $$ | $$ |__/ | $$ +| $$ \__//$$$$$$ /$$ /$$$$$$$| $$ /$$ /$$ /$$ +| $$$$$$|_ $$_/ | $$ /$$_____/| $$ /$$/| $$ | $$ + \____ $$ | $$ | $$| $$ | $$$$$$/ | $$ | $$ + /$$ \ $$ | $$ /$$| $$| $$ | $$_ $$ | $$ | $$ +| $$$$$$/ | $$$$/| $$| $$$$$$$| $$ \ $$| $$$$$$$ + \______/ \___/ |__/ \_______/|__/ \__/ \____ $$ + /$$ | $$ + | $$$$$$/ + \______/ +--]] local Sticky = {}; Sticky.Frames = {}; Sticky.Frames[1] = SV.Screen; Sticky.scripts = Sticky.scripts or {} Sticky.rangeX = 15 Sticky.rangeY = 15 -Sticky.sticky = Sticky.sticky or {} +Sticky.StuckTo = Sticky.StuckTo or {} local function SnapStickyFrame(frameA, frameB, left, top, right, bottom) local sA, sB = frameA:GetEffectiveScale(), frameB:GetEffectiveScale() @@ -142,16 +176,15 @@ function Sticky:GetStickyUpdate(frame, xoffset, yoffset, left, top, right, botto return function() local x, y = GetCursorPosition() local s = frame:GetEffectiveScale() - local sticky = nil x, y = x / s, y / s frame:ClearAllPoints() frame:SetPoint("CENTER", UIParent, "BOTTOMLEFT", x + xoffset, y + yoffset) - self.sticky[frame] = nil + self.StuckTo[frame] = nil for i = 1, #Sticky.Frames do local v = Sticky.Frames[i] if(frame ~= v and frame ~= v:GetParent() and not IsShiftKeyDown() and v:IsVisible()) then if SnapStickyFrame(frame, v, left, top, right, bottom) then - self.sticky[frame] = v + self.StuckTo[frame] = v break end end @@ -172,19 +205,24 @@ end function Sticky:StopMoving(frame) frame:SetScript("OnUpdate", self.scripts[frame]) self.scripts[frame] = nil - if self.sticky[frame] then - local sticky = self.sticky[frame] - self.sticky[frame] = nil - return true, sticky + if self.StuckTo[frame] then + local frame2 = self.StuckTo[frame] + self.StuckTo[frame] = nil + return true, frame2 else return false, nil end end ---[[ -########################################################## -LOCAL VARS -########################################################## -]]-- +--[[ + /$$ /$$ /$$ /$$ +| $$$ /$$$ | $$ | $$ +| $$$$ /$$$$ /$$$$$$ /$$$$$$$ /$$$$$$ /$$$$$$ | $$ /$$$$$$ +| $$ $$/$$ $$ /$$__ $$| $$__ $$|_ $$_/ |____ $$| $$ /$$__ $$ +| $$ $$$| $$| $$$$$$$$| $$ \ $$ | $$ /$$$$$$$| $$| $$ \ $$ +| $$\ $ | $$| $$_____/| $$ | $$ | $$ /$$ /$$__ $$| $$| $$ | $$ +| $$ \/ | $$| $$$$$$$| $$ | $$ | $$$$/| $$$$$$$| $$| $$$$$$/ +|__/ |__/ \_______/|__/ |__/ \___/ \_______/|__/ \______/ +--]] local CurrentFrameTarget, UpdateFrameTarget; --[[ ########################################################## @@ -228,6 +266,10 @@ end local function CurrentPosition(frame) if not frame then return end local anchor1, parent, anchor2, x, y = frame:GetPoint() + anchor1 = anchor1 or "TOPLEFT" + anchor2 = anchor2 or "TOPLEFT" + x = x or 50 + y = y or -50 local parentName if not parent then parentName = "SVUIParent" @@ -290,7 +332,6 @@ local function ResetAllAlphas() end end end - --[[ /$$$$$$$$/$$ /$$ /$$$$$$$$ /$$ /$$ /$$$$$$ /$$ /$$ /$$$$$$$ |__ $$__/ $$ | $$| $$_____/ | $$ | $$ /$$__ $$| $$$ | $$| $$__ $$ @@ -301,7 +342,6 @@ end | $$ | $$ | $$| $$$$$$$$ | $$ | $$| $$ | $$| $$ \ $$| $$$$$$$/ |__/ |__/ |__/|________/ |__/ |__/|__/ |__/|__/ \__/|_______/ --]] - local TheHand = CreateFrame("Frame", "SVUI_HandOfMentalo", SV.Screen) TheHand:SetFrameStrata("DIALOG") TheHand:SetFrameLevel(99) @@ -353,6 +393,8 @@ end HANDLERS ########################################################## ]]-- +local MentaloUpdateHandler = CreateFrame("Frame", nil) + local Movable_OnMouseUp = function(self) CurrentFrameTarget = self; local xOffset, yOffset, anchor = CalculateOffsets() @@ -403,16 +445,16 @@ end local Movable_OnSizeChanged = function(self) if InCombatLockdown()then return end if self.dirtyWidth and self.dirtyHeight then - self.Avatar:Size(self.dirtyWidth, self.dirtyHeight) + self.Grip:Size(self.dirtyWidth, self.dirtyHeight) else - self.Avatar:Size(self:GetSize()) + self.Grip:Size(self:GetSize()) end end local Movable_OnDragStart = function(self) if InCombatLockdown() then SV:AddonMessage(ERR_NOT_IN_COMBAT)return end if SV.db.general.stickyFrames then - Sticky:StartMoving(self, self.snapOffset, self.snapOffset, self.snapOffset, self.snapOffset) + Sticky:StartMoving(self, self.snapOffset) else self:StartMoving() end @@ -483,7 +525,7 @@ local Movable_OnEnter = function(self) self.text:SetTextColor(0, 1, 1) self:SetBackdropBorderColor(0, 0.7, 1) UpdateFrameTarget = self; - SVUI_Mentalo.Avatar:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Doodads\MENTALO-ON]]) + SVUI_Mentalo.Portrait:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Doodads\MENTALO-ON]]) TheHand:SetPoint("CENTER", self, "TOP", 0, 0) TheHand:Show() if CurrentFrameTarget ~= self then @@ -496,7 +538,7 @@ local Movable_OnLeave = function(self) if TheHand.UserHeld then return end self.text:SetTextColor(0.5, 0.5, 0.5) self:SetBackdropBorderColor(0.5, 0.5, 0.5) - SVUI_Mentalo.Avatar:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Doodads\MENTALO-OFF]]) + SVUI_Mentalo.Portrait:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Doodads\MENTALO-OFF]]) TheHand:Hide() if(CurrentFrameTarget ~= self and not SVUI_MentaloPrecision:IsShown()) then self:SetAlpha(0.4) @@ -528,37 +570,30 @@ end CONSTRUCTS ########################################################## ]]-- -function Mentalo:New(frame, moveName, title, raised, snap, dragStopFunc) - if(not frame) then return end - if self.Frames[moveName].Created then return end - if raised == nil then raised = true end +function Mentalo:New(frame, moveName, title, snap, dragStopFunc) + if(not frame or (self.Frames[moveName] ~= nil)) then return end + + self.Frames[moveName] = { + text = title, + postdrag = dragStopFunc, + point = CurrentPosition(frame) + } local movable = CreateFrame("Button", moveName, SV.Screen) movable:SetFrameLevel(frame:GetFrameLevel() + 1) movable:SetClampedToScreen(true) movable:SetWidth(frame:GetWidth()) movable:SetHeight(frame:GetHeight()) + movable:SetFrameStrata("DIALOG") movable.parent = frame; movable.name = moveName; movable.textString = title; movable.postdrag = dragStopFunc; - movable.overlay = raised; - movable.snapOffset = snap or -2; - - if raised == true then - movable:SetFrameStrata("DIALOG") - else - movable:SetFrameStrata("BACKGROUND") - end + movable.snapOffset = snap or -2; local anchor1, anchorParent, anchor2, xPos, yPos = split("\031", CurrentPosition(frame)) - if(SV.cache.Anchors and SV.cache.Anchors[moveName]) then - if(type(SV.cache.Anchors[moveName]) == "table") then - movable:SetPoint(SV.cache.Anchors[moveName]["p"], SV.Screen, SV.cache.Anchors[moveName]["p2"], SV.cache.Anchors[moveName]["p3"], SV.cache.Anchors[moveName]["p4"]) - SV.cache.Anchors[moveName] = CurrentPosition(movable) - movable:ClearAllPoints() - end + if(SV.cache.Anchors and SV.cache.Anchors[moveName] and (type(SV.cache.Anchors[moveName]) == "string")) then anchor1, anchorParent, anchor2, xPos, yPos = split("\031", SV.cache.Anchors[moveName]) movable:SetPoint(anchor1, anchorParent, anchor2, xPos, yPos) else @@ -568,13 +603,10 @@ function Mentalo:New(frame, moveName, title, raised, snap, dragStopFunc) movable:SetFixedPanelTemplate("Transparent") movable:SetAlpha(0.4) - self.Frames[moveName].Avatar = movable; - Sticky.Frames[#Sticky.Frames + 1] = movable; - frame:SetScript("OnSizeChanged", Movable_OnSizeChanged) - frame.Avatar = movable; + frame.Grip = movable; frame:ClearAllPoints() - frame:SetPoint(anchor1, movable, 0, 0) + frame:SetPoint(anchor1, movable, anchor1, 0, 0) local mtext = movable:CreateFontString(nil, "OVERLAY") mtext:FontManager() @@ -598,7 +630,7 @@ function Mentalo:New(frame, moveName, title, raised, snap, dragStopFunc) movable:SetMovable(true) movable:Hide() - if dragStopFunc ~= nil and type(dragStopFunc) == "function" then + if(dragStopFunc and (type(dragStopFunc) == "function")) then movable:RegisterEvent("PLAYER_ENTERING_WORLD") movable:SetScript("OnEvent", function(this, event) local point = Pinpoint(this) @@ -607,105 +639,113 @@ function Mentalo:New(frame, moveName, title, raised, snap, dragStopFunc) end) end - self.Frames[moveName].Created = true + Sticky.Frames[#Sticky.Frames + 1] = movable; end -function Mentalo:HasMoved(frame) - if SV.cache.Anchors and SV.cache.Anchors[frame] then +function Mentalo:HasMoved(frameName) + if(SV.cache.Anchors and SV.cache.Anchors[frameName]) then return true else return false end end -function Mentalo:SaveMovable(frame) - if(not _G[frame] or not SV.cache.Anchors) then return end - SV.cache.Anchors[frame] = CurrentPosition(_G[frame]) -end +function Mentalo:SaveMovable(frameName) + if((not _G[frameName]) or (not SV.cache.Anchors)) then return end + SV.cache.Anchors[frameName] = CurrentPosition(_G[frameName]) +end -function Mentalo:ChangeSnapOffset(frame, snapOffset) - if not _G[frame] or not self.Frames[frame] then return end - self.Frames[frame].Avatar.snapOffset = snapOffset or -2; - self.Frames[frame]["snapoffset"] = snapOffset or -2 +function Mentalo:ChangeSnapOffset(frameName, snapOffset) + if(not _G[frameName]) then return end + _G[frameName].snapOffset = snapOffset or -2; end -function Mentalo:Add(frame, title, raised, snapOffset, dragStopFunc, movableGroup, overrideName) +function Mentalo:Add(frame, title, snapOffset, dragStopFunc, overrideName) if(not frame or (not overrideName and not frame:GetName())) then return end local frameName = overrideName or frame:GetName() - local moveName = ("%s_MOVE"):format(frameName) - if not movableGroup then movableGroup = "ALL, GENERAL" end - if self.Frames[moveName] == nil then - self.Frames[moveName] = {} - self.Frames[moveName]["parent"] = frame; - self.Frames[moveName]["text"] = title; - self.Frames[moveName]["overlay"] = raised; - self.Frames[moveName]["postdrag"] = dragStopFunc; - self.Frames[moveName]["snapoffset"] = snapOffset; - self.Frames[moveName]["point"] = CurrentPosition(frame) - end - - self:New(frame, moveName, title, raised, snapOffset, dragStopFunc) + local moveName = ("%s_MOVE"):format(frameName) + self:New(frame, moveName, title, snapOffset, dragStopFunc) end function Mentalo:Reset(request) - if request == "" or request == nil then - for name, _ in pairs(self.Frames)do - local frame = _G[name]; - if self.Frames[name]["point"] then - local u, v, w, x, y = split("\031", self.Frames[name]["point"]) + if(request == "" or request == nil) then + for frameName, frameData in pairs(self.Frames) do + local frame = _G[frameName]; + if(frameData.point) then + local u, v, w, x, y = split("\031", frameData.point) frame:ClearAllPoints() frame:SetPoint(u, v, w, x, y) - for arg, func in pairs(self.Frames[name])do - if arg == "postdrag" and type(func) == "function" then - func(frame, Pinpoint(frame)) - end + if(frameData.postdrag and (type(frameData.postdrag) == "function")) then + frameData.postdrag(frame, Pinpoint(frame)) end + end + if(SV.cache.Anchors and SV.cache.Anchors[frameName]) then + SV.cache.Anchors[frameName] = nil end end - if(SV.cache.Anchors) then - wipe(SV.cache.Anchors) - end + elseif(request == "Blizzard") then + for frameName, point in pairs(self.Blizzard) do + local frame = _G[frameName]; + if(point and (type(point) == "string")) then + local u, v, w, x, y = split("\031", point) + frame:ClearAllPoints() + frame:SetPoint(u, v, w, x, y) + end + if(SV.cache.Anchors and SV.cache.Anchors[frameName]) then + SV.cache.Anchors[frameName] = nil + end + end else - for name, _ in pairs(self.Frames)do - if self.Frames[name]["point"] then - for arg1, arg2 in pairs(self.Frames[name])do - local mover; - if arg1 == "text" then - if request == arg2 then - local frame = _G[name] - local u, v, w, x, y = split("\031", self.Frames[name]["point"]) - frame:ClearAllPoints() - frame:SetPoint(u, v, w, x, y) - if(SV.cache.Anchors and SV.cache.Anchors[name]) then - SV.cache.Anchors[name] = nil - end - if (self.Frames[name]["postdrag"] ~= nil and type(self.Frames[name]["postdrag"]) == "function")then - self.Frames[name]["postdrag"](frame, Pinpoint(frame)) - end - end - end + for frameName, frameData in pairs(self.Frames) do + if(frameData.point and (request == frameData.text)) then + local frame = _G[frameName] + local u, v, w, x, y = split("\031", frameData.point) + frame:ClearAllPoints() + frame:SetPoint(u, v, w, x, y) + if (frameData.postdrag and (type(frameData.postdrag) == "function"))then + frameData.postdrag(frame, Pinpoint(frame)) end + if(SV.cache.Anchors and SV.cache.Anchors[frameName]) then + SV.cache.Anchors[frameName] = nil + end + break end end end end function Mentalo:SetPositions() - for name, _ in pairs(self.Frames)do - local frame = _G[name]; + for frameName, frameData in pairs(self.Frames) do + local frame = _G[frameName]; local anchor1, parent, anchor2, x, y; if frame then - if (SV.cache.Anchors and SV.cache.Anchors[name] and type(SV.cache.Anchors[name]) == "string") then - anchor1, parent, anchor2, x, y = split("\031", SV.cache.Anchors[name]) + if (SV.cache.Anchors and SV.cache.Anchors[frameName] and (type(SV.cache.Anchors[frameName]) == "string")) then + anchor1, parent, anchor2, x, y = split("\031", SV.cache.Anchors[frameName]) frame:ClearAllPoints() frame:SetPoint(anchor1, parent, anchor2, x, y) - elseif self.Frames[name]["point"] then - anchor1, parent, anchor2, x, y = split("\031", self.Frames[name]["point"]) + elseif(frameData.point) then + anchor1, parent, anchor2, x, y = split("\031", frameData.point) frame:ClearAllPoints() frame:SetPoint(anchor1, parent, anchor2, x, y) end end - end + end + + for frameName, point in pairs(self.Blizzard) do + local frame = _G[frameName]; + local anchor1, parent, anchor2, x, y; + if(frame) then + if (SV.cache.Anchors and SV.cache.Anchors[frameName] and (type(SV.cache.Anchors[frameName]) == "string")) then + anchor1, parent, anchor2, x, y = split("\031", SV.cache.Anchors[frameName]) + frame:ClearAllPoints() + frame:SetPoint(anchor1, parent, anchor2, x, y) + elseif(point and (type(point) == "string")) then + anchor1, parent, anchor2, x, y = split("\031", point) + frame:ClearAllPoints() + frame:SetPoint(anchor1, parent, anchor2, x, y) + end + end + end end function Mentalo:Toggle(isConfigMode) @@ -813,6 +853,84 @@ local XML_MentaloPrecisionInputY_EnterPressed = function(self) end --[[ ########################################################## +DRAGGABLE HANDLERS +########################################################## +]]-- +local BlizzardFrame_OnUpdate = function(self) + local frameName = self:GetName(); + if(InCombatLockdown() or (frameName == "GameMenuFrame") or (self.IsMoving)) then return end + if(frameName == "QuestFrame") then + frameName = "GossipFrame" + end + if (SV.cache.Anchors and SV.cache.Anchors[frameName] and (type(SV.cache.Anchors[frameName]) == "string")) then + local anchor1, parent, anchor2, x, y = split("\031", SV.cache.Anchors[frameName]) + self:ClearAllPoints() + self:SetPoint(anchor1, parent, anchor2, x, y) + elseif(Mentalo.Blizzard[frameName] and (type(Mentalo.Blizzard[frameName]) == "string")) then + local anchor1, parent, anchor2, x, y = split("\031", Mentalo.Blizzard[frameName]) + self:ClearAllPoints() + self:SetPoint(anchor1, parent, anchor2, x, y) + end +end + +local BlizzardFrame_OnDragStart = function(self) + if not self:IsMovable() then return end + self:StartMoving() + self.IsMoving = true +end + +local BlizzardFrame_OnDragStop = function(self) + if(not self:IsMovable()) then return end + local frameName = self:GetName(); + self.IsMoving = false; + self:StopMovingOrSizing() + if(frameName == "GameMenuFrame") then return end + local anchor1, parent, anchor2, x, y = self:GetPoint() + parent = self:GetParent():GetName() + self:ClearAllPoints() + self:SetPoint(anchor1, parent, anchor2, x, y) + if(frameName == "QuestFrame") then + frameName = "GossipFrame" + end + Mentalo:SaveMovable(frameName) +end + +local MentaloMaster_OnEvent = function(self) + for _, frameName in pairs(DraggableFrames) do + local frame = _G[frameName] + if(frame) then + if(frameName ~= "LossOfControlFrame" and (not self.Blizzard[frameName])) then + frame:EnableMouse(true) + + if(frameName == "LFGDungeonReadyPopup") then + LFGDungeonReadyDialog:EnableMouse(false) + end + + frame:SetMovable(true) + frame:RegisterForDrag("LeftButton") + frame:SetClampedToScreen(true) + frame:HookScript("OnUpdate", BlizzardFrame_OnUpdate) + frame:SetScript("OnDragStart", BlizzardFrame_OnDragStart) + frame:SetScript("OnDragStop", BlizzardFrame_OnDragStop) + + self.Blizzard[frameName] = CurrentPosition(frame) + end + end + end +end + +Mentalo:RegisterEvent("PLAYER_LOGIN") +Mentalo:RegisterEvent("ADDON_LOADED") +Mentalo:RegisterEvent("LFG_UPDATE") +Mentalo:RegisterEvent("ROLE_POLL_BEGIN") +Mentalo:RegisterEvent("READY_CHECK") +Mentalo:RegisterEvent("UPDATE_WORLD_STATES") +Mentalo:RegisterEvent("WORLD_STATE_TIMER_START") +Mentalo:RegisterEvent("WORLD_STATE_UI_TIMER_UPDATE") + +Mentalo:SetScript("OnEvent", MentaloMaster_OnEvent) +--[[ +########################################################## Initialize ########################################################## ]]-- @@ -844,25 +962,24 @@ function Mentalo:Initialize() SV.cache.Anchors = SV.cache.Anchors or {} - for name, _ in pairs(self.Frames)do - local parent, text, overlay, snapoffset, postdrag; - for key, value in pairs(self.Frames[name])do - if(key == "parent") then - parent = value - elseif(key == "text") then - text = value - elseif(key == "overlay") then - overlay = value - elseif(key == "snapoffset") then - snapoffset = value - elseif(key == "postdrag") then - postdrag = value - end - end - self:New(parent, name, text, overlay, snapoffset, postdrag) - end - self:SetPositions() + + if(SV.db.general.multiMonitor) then + for panelName, panelData in pairs(_G["UIPanelWindows"]) do + if(self.Blizzard[panelName] and (not SV.cache.Anchors[frameName])) then + if(panelData.area and (panelData.area == 'left')) then + local frame = _G[panelName]; + local parent = frame:GetParent():GetName() + if(parent and ((parent == UIParent) or (parent == SV.Screen))) then + frame:ClearAllPoints() + frame:SetPoint('CENTER', parent, 'CENTER', 0, 0) + SetUIPanelAttribute(frame, 'area', 'center') + self.Blizzard[frameName] = CurrentPosition(frame) + end + end + end + end + end end SV.Mentalo = Mentalo \ No newline at end of file diff --git a/Interface/AddOns/SVUI/framework/movers/movers.xml b/Interface/AddOns/SVUI/framework/movers/movers.xml index b673c63..1c1d332 100644 --- a/Interface/AddOns/SVUI/framework/movers/movers.xml +++ b/Interface/AddOns/SVUI/framework/movers/movers.xml @@ -215,7 +215,7 @@ </Anchors> <Color r="1" g="1" b="0" a="0.8"/> </FontString> - <Texture parentKey="Avatar" file="Interface\AddOns\SVUI\assets\artwork\Doodads\MENTALO-OFF"> + <Texture parentKey="Portrait" file="Interface\AddOns\SVUI\assets\artwork\Doodads\MENTALO-OFF"> <Size x="132" y="132"/> <Anchors> <Anchor point="BOTTOM" relativeTo="$parentBG" relativePoint="TOP"/> @@ -258,5 +258,4 @@ <Script file="mover_graph.lua"/> <Script file="mover_mentalo.lua"/> - <Script file="mover_blizzard.lua"/> </Ui> \ No newline at end of file diff --git a/Interface/AddOns/SVUI/framework/widgets/widget_comix.lua b/Interface/AddOns/SVUI/framework/widgets/widget_comix.lua index 8934c8d..d892af4 100644 --- a/Interface/AddOns/SVUI/framework/widgets/widget_comix.lua +++ b/Interface/AddOns/SVUI/framework/widgets/widget_comix.lua @@ -136,11 +136,6 @@ function SV.Comix:LaunchPopup() end local Comix_OnEvent = function(self, event, ...) - if(not SV.db.general.comix) then - self:UnregisterEvent("COMBAT_LOG_EVENT_UNFILTERED") - self:SetScript("OnEvent", nil) - return - end local subEvent = select(2,...) local guid = select(4,...) local ready = self:ReadyState() @@ -156,8 +151,8 @@ local Comix_OnEvent = function(self, event, ...) end end -function SV.Comix:Toggle(enabled) - if(not enabled) then +function SV.Comix:Toggle() + if(not SV.db.general.comix) then self:UnregisterEvent("COMBAT_LOG_EVENT_UNFILTERED") self:SetScript("OnEvent", nil) else @@ -212,7 +207,7 @@ function SV.Comix:Initialize() self:ReadyState(true) - if SV.db.general.comix then + if(SV.db.general.comix) then self:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED") self:SetScript("OnEvent", Comix_OnEvent) end diff --git a/Interface/AddOns/SVUI/packages/actionbar/SVBar.lua b/Interface/AddOns/SVUI/packages/actionbar/SVBar.lua index 262c694..4b3dea4 100644 --- a/Interface/AddOns/SVUI/packages/actionbar/SVBar.lua +++ b/Interface/AddOns/SVUI/packages/actionbar/SVBar.lua @@ -1053,7 +1053,7 @@ CreateActionBars = function(self) ]]) self:RefreshBar(barID) - SV.Mentalo:Add(thisBar, L[barID], nil, nil, nil, "ALL, ACTIONBARS") + SV.Mentalo:Add(thisBar, L[barID]) end end @@ -1210,7 +1210,7 @@ do self:RegisterEvent("UPDATE_SHAPESHIFT_FORM", SetStanceBarButtons) self:RegisterEvent("ACTIONBAR_PAGE_CHANGED", SetStanceBarButtons) UpdateShapeshiftForms() - SV.Mentalo:Add(stanceBar, L["Stance Bar"], nil, -3, nil, "ALL, ACTIONBARS") + SV.Mentalo:Add(stanceBar, L["Stance Bar"], -3) self:RefreshBar("Stance") SetStanceBarButtons() self:UpdateBarBindings(false, true) @@ -1339,7 +1339,7 @@ do self:RegisterEvent("PLAYER_FARSIGHT_FOCUS_CHANGED", RefreshPet) self:RegisterEvent("PET_BAR_UPDATE_COOLDOWN", PetActionBar_UpdateCooldowns) - SV.Mentalo:Add(petBar, L["Pet Bar"], nil, nil, nil, "ALL, ACTIONBARS") + SV.Mentalo:Add(petBar, L["Pet Bar"]) end end @@ -1453,7 +1453,7 @@ local CreateExtraBar = function(self) DraenorZoneAbilityFrame:SetPoint('CENTER', specialBar, 'CENTER') DraenorZoneAbilityFrame.ignoreFramePositionManager = true - SV.Mentalo:Add(specialBar, L["Boss Button"], nil, nil, nil, "ALL, ACTIONBAR") + SV.Mentalo:Add(specialBar, L["Boss Button"]) end --[[ ########################################################## diff --git a/Interface/AddOns/SVUI/packages/aura/SVAura.lua b/Interface/AddOns/SVUI/packages/aura/SVAura.lua index 92fa897..f8a39f9 100644 --- a/Interface/AddOns/SVUI/packages/aura/SVAura.lua +++ b/Interface/AddOns/SVUI/packages/aura/SVAura.lua @@ -237,17 +237,19 @@ do end elseif(attribute == "target-slot") then local quality = GetInventoryItemQuality("player", auraIndex) - self.texture:SetTexture(GetInventoryItemTexture("player", auraIndex)) + local tex = GetInventoryItemTexture("player", auraIndex) + self.texture:SetTexture(tex) local offset = 2; local enchantIndex = self:GetName():sub(-1) if enchantIndex:match("2") then offset = 5 - end - if quality then - self:SetBackdropBorderColor(GetItemQualityColor(quality)) - end + end + local enchantInfo = select(offset, GetWeaponEnchantInfo()) - if enchantInfo then + if(enchantInfo) then + if quality then + self:SetBackdropBorderColor(GetItemQualityColor(quality)) + end self.offset = offset; self:SetScript("OnUpdate", RefreshAuraTime) self.nextUpdate = -1; @@ -257,6 +259,7 @@ do self.offset = nil; self:SetScript("OnUpdate", nil) self.time:SetText("") + self:SetAlpha(0) end end end @@ -528,9 +531,10 @@ function MOD:UpdateAuraHeader(auraHeader, auraType) auraChild.count:ClearAllPoints() auraChild.count:SetPoint("BOTTOMRIGHT", -1 + SV.db.SVAura.countOffsetH, SV.db.SVAura.countOffsetV) end - if (i > (db.maxWraps * db.wrapAfter) and auraChild:IsShown()) then + if ((i > (db.maxWraps * db.wrapAfter)) and auraChild:IsShown()) then auraChild:Hide() - end + end + i = i + 1; auraChild = select(i, auraHeader:GetChildren()) end diff --git a/Interface/AddOns/SVUI/packages/bag/SVBag.lua b/Interface/AddOns/SVUI/packages/bag/SVBag.lua index 7a58599..7f3a519 100644 --- a/Interface/AddOns/SVUI/packages/bag/SVBag.lua +++ b/Interface/AddOns/SVUI/packages/bag/SVBag.lua @@ -63,6 +63,7 @@ local ICON_DEPOSIT = [[Interface\AddOns\SVUI\assets\artwork\Icons\BAGS-DEPOSIT]] local ICON_VENDOR = [[Interface\AddOns\SVUI\assets\artwork\Icons\BAGS-VENDOR]] local ICON_REAGENTS = [[Interface\AddOns\SVUI\assets\artwork\Icons\BAGS-REAGENTS]] local numBagFrame = NUM_BAG_FRAMES + 1; +local VendorQueue = {}; local gearSet, gearList = {}, {}; local internalTimer; local RefProfessionColors = { @@ -291,17 +292,23 @@ local SlotUpdate = function(self, slotID) slot:Show() + local texture, count, locked, rarity = GetContainerItemInfo(bag, slotID); + local itemID = GetContainerItemID(bag, slotID); + local start, duration, enable = GetContainerItemCooldown(bag, slotID); + local itemLink = GetContainerItemLink(bag, slotID); + if(slot.JunkIcon) then - slot.JunkIcon:Hide() + if(itemID and VendorQueue[itemID]) then + slot.JunkIcon:Show() + else + slot.JunkIcon:Hide() + end end + if(slot.questIcon) then slot.questIcon:Hide(); end - local texture, count, locked, rarity = GetContainerItemInfo(bag, slotID); - local start, duration, enable = GetContainerItemCooldown(bag, slotID); - local itemLink = GetContainerItemLink(bag, slotID); - CooldownFrame_SetTimer(slot.cooldown, start, duration, enable); if(duration > 0 and enable == 0) then @@ -340,8 +347,6 @@ local SlotUpdate = function(self, slotID) slot:SetBackdropColor(0, 0, 0, 0.6) slot:SetBackdropBorderColor(0, 0, 0, 1) end - elseif(not texture) then - GameTooltip:Hide() end if(bagType) then @@ -444,7 +449,7 @@ local ContainerFrame_UpdateBags = function(self) for bagID, bag in pairs(self.Bags) do bag:RefreshSlots() end -end +end local ContainerFrame_UpdateLayout = function(self) if SV.db.SVBag.enable ~= true then return; end @@ -821,54 +826,89 @@ function MOD:UpdateGoldText() self.BagFrame.goldText:SetText(GetCoinTextureString(GetMoney(), 12)) end -function MOD:VendorGrays(arg1, arg2, arg3) - if(not MerchantFrame or not MerchantFrame:IsShown()) and not arg1 and not arg3 then +function MOD:VendorGrays(destroy, silent, request) + if((not MerchantFrame or not MerchantFrame:IsShown()) and (not destroy) and (not request)) then SV:AddonMessage(L["You must be at a vendor."]) return - end - local copper = 0; - local deleted = 0; - for i = 0, 4 do - for silver = 1, GetContainerNumSlots(i) do - local a2 = GetContainerItemLink(i, silver) - if a2 and select(11, GetItemInfo(a2)) then - local a3 = select(11, GetItemInfo(a2)) * select(2, GetContainerItemInfo(i, silver)) - if arg1 then - if find(a2, "ff9d9d9d") then - if not arg3 then - PickupContainerItem(i, silver) - DeleteCursorItem() - end - copper = copper + a3; - deleted = deleted + 1 - end - else - if select(3, GetItemInfo(a2)) == 0 and a3 > 0 then - if not arg3 then - UseContainerItem(i, silver) - PickupMerchantItem() + end + + local totalValue = 0; + local canDelete = 0; + + for bagID = 0, 4 do + for slot = 1, GetContainerNumSlots(bagID) do + local itemLink = GetContainerItemLink(bagID, slot) + if(itemLink) then + local name, link, quality, iLevel, reqLevel, class, subclass, maxStack, equipSlot, texture, vendorPrice = GetItemInfo(itemLink) + if(vendorPrice) then + local itemCount = select(2, GetContainerItemInfo(bagID, slot)) + local sellPrice = vendorPrice * itemCount + local itemID = GetContainerItemID(bagID, slot); + if(destroy) then + if(find(itemLink, "ff9d9d9d")) then + if(not request) then + PickupContainerItem(bagID, slot) + DeleteCursorItem() + end + totalValue = totalValue + sellPrice; + canDelete = canDelete + 1 + elseif(itemID and VendorQueue[itemID]) then + if(not request) then + VendorQueue[itemID] = nil + PickupContainerItem(bagID, slot) + DeleteCursorItem() + end + totalValue = totalValue + sellPrice; + canDelete = canDelete + 1 end - copper = copper + a3 - end - end + elseif(sellPrice > 0) then + if(quality == 0) then + if(not request) then + UseContainerItem(bagID, slot) + PickupMerchantItem() + end + totalValue = totalValue + sellPrice + elseif(itemID and VendorQueue[itemID]) then + if(not request) then + VendorQueue[itemID] = nil + UseContainerItem(bagID, slot) + PickupMerchantItem() + end + totalValue = totalValue + sellPrice + end + end + end end end - end - if arg3 then return copper end - local strMsg - if copper > 0 and not arg1 then - local gold, silver, copper = floor(copper / 10000) or 0, floor(copper%10000 / 100) or 0, copper%100; - strMsg = ("%s |cffffffff%s%s%s%s%s%s|r"):format(L["Vendored gray items for:"], gold, L["goldabbrev"], silver, L["silverabbrev"], copper, L["copperabbrev"]) - elseif not arg1 and not arg2 then - strMsg = L["No gray items to sell."] - elseif deleted > 0 then - local gold, silver, copper = floor(copper / 10000) or 0, floor(copper%10000 / 100) or 0, copper%100; - local prefix = ("|cffffffff%s%s%s%s%s%s|r"):format(gold, L["goldabbrev"], silver, L["silverabbrev"], copper, L["copperabbrev"]) - strMsg = (L["Deleted %d gray items. Total Worth: %s"]):format(deleted, prefix) - elseif not arg2 then - strMsg = L["No gray items to delete."] end - SV:AddonMessage(strMsg) + + if request then return totalValue end + + if(not silent) then + if(totalValue > 0) then + local prefix, strMsg + local gold, silver, copper = floor(totalValue / 10000) or 0, floor(totalValue%10000 / 100) or 0, totalValue%100; + + if(not destroy) then + strMsg = ("%s |cffffffff%s%s%s%s%s%s|r"):format(L["Vendored gray items for:"], gold, L["goldabbrev"], silver, L["silverabbrev"], copper, L["copperabbrev"]) + SV:AddonMessage(strMsg) + else + if(canDelete > 0) then + prefix = ("|cffffffff%s%s%s%s%s%s|r"):format(gold, L["goldabbrev"], silver, L["silverabbrev"], copper, L["copperabbrev"]) + strMsg = (L["Deleted %d gray items. Total Worth: %s"]):format(canDelete, prefix) + SV:AddonMessage(strMsg) + else + SV:AddonMessage(L["No gray items to delete."]) + end + end + else + if(not destroy) then + SV:AddonMessage(L["No gray items to sell."]) + else + SV:AddonMessage(L["No gray items to delete."]) + end + end + end end function MOD:ModifyBags() @@ -1732,8 +1772,8 @@ local function _closeBags() end local function _toggleBags(id) - if id and GetContainerNumSlots(id)==0 then return end - if MOD.BagFrame:IsShown() then + if(id and (GetContainerNumSlots(id) == 0)) then return end + if(MOD.BagFrame:IsShown()) then _closeBags() else _openBags() @@ -1749,6 +1789,24 @@ local function _toggleBackpack() end end +local _hook_OnModifiedClick = function(self, button) + if(MerchantFrame and MerchantFrame:IsShown()) then return end; + if(IsAltKeyDown() and (button == "RightButton")) then + local slotID = self:GetID() + local bagID = self:GetParent():GetID() + local itemID = GetContainerItemID(bagID, slotID); + if(itemID) then + if(VendorQueue[itemID]) then + if(self.JunkIcon) then self.JunkIcon:Hide() end + VendorQueue[itemID] = nil + else + if(self.JunkIcon) then self.JunkIcon:Show() end + VendorQueue[itemID] = true + end + end + end +end + function MOD:BANKFRAME_OPENED() if(not self.BankFrame) then self:MakeBankOrReagent() @@ -1904,6 +1962,7 @@ function MOD:Load() hooksecurefunc("ToggleAllBags", _toggleBackpack) hooksecurefunc("ToggleBackpack", _toggleBackpack) hooksecurefunc("BackpackTokenFrame_Update", self.RefreshTokens) + hooksecurefunc("ContainerFrameItemButton_OnModifiedClick", _hook_OnModifiedClick) self:RegisterEvent("BANKFRAME_OPENED") self:RegisterEvent("BANKFRAME_CLOSED") diff --git a/Interface/AddOns/SVUI/packages/henchmen/SVHenchmen.lua b/Interface/AddOns/SVUI/packages/henchmen/SVHenchmen.lua index 3f39e63..1a0c1e1 100644 --- a/Interface/AddOns/SVUI/packages/henchmen/SVHenchmen.lua +++ b/Interface/AddOns/SVUI/packages/henchmen/SVHenchmen.lua @@ -776,11 +776,11 @@ REPAIR AUTOMATONS ########################################################## ]]-- function MOD:MERCHANT_SHOW() - if SV.db.SVHenchmen.vendorGrays then SV.SVBag:VendorGrays(nil,true) end + if SV.db.SVHenchmen.vendorGrays then SV.SVBag:VendorGrays(nil, true) end local autoRepair = SV.db.SVHenchmen.autoRepair; if IsShiftKeyDown() or autoRepair == "NONE" or not CanMerchantRepair() then return end local repairCost,canRepair=GetRepairAllCost() - local loan=GetGuildBankWithdrawMoney() + local loan = GetGuildBankWithdrawMoney() if autoRepair == "GUILD" and (not CanGuildBankRepair() or (repairCost > loan)) then autoRepair = "PLAYER" end if repairCost > 0 then if canRepair then diff --git a/Interface/AddOns/SVUI/packages/override/SVOverride.lua b/Interface/AddOns/SVUI/packages/override/SVOverride.lua index 07194c9..8b6e390 100644 --- a/Interface/AddOns/SVUI/packages/override/SVOverride.lua +++ b/Interface/AddOns/SVUI/packages/override/SVOverride.lua @@ -1033,7 +1033,7 @@ function MOD:Load() TicketStatusFrame:ClearAllPoints() TicketStatusFrame:SetPoint("TOPRIGHT", SV.Dock.TopLeft, "TOPRIGHT", 0, 0) - SV.Mentalo:Add(TicketStatusFrame, L["GM Ticket Frame"], nil, nil, nil, nil, "GM") + SV.Mentalo:Add(TicketStatusFrame, L["GM Ticket Frame"], nil, nil, "GM") HelpOpenTicketButton:SetParent(Minimap) HelpOpenTicketButton:ClearAllPoints() HelpOpenTicketButton:SetPoint("TOPRIGHT", Minimap, "TOPRIGHT") @@ -1064,7 +1064,7 @@ function MOD:Load() SVUI_AlertFrame:SetParent(SV.Screen) SVUI_AlertFrame:SetPoint("TOP", SV.Dock.TopCenter, "BOTTOM", 0, -115); - SV.Mentalo:Add(SVUI_AlertFrame, L["Loot / Alert Frames"], nil, nil, AlertFramePostMove_Hook) + SV.Mentalo:Add(SVUI_AlertFrame, L["Loot / Alert Frames"], nil, AlertFramePostMove_Hook) NewHook('AlertFrame_FixAnchors', AlertFramePostMove_Hook) NewHook('AlertFrame_SetLootAnchors', _hook_AlertFrame_SetLootAnchors) NewHook('AlertFrame_SetLootWonAnchors', _hook_AlertFrame_SetLootWonAnchors) @@ -1080,7 +1080,7 @@ function MOD:Load() LootFrame:UnregisterAllEvents(); SVUI_LootFrame:SetFixedPanelTemplate('Transparent'); SVUI_LootFrame.title:SetFont(LSM:Fetch("font", "SVUI Number Font"),18,"OUTLINE") - SV.Mentalo:Add(SVUI_LootFrameHolder, L["Loot Frame"], nil, nil, nil, nil, "SVUI_LootFrame"); + SV.Mentalo:Add(SVUI_LootFrameHolder, L["Loot Frame"], nil, nil, "SVUI_LootFrame"); SV:AddToDisplayAudit(SVUI_LootFrame); SVUI_LootFrame:Hide(); @@ -1135,5 +1135,5 @@ function MOD:Load() LossOfControlFrame:ClearAllPoints() LossOfControlFrame:SetPoint("TOP", SV.Screen, "TOP", 0, -225) - SV.Mentalo:Add(LossOfControlFrame, L["Loss Control Icon"], nil, nil, nil, nil, "LoC") + SV.Mentalo:Add(LossOfControlFrame, L["Loss Control Icon"], nil, nil, "LoC") end \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/tip/SVTip.lua b/Interface/AddOns/SVUI/packages/tip/SVTip.lua index eb5f6c3..eab29da 100644 --- a/Interface/AddOns/SVUI/packages/tip/SVTip.lua +++ b/Interface/AddOns/SVUI/packages/tip/SVTip.lua @@ -470,30 +470,28 @@ local _hook_GameTooltipStatusBar_OnValueChanged = function(self, value) end local _hook_GameTooltip_OnTooltipSetItem = function(self) - if not self.itemCleared then + local key,itemID = self:GetItem() + if(key and (not self.itemCleared)) then self.SuperBorder:ClearMaskColors() - local key,itemID = self:GetItem() - if(key) then - local quality = select(3, GetItemInfo(key)) - if(quality) then - local r,g,b = GetItemQualityColor(quality) - self.SuperBorder:SetToneColor(r,g,b) - end + + local quality = select(3, GetItemInfo(key)) + if(quality) then + local r,g,b = GetItemQualityColor(quality) + self.SuperBorder:SetToneColor(r,g,b) end - local left = ""; - local right = ""; - if itemID ~= nil and SV.db.SVTip.spellID then - left = "|cFFCA3C3CSpell ID: |r" - right = ("|cFFCA3C3C%s|r %s"):format(ID,itemID):match(":(%w+)") - end - if left ~= "" or right ~= "" then + + if itemID ~= nil and SV.db.SVTip.spellID then self:AddLine(" ") - self:AddDoubleLine(left,right) + left = "|cFFCA3C3CSpell ID: |r" + local tipID = ("|cFFCA3C3C%s|r %s"):format(ID,itemID):match(":(%w+)") + self:AddDoubleLine("|cFFCA3C3CSpell ID: |r", tipID) end + if(self.InjectedDouble[8]) then self:AddLine(" "); self:AddDoubleLine(unpack(self.InjectedDouble)); end + self.itemCleared = true end end @@ -596,7 +594,7 @@ local _hook_GameTooltip_SetDefaultAnchor = function(self, parent) self:SetOwner(parent, "ANCHOR_NONE") end end - if not SV.Mentalo:HasMoved("SVUI_ToolTip_MOVE")then + if(not SV.Mentalo:HasMoved("SVUI_ToolTip_MOVE")) then self:ClearAllPoints() if(SV.SVBag.BagFrame and SV.SVBag.BagFrame:IsShown()) then self:SetPoint("BOTTOMLEFT", SV.SVBag.BagFrame, "TOPLEFT", 0, 24) @@ -607,6 +605,7 @@ local _hook_GameTooltip_SetDefaultAnchor = function(self, parent) end else local point = Pinpoint(SVUI_ToolTip_MOVE) + self:ClearAllPoints() if(point == "TOPLEFT") then self:SetPoint("TOPLEFT", SVUI_ToolTip_MOVE, "TOPLEFT", 0, 0) elseif(point == "TOPRIGHT") then @@ -617,7 +616,8 @@ local _hook_GameTooltip_SetDefaultAnchor = function(self, parent) self:SetPoint("BOTTOMRIGHT", SVUI_ToolTip_MOVE, "BOTTOMRIGHT", 0, 0) end end -end +end + MOD.GameTooltip_SetDefaultAnchor = _hook_GameTooltip_SetDefaultAnchor local _hook_BNToastOnShow = function(self,anchor,parent,relative,x,y) @@ -882,7 +882,7 @@ end function MOD:Load() BNToastFrame:ClearAllPoints() BNToastFrame:Point("BOTTOMRIGHT", SV.Dock.BottomLeft, "TOPRIGHT", 0, 20) - SV.Mentalo:Add(BNToastFrame, L["BattleNet Frame"], nil, nil, nil, nil, "BattleNetToasts") + SV.Mentalo:Add(BNToastFrame, L["BattleNet Frame"], nil, nil, "BattleNetToasts") NewHook(BNToastFrame, "SetPoint", _hook_BNToastOnShow) if not SV.db.SVTip.enable then return end diff --git a/Interface/AddOns/SVUI/packages/tools/components/garrison.lua b/Interface/AddOns/SVUI/packages/tools/components/garrison.lua index a9117d6..2213d03 100644 --- a/Interface/AddOns/SVUI/packages/tools/components/garrison.lua +++ b/Interface/AddOns/SVUI/packages/tools/components/garrison.lua @@ -107,9 +107,15 @@ end local function GarrisonButton_OnEvent(self, event, ...) if (event == "GARRISON_HIDE_LANDING_PAGE") then - if(not InCombatLockdown()) then SVUI_Garrison:Hide() end; + if(not InCombatLockdown() and SVUI_Garrison:IsShown()) then + SVUI_Garrison.Parent:SetWidth(SVUI_Garrison.Parent:GetWidth() - SVUI_Garrison:GetWidth()) + SVUI_Garrison:Hide() + end; elseif (event == "GARRISON_SHOW_LANDING_PAGE") then - if(not InCombatLockdown()) then SVUI_Garrison:Show() end; + if(not InCombatLockdown() and (not SVUI_Garrison:IsShown())) then + SVUI_Garrison.Parent:SetWidth(SVUI_Garrison.Parent:GetWidth() + SVUI_Garrison:GetWidth()) + SVUI_Garrison:Show() + end; elseif ( event == "GARRISON_BUILDING_ACTIVATABLE" ) then SVUI_Garrison:StartAlert(); elseif ( event == "GARRISON_BUILDING_ACTIVATED" or event == "GARRISON_ARCHITECT_OPENED") then @@ -130,6 +136,10 @@ local function GarrisonButton_OnEvent(self, event, ...) end end +function MOD:GARRISON_UPDATE() + C_Garrison.RequestLandingPageShipmentInfo() +end + local function getColoredString(text, color) local hex = SV:HexColor(color) return ("|cff%s%s|r"):format(hex, text) @@ -210,6 +220,7 @@ local function GetBuildingData() local name, texture, shipmentCapacity, shipmentsReady, shipmentsTotal, creationTime, duration, timeleftString, itemName, itemIcon, itemQuality, itemID = C_Garrison.GetLandingPageShipmentInfo(buildingID) if(shipmentsReady and shipmentsReady > 0) then building = ("|cffFFFF00%s|r|cff888888 - |r|cffFF5500%s|r"):format(rank, name); + timeleftString = timeleftString or 'Unknown' remaining = ("Ready: %s, Next: %s"):format(getColoredString(shipmentsReady, "green"), getColoredString(timeleftString, "lightgrey")) elseif(timeleftString) then building = ("|cffFFFF00%s|r|cff888888 - |r|cffFF5500%s|r"):format(rank, name); @@ -267,9 +278,15 @@ local function LoadToolBarGarrison() GarrisonLandingPageMinimapButton:SetPushedTexture("") GarrisonLandingPageMinimapButton:SetHighlightTexture("") + if(not GarrisonLandingPageMinimapButton:IsShown()) then + garrison.Parent:SetWidth(garrison.Parent:GetWidth() - garrison:GetWidth()) + garrison:Hide() + end + GarrisonLandingPageMinimapButton:HookScript("OnEvent", GarrisonButton_OnEvent) MOD.GarrisonLoaded = true + MOD:RegisterEvent("GARRISON_UPDATE"); end --[[ ########################################################## diff --git a/Interface/AddOns/SVUI/packages/unit/SVUnit.lua b/Interface/AddOns/SVUI/packages/unit/SVUnit.lua index 17a3c5a..7e3b69e 100644 --- a/Interface/AddOns/SVUI/packages/unit/SVUnit.lua +++ b/Interface/AddOns/SVUI/packages/unit/SVUnit.lua @@ -812,17 +812,17 @@ function MOD:RefreshUnitLayout(frame, template) castbar.LatencyTexture:Hide() end - if castbar.Grip then - castbar.Grip:Width(castHeight + 2) - castbar.Grip:Height(castHeight + 2) + if castbar.Organizer then + castbar.Organizer:Width(castHeight + 2) + castbar.Organizer:Height(castHeight + 2) end if castbar.Icon then if db.castbar.icon then - castbar.Grip.Icon:SetAllPoints(castbar.Grip) - castbar.Grip.Icon:Show() + castbar.Organizer.Icon:SetAllPoints(castbar.Organizer) + castbar.Organizer.Icon:Show() else - castbar.Grip.Icon:Hide() + castbar.Organizer.Icon:Hide() end end diff --git a/Interface/AddOns/SVUI/packages/unit/elements/castbar.lua b/Interface/AddOns/SVUI/packages/unit/elements/castbar.lua index 8aab0aa..e1b0eeb 100644 --- a/Interface/AddOns/SVUI/packages/unit/elements/castbar.lua +++ b/Interface/AddOns/SVUI/packages/unit/elements/castbar.lua @@ -512,12 +512,12 @@ function MOD:CreateCastbar(frame, reversed, moverName, ryu, useFader, isBoss) local cbName = frame:GetName().."Castbar" local castbarHolder = CreateFrame("Frame", cbName, castbar) - local grip = CreateFrame("Frame", nil, castbar) - grip:SetFrameStrata("HIGH") + local organizer = CreateFrame("Frame", nil, castbar) + organizer:SetFrameStrata("HIGH") - local iconHolder = CreateFrame("Frame", nil, grip) + local iconHolder = CreateFrame("Frame", nil, organizer) iconHolder:SetFixedPanelTemplate("Inset", false) - grip.Icon = iconHolder + organizer.Icon = iconHolder local buttonIcon = iconHolder:CreateTexture(nil, "BORDER") buttonIcon:FillInner() @@ -530,13 +530,13 @@ function MOD:CreateCastbar(frame, reversed, moverName, ryu, useFader, isBoss) shieldIcon:SetTexture("Interface\\Addons\\SVUI\\assets\\artwork\\Unitframe\\Castbar\\SHIELD") castbar.Shield = shieldIcon; - castbar.Time = grip:CreateFontString(nil, "OVERLAY") + castbar.Time = organizer:CreateFontString(nil, "OVERLAY") castbar.Time:SetDrawLayer("OVERLAY", 7) - castbar.Text = grip:CreateFontString(nil, "OVERLAY") + castbar.Text = organizer:CreateFontString(nil, "OVERLAY") castbar.Text:SetDrawLayer("OVERLAY", 7) - castbar.Grip = grip + castbar.Organizer = organizer local bgFrame = CreateFrame("Frame", nil, castbar) @@ -598,7 +598,7 @@ function MOD:CreateCastbar(frame, reversed, moverName, ryu, useFader, isBoss) SV.Animate:Sprite(hadouken[2],false,false,true) castbar:Point("BOTTOMLEFT", castbarHolder, "BOTTOMLEFT", 1, 1) - grip:Point("LEFT", castbar, "RIGHT", 4, 0) + organizer:Point("LEFT", castbar, "RIGHT", 4, 0) castbar.Time:Point("RIGHT", castbar, "LEFT", -4, 0) castbar.Time:SetJustifyH("CENTER") @@ -634,13 +634,13 @@ function MOD:CreateCastbar(frame, reversed, moverName, ryu, useFader, isBoss) SV.Animate:Sprite(hadouken[2],false,false,true) castbar:Point("BOTTOMRIGHT", castbarHolder, "BOTTOMRIGHT", -1, 1) - grip:Point("RIGHT", castbar, "LEFT", -4, 0) + organizer:Point("RIGHT", castbar, "LEFT", -4, 0) castbar.Time:Point("LEFT", castbar, "RIGHT", 4, 0) castbar.Time:SetJustifyH("CENTER") end - -- castbar.Time:Point("CENTER", grip, "CENTER", 0, 0) + -- castbar.Time:Point("CENTER", organizer, "CENTER", 0, 0) -- castbar.Time:SetJustifyH("CENTER") castbar.Text:SetPoint("CENTER", castbar, "CENTER", 0, 0) @@ -671,9 +671,9 @@ function MOD:CreateCastbar(frame, reversed, moverName, ryu, useFader, isBoss) if reversed then castbar:SetReverseFill(true) - grip:Point("LEFT", castbar, "RIGHT", 6, 0) + organizer:Point("LEFT", castbar, "RIGHT", 6, 0) else - grip:Point("RIGHT", castbar, "LEFT", -6, 0) + organizer:Point("RIGHT", castbar, "LEFT", -6, 0) end end @@ -716,7 +716,7 @@ function MOD:CreateCastbar(frame, reversed, moverName, ryu, useFader, isBoss) castbar.SparkColor = oUF_Villain.colors.spark if moverName then - SV.Mentalo:Add(castbar.Holder, moverName, nil, -6, nil, "ALL, SOLO") + SV.Mentalo:Add(castbar.Holder, moverName, -6) end if useFader then diff --git a/Interface/AddOns/SVUI/packages/unit/elements/misc.lua b/Interface/AddOns/SVUI/packages/unit/elements/misc.lua index 22d7bca..98e63cc 100644 --- a/Interface/AddOns/SVUI/packages/unit/elements/misc.lua +++ b/Interface/AddOns/SVUI/packages/unit/elements/misc.lua @@ -396,14 +396,14 @@ TARGET ONLY COMPONENTS ########################################################## ]]-- function MOD:CreateXRay(frame) - local xray=CreateFrame("BUTTON","XRayFocus",frame,"SecureActionButtonTemplate") + local xray = CreateFrame("BUTTON","XRayFocus",frame,"SecureActionButtonTemplate") xray:EnableMouse(true) xray:RegisterForClicks("AnyUp") xray:SetAttribute("type","macro") xray:SetAttribute("macrotext","/focus") xray:Size(64,64) - xray:SetFrameStrata("DIALOG") - xray.icon=xray:CreateTexture(nil,"ARTWORK") + xray:SetFrameStrata("MEDIUM") + xray.icon = xray:CreateTexture(nil,"ARTWORK") xray.icon:SetTexture("Interface\\Addons\\SVUI\\assets\\artwork\\Unitframe\\UNIT-XRAY") xray.icon:SetAllPoints(xray) xray.icon:SetAlpha(0) @@ -422,14 +422,14 @@ function MOD:CreateXRay(frame) end function MOD:CreateXRay_Closer(frame) - local close=CreateFrame("BUTTON","ClearXRay",frame,"SecureActionButtonTemplate") + local close = CreateFrame("BUTTON","ClearXRay",frame,"SecureActionButtonTemplate") close:EnableMouse(true) close:RegisterForClicks("AnyUp") close:SetAttribute("type","macro") close:SetAttribute("macrotext","/clearfocus") close:Size(50,50) - close:SetFrameStrata("DIALOG") - close.icon=close:CreateTexture(nil,"ARTWORK") + close:SetFrameStrata("MEDIUM") + close.icon = close:CreateTexture(nil,"ARTWORK") close.icon:SetTexture("Interface\\Addons\\SVUI\\assets\\artwork\\Unitframe\\UNIT-XRAY-CLOSE") close.icon:SetAllPoints(close) close.icon:SetVertexColor(1,0.2,0.1) diff --git a/Interface/AddOns/SVUI/packages/unit/frames.lua b/Interface/AddOns/SVUI/packages/unit/frames.lua index 507ea68..91063a1 100644 --- a/Interface/AddOns/SVUI/packages/unit/frames.lua +++ b/Interface/AddOns/SVUI/packages/unit/frames.lua @@ -320,7 +320,7 @@ CONSTRUCTORS["player"] = function(self, unit) self.AuraBars = MOD:CreateAuraBarHeader(self, key) self.CombatFade = true; self:Point("BOTTOMLEFT", SV.Screen, "BOTTOM", -413, 182) - SV.Mentalo:Add(self, L["Player Frame"], nil, nil, nil, "ALL, SOLO") + SV.Mentalo:Add(self, L["Player Frame"]) self.MediaUpdate = MOD.RefreshUnitMedia self.Update = UpdatePlayerFrame @@ -378,9 +378,9 @@ local UpdateTargetFrame = function(self) comboBar:SetParent(SV.Screen) end - if comboBar.Avatar then - comboBar.Avatar:SetScale(0.000001) - comboBar.Avatar:SetAlpha(0) + if comboBar.Grip then + comboBar.Grip:SetScale(0.000001) + comboBar.Grip:SetAlpha(0) end if USE_COMBOBAR and not self:IsElementEnabled("HyperCombo")then @@ -436,7 +436,7 @@ CONSTRUCTORS["target"] = function(self, unit) self.XRay = MOD:CreateXRay(self) self.XRay:SetPoint("TOPRIGHT", 12, 12) self:Point("BOTTOMRIGHT", SV.Screen, "BOTTOM", 413, 182) - SV.Mentalo:Add(self, L["Target Frame"], nil, nil, nil, "ALL, SOLO") + SV.Mentalo:Add(self, L["Target Frame"]) self.MediaUpdate = MOD.RefreshUnitMedia self.Update = UpdateTargetFrame @@ -478,7 +478,7 @@ CONSTRUCTORS["targettarget"] = function(self, unit) self.RaidIcon = MOD:CreateRaidIcon(self) self.Range = { insideAlpha = 1, outsideAlpha = 1 } self:Point("BOTTOM", SV.Screen, "BOTTOM", 0, 213) - SV.Mentalo:Add(self, L["TargetTarget Frame"], nil, nil, nil, "ALL, SOLO") + SV.Mentalo:Add(self, L["TargetTarget Frame"]) self.MediaUpdate = MOD.RefreshUnitMedia self.Update = UpdateTargetTargetFrame @@ -529,7 +529,7 @@ CONSTRUCTORS["pet"] = function(self, unit) self.RaidIcon = MOD:CreateRaidIcon(self) self.Range = { insideAlpha = 1, outsideAlpha = 1 } self:Point("BOTTOM", SV.Screen, "BOTTOM", 0, 182) - SV.Mentalo:Add(self, L["Pet Frame"], nil, nil, nil, "ALL, SOLO") + SV.Mentalo:Add(self, L["Pet Frame"]) self.MediaUpdate = MOD.RefreshUnitMedia self.Update = UpdatePetFrame return self @@ -573,7 +573,7 @@ CONSTRUCTORS["pettarget"] = function(self, unit) self.Debuffs = MOD:CreateDebuffs(self, key) self.Range = { insideAlpha = 1, outsideAlpha = 1 } self:Point("BOTTOM", SVUI_Pet, "TOP", 0, 7) - SV.Mentalo:Add(self, L["PetTarget Frame"], nil, -7, nil, "ALL, SOLO") + SV.Mentalo:Add(self, L["PetTarget Frame"], -7) self.MediaUpdate = MOD.RefreshUnitMedia self.Update = UpdatePetTargetFrame @@ -637,7 +637,7 @@ CONSTRUCTORS["focus"] = function(self, unit) self.XRay = MOD:CreateXRay_Closer(self) self.XRay:SetPoint("RIGHT", 20, 0) self:Point("BOTTOMRIGHT", SVUI_Target, "TOPRIGHT", 0, 220) - SV.Mentalo:Add(self, L["Focus Frame"], nil, nil, nil, "ALL, SOLO") + SV.Mentalo:Add(self, L["Focus Frame"]) self.MediaUpdate = MOD.RefreshUnitMedia self.Update = UpdateFocusFrame @@ -678,7 +678,7 @@ CONSTRUCTORS["focustarget"] = function(self, unit) self.RaidIcon = MOD:CreateRaidIcon(self) self.Range = { insideAlpha = 1, outsideAlpha = 1 } self:Point("BOTTOM", SVUI_Focus, "TOP", 0, 7) - SV.Mentalo:Add(self, L["FocusTarget Frame"], nil, -7, nil, "ALL, SOLO") + SV.Mentalo:Add(self, L["FocusTarget Frame"], -7) self.MediaUpdate = MOD.RefreshUnitMedia self.Update = UpdateFocusTargetFrame @@ -755,7 +755,7 @@ CONSTRUCTORS["boss"] = function(self, unit) if(not _G["SVUI_Boss_MOVE"]) then self:Point("RIGHT", SV.Screen, "RIGHT", -105, 0) - SV.Mentalo:Add(self, L["Boss Frames"], nil, nil, nil, "ALL, PARTY, RAID10, RAID25, RAID40", "SVUI_Boss") + SV.Mentalo:Add(self, L["Boss Frames"], nil, nil, "SVUI_Boss") else self:Point("TOPRIGHT", lastBossFrame, "BOTTOMRIGHT", 0, -20) end @@ -923,7 +923,7 @@ CONSTRUCTORS["arena"] = function(self, unit) if(not _G["SVUI_Arena_MOVE"]) then self:Point("RIGHT", SV.Screen, "RIGHT", -105, 0) - SV.Mentalo:Add(self, L["Arena Frames"], nil, nil, nil, "ALL, ARENA", "SVUI_Arena") + SV.Mentalo:Add(self, L["Arena Frames"], nil, nil, "SVUI_Arena") else self:Point("TOPRIGHT", lastArenaFrame, "BOTTOMRIGHT", 0, -20) end diff --git a/Interface/AddOns/SVUI/packages/unit/groups.lua b/Interface/AddOns/SVUI/packages/unit/groups.lua index eaf1b85..2f4c6fa 100644 --- a/Interface/AddOns/SVUI/packages/unit/groups.lua +++ b/Interface/AddOns/SVUI/packages/unit/groups.lua @@ -279,7 +279,7 @@ UpdateTemplates["party"] = function(self) groupFrame:ClearAllPoints() groupFrame:Point("BOTTOMLEFT", SV.Dock.BottomLeft, "TOPLEFT", 0, 80) RegisterStateDriver(groupFrame, "visibility", "[group:raid][nogroup] hide;show") - SV.Mentalo:Add(groupFrame, L['Party Frames'], nil, nil, nil, 'ALL,PARTY,ARENA'); + SV.Mentalo:Add(groupFrame, L['Party Frames']); groupFrame.positioned = true; end @@ -516,7 +516,7 @@ UpdateTemplates["raidpet"] = function(self) groupFrame:ClearAllPoints() groupFrame:Point("BOTTOMLEFT", SV.Screen, "BOTTOMLEFT", 4, 433) RegisterStateDriver(groupFrame, "visibility", "[group:raid] show; hide") - SV.Mentalo:Add(groupFrame, L["Raid Pet Frames"], nil, nil, nil, "ALL, RAID10, RAID25, RAID40") + SV.Mentalo:Add(groupFrame, L["Raid Pet Frames"]) groupFrame.positioned = true; end @@ -656,8 +656,8 @@ UpdateTemplates["tank"] = function(self) if not self.positioned then self:ClearAllPoints() self:Point("BOTTOMLEFT", SV.Dock.TopLeft, "BOTTOMLEFT", 0, 0) - SV.Mentalo:Add(self, L["Tank Frames"], nil, nil, nil, "ALL, RAID10, RAID25, RAID40") - self.Avatar.positionOverride = "TOPLEFT" + SV.Mentalo:Add(self, L["Tank Frames"]) + self.Grip.positionOverride = "TOPLEFT" self:SetAttribute("minHeight", self.dirtyHeight) self:SetAttribute("minWidth", self.dirtyWidth) self.positioned = true @@ -766,8 +766,8 @@ UpdateTemplates["assist"] = function(self) if not self.positioned then self:ClearAllPoints() self:Point("TOPLEFT", SV.Dock.TopLeft, "BOTTOMLEFT", 0, -10) - SV.Mentalo:Add(self, L["Assist Frames"], nil, nil, nil, "ALL, RAID10, RAID25, RAID40") - self.Avatar.positionOverride = "TOPLEFT" + SV.Mentalo:Add(self, L["Assist Frames"]) + self.Grip.positionOverride = "TOPLEFT" self:SetAttribute("minHeight", self.dirtyHeight) self:SetAttribute("minWidth", self.dirtyWidth) self.positioned = true @@ -1146,7 +1146,7 @@ function MOD:SetGroupFrame(token, forceUpdate) groupFrame:SetVisibility() - if(forceUpdate or not groupFrame.Avatar) then + if(forceUpdate or not groupFrame.Grip) then groupFrame:Configure() if(not groupFrame.isForced and settings.visibility) then RegisterStateDriver(groupFrame, "visibility", settings.visibility) diff --git a/Interface/AddOns/SVUI/packages/unit/resources/deathknight.lua b/Interface/AddOns/SVUI/packages/unit/resources/deathknight.lua index 113f4c7..fe3148a 100644 --- a/Interface/AddOns/SVUI/packages/unit/resources/deathknight.lua +++ b/Interface/AddOns/SVUI/packages/unit/resources/deathknight.lua @@ -125,7 +125,7 @@ function MOD:CreateClassBar(playerFrame) classBarHolder:Point("TOPLEFT", playerFrame, "BOTTOMLEFT", 0, -2) bar:SetPoint("TOPLEFT", classBarHolder, "TOPLEFT", 0, 0) bar.Holder = classBarHolder - SV.Mentalo:Add(bar.Holder, L["Classbar"], nil, nil, nil, "ALL, SOLO") + SV.Mentalo:Add(bar.Holder, L["Classbar"]) playerFrame.MaxClassPower = max; playerFrame.ClassBarRefresh = Reposition; diff --git a/Interface/AddOns/SVUI/packages/unit/resources/druid.lua b/Interface/AddOns/SVUI/packages/unit/resources/druid.lua index 7a64009..d72b96f 100644 --- a/Interface/AddOns/SVUI/packages/unit/resources/druid.lua +++ b/Interface/AddOns/SVUI/packages/unit/resources/druid.lua @@ -271,7 +271,7 @@ function MOD:CreateClassBar(playerFrame) classBarHolder:Point("TOPLEFT", playerFrame, "BOTTOMLEFT", 0, -2) bar:SetPoint("TOPLEFT", classBarHolder, "TOPLEFT", 0, 0) bar.Holder = classBarHolder - SV.Mentalo:Add(bar.Holder, L["Classbar"], nil, nil, nil, "ALL, SOLO") + SV.Mentalo:Add(bar.Holder, L["Classbar"]) playerFrame.ClassBarRefresh = Reposition; playerFrame.EclipseBar = bar diff --git a/Interface/AddOns/SVUI/packages/unit/resources/mage.lua b/Interface/AddOns/SVUI/packages/unit/resources/mage.lua index 9275f99..29e5597 100644 --- a/Interface/AddOns/SVUI/packages/unit/resources/mage.lua +++ b/Interface/AddOns/SVUI/packages/unit/resources/mage.lua @@ -191,7 +191,7 @@ function MOD:CreateClassBar(playerFrame) classBarHolder:Point("TOPLEFT", playerFrame, "BOTTOMLEFT", 0, -2) bar:SetPoint("TOPLEFT", classBarHolder, "TOPLEFT", 0, 0) bar.Holder = classBarHolder - SV.Mentalo:Add(bar.Holder, L["Classbar"], nil, nil, nil, "ALL, SOLO") + SV.Mentalo:Add(bar.Holder, L["Classbar"]) playerFrame.MaxClassPower = max; playerFrame.ClassBarRefresh = Reposition; diff --git a/Interface/AddOns/SVUI/packages/unit/resources/monk.lua b/Interface/AddOns/SVUI/packages/unit/resources/monk.lua index e90a137..59464f9 100644 --- a/Interface/AddOns/SVUI/packages/unit/resources/monk.lua +++ b/Interface/AddOns/SVUI/packages/unit/resources/monk.lua @@ -154,7 +154,7 @@ function MOD:CreateClassBar(playerFrame) classBarHolder:Point("TOPLEFT", playerFrame, "BOTTOMLEFT", 0, -2) bar:SetPoint("TOPLEFT", classBarHolder, "TOPLEFT", 0, 0) bar.Holder = classBarHolder - SV.Mentalo:Add(bar.Holder, L["Classbar"], nil, nil, nil, "ALL, SOLO") + SV.Mentalo:Add(bar.Holder, L["Classbar"]) playerFrame.MaxClassPower = max playerFrame.DrunkenMaster = CreateDrunkenMasterBar(playerFrame) diff --git a/Interface/AddOns/SVUI/packages/unit/resources/paladin.lua b/Interface/AddOns/SVUI/packages/unit/resources/paladin.lua index 0834db8..6d1d0a5 100644 --- a/Interface/AddOns/SVUI/packages/unit/resources/paladin.lua +++ b/Interface/AddOns/SVUI/packages/unit/resources/paladin.lua @@ -183,7 +183,7 @@ function MOD:CreateClassBar(playerFrame) classBarHolder:Point("TOPLEFT", playerFrame, "BOTTOMLEFT", 0, -2) bar:SetPoint("TOPLEFT", classBarHolder, "TOPLEFT", 0, 0) bar.Holder = classBarHolder - SV.Mentalo:Add(bar.Holder, L["Classbar"], nil, nil, nil, "ALL, SOLO") + SV.Mentalo:Add(bar.Holder, L["Classbar"]) playerFrame.MaxClassPower = max; playerFrame.ClassBarRefresh = Reposition; diff --git a/Interface/AddOns/SVUI/packages/unit/resources/priest.lua b/Interface/AddOns/SVUI/packages/unit/resources/priest.lua index 394199a..97cd3dc 100644 --- a/Interface/AddOns/SVUI/packages/unit/resources/priest.lua +++ b/Interface/AddOns/SVUI/packages/unit/resources/priest.lua @@ -155,7 +155,7 @@ function MOD:CreateClassBar(playerFrame) classBarHolder:Point("TOPLEFT", playerFrame, "BOTTOMLEFT", 0, -2) bar:SetPoint("TOPLEFT", classBarHolder, "TOPLEFT", 0, 0) bar.Holder = classBarHolder - SV.Mentalo:Add(bar.Holder, L["Classbar"], nil, nil, nil, "ALL, SOLO") + SV.Mentalo:Add(bar.Holder, L["Classbar"]) playerFrame.MaxClassPower = max; playerFrame.ClassBarRefresh = Reposition; diff --git a/Interface/AddOns/SVUI/packages/unit/resources/rogue.lua b/Interface/AddOns/SVUI/packages/unit/resources/rogue.lua index 277931d..3acb49d 100644 --- a/Interface/AddOns/SVUI/packages/unit/resources/rogue.lua +++ b/Interface/AddOns/SVUI/packages/unit/resources/rogue.lua @@ -258,7 +258,7 @@ function MOD:CreateClassBar(playerFrame) classBarHolder:Point("TOPLEFT", playerFrame, "BOTTOMLEFT", 0, -2) bar:SetPoint("TOPLEFT", classBarHolder, "TOPLEFT", 0, 0) bar.Holder = classBarHolder - SV.Mentalo:Add(bar.Holder, L["Classbar"], nil, nil, nil, "ALL, SOLO") + SV.Mentalo:Add(bar.Holder, L["Classbar"]) playerFrame.MaxClassPower = 5; playerFrame.ClassBarRefresh = RepositionTracker; diff --git a/Interface/AddOns/SVUI/packages/unit/resources/shaman.lua b/Interface/AddOns/SVUI/packages/unit/resources/shaman.lua index 51cd23b..8a4c9e8 100644 --- a/Interface/AddOns/SVUI/packages/unit/resources/shaman.lua +++ b/Interface/AddOns/SVUI/packages/unit/resources/shaman.lua @@ -117,7 +117,7 @@ function MOD:CreateClassBar(playerFrame) classBarHolder:Point("TOPLEFT", playerFrame, "BOTTOMLEFT", 0, -2) bar:SetPoint("TOPLEFT", classBarHolder, "TOPLEFT", 0, 0) bar.Holder = classBarHolder - SV.Mentalo:Add(bar.Holder, L["Classbar"], nil, nil, nil, "ALL, SOLO") + SV.Mentalo:Add(bar.Holder, L["Classbar"]) playerFrame.MaxClassPower = totemMax; playerFrame.ClassBarRefresh = Reposition; diff --git a/Interface/AddOns/SVUI/packages/unit/resources/warlock.lua b/Interface/AddOns/SVUI/packages/unit/resources/warlock.lua index eb0b4a3..3b937aa 100644 --- a/Interface/AddOns/SVUI/packages/unit/resources/warlock.lua +++ b/Interface/AddOns/SVUI/packages/unit/resources/warlock.lua @@ -360,7 +360,7 @@ function MOD:CreateClassBar(playerFrame) classBarHolder:Point("TOPLEFT", playerFrame, "BOTTOMLEFT", 0, -2) bar:SetPoint("TOPLEFT", classBarHolder, "TOPLEFT", 0, 0) bar.Holder = classBarHolder - SV.Mentalo:Add(bar.Holder, L["Classbar"], nil, nil, nil, "ALL, SOLO") + SV.Mentalo:Add(bar.Holder, L["Classbar"]) playerFrame.MaxClassPower = max; playerFrame.ClassBarRefresh = Reposition; diff --git a/Interface/AddOns/SVUI/system/media.lua b/Interface/AddOns/SVUI/system/media.lua index 6274306..c949a0a 100644 --- a/Interface/AddOns/SVUI/system/media.lua +++ b/Interface/AddOns/SVUI/system/media.lua @@ -156,6 +156,7 @@ do ["highlight"] = {0.1, 0.8, 0.8, 1}, ["green"] = {0.25, 0.9, 0.08, 1}, ["blue"] = {0.08, 0.25, 0.9, 1}, + ["tan"] = {0.4, 0.32, 0.23, 1}, ["red"] = {0.9, 0.08, 0.08, 1}, ["yellow"] = {1, 1, 0, 1}, ["transparent"] = {0, 0, 0, 0.5}, @@ -207,6 +208,7 @@ do ["green"] = {"VERTICAL", 0.08, 0.5, 0, 0.25, 0.9, 0.08}, ["red"] = {"VERTICAL", 0.5, 0, 0, 0.9, 0.08, 0.08}, ["yellow"] = {"VERTICAL", 1, 0.3, 0, 1, 1, 0}, + ["tan"] = {"VERTICAL", 0.15, 0.08, 0, 0.37, 0.22, 0.1}, ["inverse"] = {"VERTICAL", 0.25, 0.25, 0.25, 0.12, 0.12, 0.12}, ["icon"] = {"VERTICAL", 0.5, 0.53, 0.55, 0.8, 0.8, 1}, ["white"] = {"VERTICAL", 0.75, 0.75, 0.75, 1, 1, 1}, diff --git a/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.lua b/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.lua index ff226e3..ad83198 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.lua @@ -307,7 +307,7 @@ SV.Options.args.common = { type = 'toggle', name = L["Enable Comic Popups"], get = function(j)return SV.db.general.comix end, - set = function(j,value) SV.db.general.comix = value; SV.Comix:Toggle(value) end + set = function(j,value) SV.db.general.comix = value; SV.Comix:Toggle() end }, bigComix = { order = 1, diff --git a/Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.lua b/Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.lua index 0e86238..37a9d10 100644 --- a/Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.lua +++ b/Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.lua @@ -153,7 +153,7 @@ local ModeCapture_PostClickHandler = function(self, button) return end ClearOverrideBindings(self) - self.Grip:Hide() + self.Handler:Hide() end local ModeCapture_EventHandler = function(self, event, ...) @@ -170,10 +170,10 @@ local ModeCapture_EventHandler = function(self, event, ...) end end -local ModeHandler = CreateFrame("Frame") -ModeHandler:SetPoint("LEFT", UIParent, "RIGHT", 10000, 0) -local ModeCapture = CreateFrame("Button", "SVUI_ModeCaptureWindow", ModeHandler, "SecureActionButtonTemplate") -ModeCapture.Grip = ModeHandler +local Handler = CreateFrame("Frame") +Handler:SetPoint("LEFT", UIParent, "RIGHT", 10000, 0) +local ModeCapture = CreateFrame("Button", "SVUI_ModeCaptureWindow", Handler, "SecureActionButtonTemplate") +ModeCapture.Handler = Handler ModeCapture:EnableMouse(true) ModeCapture:RegisterForClicks("RightButtonUp") ModeCapture:RegisterEvent("PLAYER_ENTERING_WORLD") diff --git a/Interface/AddOns/SVUI_CraftOMatic/components/archaeology.lua b/Interface/AddOns/SVUI_CraftOMatic/components/archaeology.lua index 1de1163..e8c234e 100644 --- a/Interface/AddOns/SVUI_CraftOMatic/components/archaeology.lua +++ b/Interface/AddOns/SVUI_CraftOMatic/components/archaeology.lua @@ -412,7 +412,7 @@ function PLUGIN.Archaeology:Bind() PLUGIN.ModeAlert.HelpText = 'Double-Right-Click anywhere on the screen to open the artifacts window.' end SetOverrideBindingClick(_G["SVUI_ModeCaptureWindow"], true, "BUTTON2", "SVUI_ModeCaptureWindow"); - _G["SVUI_ModeCaptureWindow"].Grip:Show(); + _G["SVUI_ModeCaptureWindow"].Handler:Show(); end end diff --git a/Interface/AddOns/SVUI_CraftOMatic/components/cooking.lua b/Interface/AddOns/SVUI_CraftOMatic/components/cooking.lua index 699cca4..3f25b1f 100644 --- a/Interface/AddOns/SVUI_CraftOMatic/components/cooking.lua +++ b/Interface/AddOns/SVUI_CraftOMatic/components/cooking.lua @@ -210,7 +210,7 @@ function PLUGIN.Cooking:Bind() PLUGIN.ModeAlert.HelpText = 'Double-Right-Click to open the cooking window.' end SetOverrideBindingClick(_G["SVUI_ModeCaptureWindow"], true, "BUTTON2", "SVUI_ModeCaptureWindow"); - _G["SVUI_ModeCaptureWindow"].Grip:Show(); + _G["SVUI_ModeCaptureWindow"].Handler:Show(); end end diff --git a/Interface/AddOns/SVUI_CraftOMatic/components/fishing.lua b/Interface/AddOns/SVUI_CraftOMatic/components/fishing.lua index 8002160..1f8af1d 100644 --- a/Interface/AddOns/SVUI_CraftOMatic/components/fishing.lua +++ b/Interface/AddOns/SVUI_CraftOMatic/components/fishing.lua @@ -382,7 +382,7 @@ function PLUGIN.Fishing:Bind() PLUGIN.ModeAlert.HelpText = 'Double-Right-Click to fish.' end SetOverrideBindingClick(_G["SVUI_ModeCaptureWindow"], true, "BUTTON2", "SVUI_ModeCaptureWindow"); - _G["SVUI_ModeCaptureWindow"].Grip:Show(); + _G["SVUI_ModeCaptureWindow"].Handler:Show(); end end --[[ diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/garrison.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/garrison.lua index bc7b818..d8eccc1 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/garrison.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/garrison.lua @@ -37,6 +37,14 @@ local GarrisonButtonList = { STYLE ########################################################## ]]-- +local function AddFadeBanner(frame) + local bg = frame:CreateTexture(nil, "OVERLAY") + bg:SetPoint("TOPLEFT", frame, "TOPLEFT", 0, 0) + bg:SetPoint("BOTTOMRIGHT", frame, "RIGHT", 0, 0) + bg:SetTexture(1, 1, 1, 1) + bg:SetGradientAlpha("VERTICAL", 0, 0, 0, 0, 0, 0, 0, 0.9) +end + local _hook_ReagentUpdate = function(self) local reagents = GarrisonCapacitiveDisplayFrame.CapacitiveDisplay.Reagents; for i = 1, #reagents do @@ -55,6 +63,95 @@ local function LoadGarrisonStyle() return end + PLUGIN:ApplyWindowStyle(GarrisonMissionFrame, true) + PLUGIN:ApplyTabStyle(GarrisonMissionFrameTab1) + PLUGIN:ApplyTabStyle(GarrisonMissionFrameTab2) + + GarrisonLandingPage:RemoveTextures() + GarrisonLandingPage:SetPanelTemplate("Paper") + GarrisonLandingPage:SetPanelColor("tan") + + GarrisonLandingPage.FollowerTab:RemoveTextures() + GarrisonLandingPage.FollowerTab.AbilitiesFrame:RemoveTextures() + GarrisonLandingPage.FollowerTab:SetPanelTemplate("ModelBorder") + + GarrisonLandingPage.FollowerTab.Panel:ClearAllPoints() + GarrisonLandingPage.FollowerTab.Panel:SetPoint("TOPLEFT", GarrisonLandingPage.FollowerList.SearchBox, "TOPRIGHT", 10, 6) + GarrisonLandingPage.FollowerTab.Panel:SetPoint("BOTTOMRIGHT", GarrisonLandingPage, "BOTTOMRIGHT", -38, 30) + + GarrisonLandingPage.FollowerList:RemoveTextures() + GarrisonLandingPage.FollowerList:SetPanelTemplate('Inset', false, 4, 0, 0) + + PLUGIN:ApplyTabStyle(GarrisonLandingPageTab1, nil, 10, 4) + PLUGIN:ApplyTabStyle(GarrisonLandingPageTab2, nil, 10, 4) + local a1, p, a2, x, y = GarrisonLandingPageTab1:GetPoint() + GarrisonLandingPageTab1:SetPoint(a1, p, a2, x, (y - 15)) + + GarrisonLandingPageReportList:RemoveTextures() + GarrisonLandingPageReportList:SetPanelTemplate('Inset', false, 4, 0, 0) + + GarrisonLandingPageReport.Available:RemoveTextures(true) + GarrisonLandingPageReport.Available:SetButtonTemplate() + GarrisonLandingPageReport.Available:GetNormalTexture().SetAtlas = function() return end + + GarrisonLandingPageReport.InProgress:RemoveTextures(true) + GarrisonLandingPageReport.InProgress:SetButtonTemplate() + GarrisonLandingPageReport.InProgress:GetNormalTexture().SetAtlas = function() return end + + GarrisonMissionFrameMissions:RemoveTextures() + GarrisonMissionFrameMissions:SetFixedPanelTemplate("Inset") + GarrisonMissionFrameMissions.CompleteDialog.BorderFrame:RemoveTextures() + GarrisonMissionFrameMissions.CompleteDialog.BorderFrame:SetPanelTemplate('Halftone', false, 4, 0, 0) + GarrisonMissionFrameMissions.CompleteDialog.BorderFrame.Stage:RemoveTextures() + GarrisonMissionFrameMissions.CompleteDialog.BorderFrame.Stage:SetFixedPanelTemplate("Model") + GarrisonMissionFrameMissions.CompleteDialog.BorderFrame.ViewButton:RemoveTextures(true) + GarrisonMissionFrameMissions.CompleteDialog.BorderFrame.ViewButton:SetButtonTemplate() + + GarrisonMissionFrameMissionsListScrollFrame:RemoveTextures() + PLUGIN:ApplyScrollFrameStyle(GarrisonMissionFrameMissionsListScrollFrame) + + PLUGIN:ApplyTabStyle(GarrisonMissionFrameMissionsTab1, nil, 10, 4) + PLUGIN:ApplyTabStyle(GarrisonMissionFrameMissionsTab2, nil, 10, 4) + local a1, p, a2, x, y = GarrisonMissionFrameMissionsTab1:GetPoint() + GarrisonMissionFrameMissionsTab1:SetPoint(a1, p, a2, x, (y + 8)) + + GarrisonMissionFrameMissions.MaterialFrame:RemoveTextures() + GarrisonMissionFrameMissions.MaterialFrame:SetPanelTemplate("Inset", true, 1, -3, -3) + + GarrisonMissionFrame.FollowerTab:RemoveTextures() + GarrisonMissionFrame.FollowerTab:SetFixedPanelTemplate("ModelBorder") + + GarrisonMissionFrame.MissionTab:RemoveTextures() + GarrisonMissionFrame.MissionTab.MissionPage:RemoveTextures() + GarrisonMissionFrame.MissionTab.MissionPage:SetPanelTemplate('Paper', false, 4, 0, 0) + GarrisonMissionFrame.MissionTab.MissionPage:SetPanelColor("special") + + + GarrisonMissionFrame.MissionTab.MissionPage.Panel:ClearAllPoints() + GarrisonMissionFrame.MissionTab.MissionPage.Panel:SetPoint("TOPLEFT", GarrisonMissionFrame.MissionTab.MissionPage, "TOPLEFT", 0, 4) + GarrisonMissionFrame.MissionTab.MissionPage.Panel:SetPoint("BOTTOMRIGHT", GarrisonMissionFrame.MissionTab.MissionPage, "BOTTOMRIGHT", 0, -20) + + GarrisonMissionFrame.MissionTab.MissionPage.Stage:RemoveTextures() + AddFadeBanner(GarrisonMissionFrame.MissionTab.MissionPage.Stage) + GarrisonMissionFrame.MissionTab.MissionPage.StartMissionButton:RemoveTextures(true) + GarrisonMissionFrame.MissionTab.MissionPage.StartMissionButton:SetButtonTemplate() + + GarrisonMissionFrameFollowers:RemoveTextures() + GarrisonMissionFrameFollowers:SetPanelTemplate('Inset', false, 4, 0, 0) + GarrisonMissionFrameFollowers.MaterialFrame:RemoveTextures() + GarrisonMissionFrameFollowers.MaterialFrame:SetPanelTemplate("Inset", true, 1, -5, -7) + PLUGIN:ApplyEditBoxStyle(GarrisonMissionFrameFollowers.SearchBox) + + GarrisonMissionFrame.MissionComplete:RemoveTextures() + GarrisonMissionFrame.MissionComplete:SetPanelTemplate('Paper', false, 4, 0, 0) + GarrisonMissionFrame.MissionComplete:SetPanelColor("special") + GarrisonMissionFrame.MissionComplete.Stage:RemoveTextures() + GarrisonMissionFrame.MissionComplete.Stage.MissionInfo:RemoveTextures() + GarrisonMissionFrame.MissionComplete.Stage.FollowersFrame:RemoveTextures() + AddFadeBanner(GarrisonMissionFrame.MissionComplete.Stage) + GarrisonMissionFrame.MissionComplete.NextMissionButton:RemoveTextures(true) + GarrisonMissionFrame.MissionComplete.NextMissionButton:SetButtonTemplate() + --print("Test") local display = GarrisonCapacitiveDisplayFrame display:RemoveTextures(true) diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/quest.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/quest.lua index 56a49d3..21b0c20 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/quest.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/quest.lua @@ -161,6 +161,7 @@ local function QuestFrameStyle() QuestLogPopupDetailFrameScrollFrame:RemoveTextures() QuestProgressScrollFrame:RemoveTextures() + local width = QuestLogPopupDetailFrameScrollFrame:GetWidth() QuestLogPopupDetailFrame.ShowMapButton:SetWidth(width) QuestLogPopupDetailFrame.ShowMapButton:SetButtonTemplate() diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/style_methods.lua b/Interface/AddOns/SVUI_StyleOMatic/components/style_methods.lua index 0bcb3f8..7c9fb7f 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/components/style_methods.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/components/style_methods.lua @@ -95,6 +95,18 @@ function PLUGIN:ApplyWindowStyle(this, action, fullStrip) this:SetPanelTemplate(template) end +function PLUGIN:ApplyAdjustedWindowStyle(this, action, fullStrip, padding, xOffset, yOffset) + if(not this or (this and this.Panel)) then return end + local template = action and "Action" or "Halftone" + local baselevel = this:GetFrameLevel() + if(baselevel < 1) then + this:SetFrameLevel(1) + end + + this:RemoveTextures(fullStrip) + this:SetPanelTemplate(template, false, padding, xOffset, yOffset) +end + function PLUGIN:ApplyWindowHolder(this, fullStrip) if(not this or (this and this.Panel)) then return end local baselevel = this:GetFrameLevel() @@ -381,7 +393,7 @@ local Tab_OnLeave = function(self) self.backdrop:SetBackdropBorderColor(0,0,0,1) end -function PLUGIN:ApplyTabStyle(this, addBackground) +function PLUGIN:ApplyTabStyle(this, addBackground, xOffset, yOffset) if(not this or (this and this.StyleHooked)) then return end local tab = this:GetName(); @@ -407,9 +419,12 @@ function PLUGIN:ApplyTabStyle(this, addBackground) nTex:FillInner() end + xOffset = xOffset or 1 + yOffset = yOffset or 1 + this.pushed = true; this.backdrop = CreateFrame("Frame", nil, this) - this.backdrop:WrapOuter(this,1,1) + this.backdrop:WrapOuter(this, xOffset, yOffset) this.backdrop:SetFrameLevel(0) this.backdrop:SetBackdrop({ bgFile = [[Interface\BUTTONS\WHITE8X8]], @@ -430,8 +445,10 @@ function PLUGIN:ApplyTabStyle(this, addBackground) local initialAnchor, anchorParent, relativeAnchor, xPosition, yPosition = this:GetPoint() this:Point(initialAnchor, anchorParent, relativeAnchor, 1, yPosition) else + xOffset = xOffset or 10 + yOffset = yOffset or 3 this.backdrop = CreateFrame("Frame", nil, this) - this.backdrop:FillInner(this, 10, 3) + this.backdrop:FillInner(this, xOffset, yOffset) this.backdrop:SetFixedPanelTemplate("Component", true) this.backdrop:SetPanelColor("dark")