diff --git a/Interface/AddOns/SVUI/packages/bag/SVBag.lua b/Interface/AddOns/SVUI/packages/bag/SVBag.lua index 81301cc..c233534 100644 --- a/Interface/AddOns/SVUI/packages/bag/SVBag.lua +++ b/Interface/AddOns/SVUI/packages/bag/SVBag.lua @@ -360,11 +360,11 @@ function MOD:Layout(isBank, isReagent) local globalName; local numContainerSlots, fullContainerSlots = GetNumBankSlots(); for i, bagID in ipairs(f.BagIDs) do - if (not isBank and bagID <= 3) or (isBank and bagID ~= -1 and numContainerSlots >= 1 and not (i - 1 > numContainerSlots)) then - if not f.ContainerHolder[i] then - if isBank then + if (not isReagent and (not isBank and bagID <= 3) or (isBank and bagID ~= -1 and numContainerSlots >= 1 and not (i - 1 > numContainerSlots))) then + if not f.ContainerHolder[i] then + if isBank then globalName = "SuperBankBag" .. (bagID - 4); - f.ContainerHolder[i] = NewFrame("CheckButton", globalName, f.ContainerHolder, "BankItemButtonBagTemplate") + f.ContainerHolder[i] = NewFrame("CheckButton", globalName, f.ContainerHolder, "BankItemButtonBagTemplate") else globalName = "SuperMainBag" .. bagID .. "Slot"; f.ContainerHolder[i] = NewFrame("CheckButton", globalName, f.ContainerHolder, "BagSlotButtonTemplate") @@ -570,12 +570,6 @@ function MOD:ModifyBags() self.BankFrame:ClearAllPoints() self.BankFrame:Point(anchor, parent, anchor, x, y) end - if self.ReagentFrame then - local parent = docked and LeftSuperDock or SV.UIParent - local anchor, x, y = self.db.bank.point, self.db.bank.xOffset, self.db.bank.yOffset - self.ReagentFrame:ClearAllPoints() - self.ReagentFrame:Point(anchor, parent, anchor, x, y) - end end do @@ -1101,12 +1095,14 @@ do end function MOD:MakeBankOrReagent(isReagent) + -- Reagent Slots: 1 - 98 + -- /script print(ReagentBankFrameItem1:GetInventorySlot()) local bagName = isReagent and "SVUI_ReagentContainerFrame" or "SVUI_BankContainerFrame" local otherName = isReagent and "SVUI_BankContainerFrame" or "SVUI_ReagentContainerFrame" local uisCount = #UISpecialFrames + 1; local bagsCount = #self.BagFrames + 1; - local frame = NewFrame("Button", bagName, SV.UIParent) + local frame = NewFrame("Button", bagName, isReagent and self.BankFrame or SV.UIParent) frame:SetPanelTemplate(isReagent and "Action" or "Container") frame:SetFrameStrata("HIGH") frame.RefreshSlot = MOD.RefreshSlot; @@ -1137,7 +1133,11 @@ do frame:Hide() frame.bottomOffset = 8; frame.topOffset = 60; - frame.BagIDs = {-1, 5, 6, 7, 8, 9, 10, 11} + if(isReagent) then + frame.BagIDs = {} + else + frame.BagIDs = {-1, 5, 6, 7, 8, 9, 10, 11} + end frame.Bags = {} frame.closeButton = NewFrame("Button", bagName.."CloseButton", frame, "UIPanelCloseButton") @@ -1183,73 +1183,71 @@ do local Transfer_OnClick = MOD:RunSortingProcess(MOD.Transfer, "bank bags") frame.transferButton:SetScript("OnClick", Transfer_OnClick) - frame.bagsButton = NewFrame("Button", nil, frame) - frame.bagsButton:Point("RIGHT", frame.sortButton, "LEFT", -10, 0) - frame.bagsButton:Size(25, 25) - frame.bagsButton:SetNormalTexture(ICON_BAGS) - StyleBagToolButton(frame.bagsButton) - frame.bagsButton.ttText = L["Toggle Bags"] - frame.bagsButton:SetScript("OnEnter", Tooltip_Show) - frame.bagsButton:SetScript("OnLeave", Tooltip_Hide) - local BagBtn_OnClick = function() - local numSlots, _ = GetNumBankSlots() - if numSlots >= 1 then - ToggleFrame(frame.ContainerHolder) - else - SV:StaticPopup_Show("NO_BANK_BAGS") - end - end - frame.bagsButton:SetScript("OnClick", BagBtn_OnClick) - - frame.purchaseBagButton = NewFrame("Button", nil, frame) - frame.purchaseBagButton:Size(25, 25) - frame.purchaseBagButton:Point("RIGHT", frame.bagsButton, "LEFT", -10, 0) - frame.purchaseBagButton:SetFrameLevel(frame.purchaseBagButton:GetFrameLevel()+2) - frame.purchaseBagButton:SetNormalTexture(ICON_PURCHASE) - StyleBagToolButton(frame.purchaseBagButton) - frame.purchaseBagButton.ttText = L["Purchase"] - frame.purchaseBagButton:SetScript("OnEnter", Tooltip_Show) - frame.purchaseBagButton:SetScript("OnLeave", Tooltip_Hide) - local PurchaseBtn_OnClick = function() - local _, full = GetNumBankSlots() - if not full then - SV:StaticPopup_Show("BUY_BANK_SLOT") - else - SV:StaticPopup_Show("CANNOT_BUY_BANK_SLOT") - end - end - frame.purchaseBagButton:SetScript("OnClick", PurchaseBtn_OnClick) - - if(SV.___interface >= 60000) then - frame.swapButton = NewFrame("Button", nil, frame) - frame.swapButton:Point("TOPRIGHT", frame, "TOPRIGHT", -10, -10) - frame.swapButton:Size(25, 25) - frame.swapButton:SetNormalTexture(ICON_BAGS) - StyleBagToolButton(frame.swapButton) - frame.swapButton.ttText = isReagent and L["View Bank"] or L["View Reagents"] - frame.swapButton:SetScript("OnEnter", Tooltip_Show) - frame.swapButton:SetScript("OnLeave", Tooltip_Hide) - frame.swapButton:SetScript("OnClick", function() - _G[otherName]:Show() - _G[bagName]:Hide() - end) - frame:SetScript("OnHide", function() - if(not _G[otherName] or not _G[otherName]:IsShown()) then - CloseBankFrame() - end - end) - else - frame:SetScript("OnHide", CloseBankFrame) - end + UISpecialFrames[uisCount] = bagName; - self.BagFrames[bagsCount] = frame - if(isReagent) then - self.ReagentFrame = frame - else + if(not isReagent) then + frame.bagsButton = NewFrame("Button", nil, frame) + frame.bagsButton:Point("RIGHT", frame.sortButton, "LEFT", -10, 0) + frame.bagsButton:Size(25, 25) + frame.bagsButton:SetNormalTexture(ICON_BAGS) + StyleBagToolButton(frame.bagsButton) + frame.bagsButton.ttText = L["Toggle Bags"] + frame.bagsButton:SetScript("OnEnter", Tooltip_Show) + frame.bagsButton:SetScript("OnLeave", Tooltip_Hide) + local BagBtn_OnClick = function() + local numSlots, _ = GetNumBankSlots() + if numSlots >= 1 then + ToggleFrame(frame.ContainerHolder) + else + SV:StaticPopup_Show("NO_BANK_BAGS") + end + end + frame.bagsButton:SetScript("OnClick", BagBtn_OnClick) + + frame.purchaseBagButton = NewFrame("Button", nil, frame) + frame.purchaseBagButton:Size(25, 25) + frame.purchaseBagButton:Point("RIGHT", frame.bagsButton, "LEFT", -10, 0) + frame.purchaseBagButton:SetFrameLevel(frame.purchaseBagButton:GetFrameLevel()+2) + frame.purchaseBagButton:SetNormalTexture(ICON_PURCHASE) + StyleBagToolButton(frame.purchaseBagButton) + frame.purchaseBagButton.ttText = L["Purchase"] + frame.purchaseBagButton:SetScript("OnEnter", Tooltip_Show) + frame.purchaseBagButton:SetScript("OnLeave", Tooltip_Hide) + local PurchaseBtn_OnClick = function() + local _, full = GetNumBankSlots() + if not full then + SV:StaticPopup_Show("BUY_BANK_SLOT") + else + SV:StaticPopup_Show("CANNOT_BUY_BANK_SLOT") + end + end + frame.purchaseBagButton:SetScript("OnClick", PurchaseBtn_OnClick) + + if(SV.___interface >= 60000) then + frame.swapButton = NewFrame("Button", nil, frame) + frame.swapButton:Point("TOPRIGHT", frame, "TOPRIGHT", -40, -10) + frame.swapButton:Size(25, 25) + frame.swapButton:SetNormalTexture(ICON_BAGS) + StyleBagToolButton(frame.swapButton) + frame.swapButton.ttText = isReagent and L["View Bank"] or L["View Reagents"] + frame.swapButton:SetScript("OnEnter", Tooltip_Show) + frame.swapButton:SetScript("OnLeave", Tooltip_Hide) + frame.swapButton:SetScript("OnClick", function() + if(_G["SVUI_ReagentContainerFrame"]:IsShown()) then + _G["SVUI_ReagentContainerFrame"]:Hide() + else + _G["SVUI_ReagentContainerFrame"]:Show() + end + end) + end + frame:SetScript("OnHide", CloseBankFrame) self.BankFrame = frame + else + frame:SetPoint("TOPLEFT", self.BankFrame, "TOPRIGHT", 2, 0) + self.ReagentFrame = frame end end end @@ -1353,12 +1351,13 @@ do MOD:MakeBankOrReagent() MOD:ModifyBags() end + MOD:Layout(true) + if(hasReagent and not MOD.ReagentFrame) then MOD:MakeBankOrReagent(true) - MOD:ModifyBags() - MOD.ReagentFrame:Hide() + MOD:Layout(true, true) end - MOD:Layout(true, hasReagent) + MOD.BankFrame:Show() MOD.BankFrame:RefreshBagsSlots() MOD.BagFrame:Show() @@ -1367,10 +1366,10 @@ do end function MOD:BANKFRAME_CLOSED() - if(MOD.BankFrame) then + if(MOD.BankFrame and MOD.BankFrame:IsShown()) then MOD.BankFrame:Hide() end - if(MOD.ReagentFrame) then + if(MOD.ReagentFrame and MOD.ReagentFrame:IsShown()) then MOD.ReagentFrame:Hide() end end @@ -1457,8 +1456,8 @@ CONFIGS["SVBag"] = { ["bagSize"] = 34, ["bankSize"] = 34, ["alignToChat"] = false, - ["bagWidth"] = 450, - ["bankWidth"] = 450, + ["bagWidth"] = 525, + ["bankWidth"] = 525, ["currencyFormat"] = "ICON", ["ignoreItems"] = "", ["bagTools"] = true, diff --git a/Interface/AddOns/SVUI/packages/map/SVMap.lua b/Interface/AddOns/SVUI/packages/map/SVMap.lua index 10a6081..2e19e19 100644 --- a/Interface/AddOns/SVUI/packages/map/SVMap.lua +++ b/Interface/AddOns/SVUI/packages/map/SVMap.lua @@ -407,8 +407,10 @@ local function UpdateWorldMapConfig() if(not MOD.WorldMapHooked) then NewHook("WorldMap_ToggleSizeUp", AdjustMapSize) NewHook("WorldMap_ToggleSizeDown", SetSmallWorldMap) - NewHook("WorldMapFrame_SetFullMapView", SetLargeWorldMap) - NewHook("WorldMapFrame_SetQuestMapView", SetQuestWorldMap) + if(SV.___interface < 60000) then + NewHook("WorldMapFrame_SetFullMapView", SetLargeWorldMap) + NewHook("WorldMapFrame_SetQuestMapView", SetQuestWorldMap) + end MOD.WorldMapHooked = true end @@ -809,10 +811,13 @@ end local function LoadWorldMap() setfenv(WorldMapFrame_OnShow, setmetatable({ UpdateMicroButtons = SV.fubar }, { __index = _G })) - WorldMapShowDropDown:Point('BOTTOMRIGHT',WorldMapPositioningGuide,'BOTTOMRIGHT',-2,-4) - WorldMapZoomOutButton:Point("LEFT",WorldMapZoneDropDown,"RIGHT",0,4) - WorldMapLevelUpButton:Point("TOPLEFT",WorldMapLevelDropDown,"TOPRIGHT",-2,8) - WorldMapLevelDownButton:Point("BOTTOMLEFT",WorldMapLevelDropDown,"BOTTOMRIGHT",-2,2) + if(SV.___interface < 60000) then + WorldMapShowDropDown:Point('BOTTOMRIGHT',WorldMapPositioningGuide,'BOTTOMRIGHT',-2,-4) + WorldMapZoomOutButton:Point("LEFT",WorldMapZoneDropDown,"RIGHT",0,4) + WorldMapLevelUpButton:Point("TOPLEFT",WorldMapLevelDropDown,"TOPRIGHT",-2,8) + WorldMapLevelDownButton:Point("BOTTOMLEFT",WorldMapLevelDropDown,"BOTTOMRIGHT",-2,2) + WorldMapZoneDropDownButton:HookScript('OnClick', ResetDropDownList_Hook) + end WorldMapFrame:SetParent(SV.UIParent) WorldMapFrame:SetFrameLevel(4) @@ -821,7 +826,6 @@ local function LoadWorldMap() WorldMapFrame:HookScript('OnShow', WorldMapFrameOnShow_Hook) WorldMapFrame:HookScript('OnHide', WorldMapFrameOnHide_Hook) - WorldMapZoneDropDownButton:HookScript('OnClick', ResetDropDownList_Hook) local CoordsHolder = CreateFrame('Frame', 'SVUI_WorldMapCoords', WorldMapFrame) CoordsHolder:SetFrameLevel(WorldMapDetailFrame:GetFrameLevel()+1) diff --git a/Interface/AddOns/SVUI/scripts/questwatch.lua b/Interface/AddOns/SVUI/scripts/questwatch.lua index c4d3515..b4f7610 100644 --- a/Interface/AddOns/SVUI/scripts/questwatch.lua +++ b/Interface/AddOns/SVUI/scripts/questwatch.lua @@ -322,7 +322,31 @@ end local function CreateQuestDocklet() SuperDockWindowRight = _G["SuperDockWindowRight"] - if(not SV.db.system.questWatch) then + if(SV.___interface >= 60000) then + + ObjectiveTrackerFrame:RemoveTextures(true) + + local frame = CreateFrame("Frame", "SVUI_QuestFrame", UIParent); + frame:SetSize(200, ObjectiveTrackerFrame:GetHeight()); + frame:SetPoint("TOPRIGHT", UIParent, "RIGHT", -200, 100); + ObjectiveTrackerFrame:ClearAllPoints() + ObjectiveTrackerFrame:SetClampedToScreen(false) + ObjectiveTrackerFrame:SetParent(SVUI_QuestFrame) + ObjectiveTrackerFrame:SetAllPoints(SVUI_QuestFrame) + ObjectiveTrackerFrame:SetFrameLevel(SVUI_QuestFrame:GetFrameLevel() + 1) + ObjectiveTrackerFrame.ClearAllPoints = SV.fubar; + ObjectiveTrackerFrame.SetPoint = SV.fubar; + ObjectiveTrackerFrame.SetAllPoints = SV.fubar; + + ObjectiveTrackerFrame.BlocksFrame:RemoveTextures(true) + ObjectiveTrackerFrame.BlocksFrame.QuestHeader:RemoveTextures(true) + ObjectiveTrackerFrame.BlocksFrame.AchievementHeader:RemoveTextures(true) + ObjectiveTrackerFrame.BlocksFrame.ScenarioHeader:RemoveTextures(true) + ObjectiveTrackerFrame.HeaderMenu:RemoveTextures(true) + ObjectiveTrackerFrame.BlockDropDown:RemoveTextures(true) + + SV:SetSVMovable(frame, "Quest Watch"); + elseif(not SV.db.system.questWatch) then local frame = CreateFrame("Frame", "SVUI_QuestFrame", UIParent); frame:SetSize(200, WatchFrame:GetHeight()); frame:SetPoint("RIGHT", UIParent, "RIGHT", -100, 0); @@ -337,6 +361,7 @@ local function CreateQuestDocklet() WatchFrameLines.ClearAllPoints = SV.fubar; WatchFrameLines.SetPoint = SV.fubar; WatchFrameLines.SetAllPoints = SV.fubar; + SV:SetSVMovable(frame, "Quest Watch"); else local bgTex = [[Interface\BUTTONS\WHITE8X8]] diff --git a/Interface/AddOns/SVUI/system/mentalo.lua b/Interface/AddOns/SVUI/system/mentalo.lua index 3025ac0..dafd813 100644 --- a/Interface/AddOns/SVUI/system/mentalo.lua +++ b/Interface/AddOns/SVUI/system/mentalo.lua @@ -805,6 +805,8 @@ XML FRAME SCRIPT HANDLERS ########################################################## ]]-- function SVUI_MoveEventHandler_OnEvent() + if not SVUI_Cache then SVUI_Cache = {} end + if not SVUI_Cache["Mentalo"] then SVUI_Cache["Mentalo"] = {} end for _, frame in pairs(DraggableFrames)do if _G[frame] then if SVUI_Cache["Mentalo"][frame] == nil then diff --git a/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.lua b/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.lua index 591f33e..13a5d47 100644 --- a/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.lua +++ b/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.lua @@ -571,6 +571,7 @@ local function GetSourceType(guid) subStr = guid:sub(3, 5) binStr = ("0x%s"):format(subStr) bitVal = tonumber(binStr) + if(not bitVal) then return end srcType = band(bitVal, 0x00F) return srcType end @@ -1119,8 +1120,8 @@ function PLUGIN:Load() self:RegisterEvent("PLAYER_ENTERING_WORLD", "UpdateCommunicator") self:RegisterEvent("UPDATE_BATTLEFIELD_SCORE", "UpdateCommunicator") - -- SVUI_Player.Health.LowAlertFunc = LowHealth_PlayerEmote - -- SVUI_Target.Health.LowAlertFunc = LowHealth_TargetEmote + --SVUI_Player.Health.LowAlertFunc = LowHealth_PlayerEmote + --SVUI_Target.Health.LowAlertFunc = LowHealth_TargetEmote end -- /tar Sinnisterr diff --git a/Interface/AddOns/SVUI_DebugOMatic/Bindings.xml b/Interface/AddOns/SVUI_DebugOMatic/Bindings.xml deleted file mode 100644 index 0aece78..0000000 --- a/Interface/AddOns/SVUI_DebugOMatic/Bindings.xml +++ /dev/null @@ -1,5 +0,0 @@ -<Bindings> - <Binding name="Frame Debugger" description="Frame Stack Analyzer" header="SVUIDEBUG" runOnUp="false"> - DebugThisFrame() - </Binding> -</Bindings> \ No newline at end of file diff --git a/Interface/AddOns/SVUI_DebugOMatic/SVUI_DebugOMatic.toc b/Interface/AddOns/SVUI_DebugOMatic/SVUI_DebugOMatic.toc deleted file mode 100644 index 47da00f..0000000 --- a/Interface/AddOns/SVUI_DebugOMatic/SVUI_DebugOMatic.toc +++ /dev/null @@ -1,9 +0,0 @@ -## Interface: 50400 -## Author: Munglunch, Azilroka, Sortokk -## Version: 1.6 -## Title: |cffFF9900SVUI |r|cffFFEF00Debug O Matic|r -## Notes: Supervillain UI Debugging. -## RequiredDeps: SVUI -## OptionalDeps: Blizzard_DebugTools - -SVUI_DebugOMatic.xml diff --git a/Interface/AddOns/SVUI_DebugOMatic/SVUI_DebugOMatic.xml b/Interface/AddOns/SVUI_DebugOMatic/SVUI_DebugOMatic.xml deleted file mode 100644 index a3f97ba..0000000 --- a/Interface/AddOns/SVUI_DebugOMatic/SVUI_DebugOMatic.xml +++ /dev/null @@ -1,116 +0,0 @@ -<Ui xmlns="http://www.blizzard.com/wow/ui/"> - <Script file='debug.lua'/> - - <Frame name="SVUI_ScriptError" movable="true" hidden="true" frameStrata="DIALOG"> - <Size x="384" y="260"/> - <Anchors> - <Anchor point="TOPLEFT"/> - </Anchors> - <Layers> - <Layer level="BACKGROUND"> - <Texture name="$parentBG" setAllPoints="true"/> - </Layer> - <Layer level="OVERLAY"> - <Texture name="$parentTitleBG"> - <Anchors> - <Anchor point="TOPLEFT"> - <Offset x="8" y="-8"/> - </Anchor> - <Anchor point="BOTTOMRIGHT" relativePoint="TOPRIGHT"> - <Offset x="-32" y="-24"/> - </Anchor> - </Anchors> - </Texture> - <Texture name="$parentDialogBG"> - <Anchors> - <Anchor point="TOPLEFT"> - <Offset x="8" y="-32"/> - </Anchor> - <Anchor point="BOTTOMRIGHT"> - <Offset x="-32" y="32"/> - </Anchor> - </Anchors> - </Texture> - </Layer> - <Layer level="ARTWORK"> - <FontString parentKey="Title" inherits="GameFontNormal"> - <Anchors> - <Anchor point="TOPLEFT"> - <Offset x="8" y="-8"/> - </Anchor> - <Anchor point="TOPRIGHT"> - <Offset x="-32" y="-24"/> - </Anchor> - </Anchors> - </FontString> - <FontString parentKey="sourceLabel" font="GameFontNormalCenter"> - <Size x="140" y="16"/> - <Anchors> - <Anchor point="BOTTOMLEFT"> - <Offset x="104" y="8"/> - </Anchor> - </Anchors> - </FontString> - </Layer> - </Layers> - <Frames> - <ScrollFrame name="$parentDialog" inherits="MinimalScrollFrameTemplate"> - <Size x="343" y="194"/> - <Anchors> - <Anchor point="TOPLEFT"> - <Offset x="12" y="-30"/> - </Anchor> - </Anchors> - <ScrollChild> - <EditBox parentKey="Input" multiLine="true" letters="4000" autoFocus="false"> - <Size x="343" y="194"/> - <Scripts> - <OnCursorChanged function="ScrollingEdit_OnCursorChanged"/> - <OnUpdate> - ScrollingEdit_OnUpdate(self, elapsed, self:GetParent()); - </OnUpdate> - <OnEditFocusGained> - self:HighlightText(0); - </OnEditFocusGained> - <OnEscapePressed function="EditBox_ClearFocus"/> - </Scripts> - <FontString inherits="GameFontHighlightSmall"/> - </EditBox> - </ScrollChild> - </ScrollFrame> - <Button parentKey="Clear" inherits="UIPanelButtonTemplate" text="RESET"> - <Size x="96" y="24"/> - <Anchors> - <Anchor point="BOTTOMLEFT"> - <Offset x="8" y="4"/> - </Anchor> - </Anchors> - <Scripts> - <OnClick> - local frame = _G["SVUI_ScriptErrorDialog"]; - frame.Input:SetText(""); - </OnClick> - </Scripts> - </Button> - <Button parentKey="Close" inherits="UIPanelCloseButton"> - <Anchors> - <Anchor point="TOPRIGHT"> - <Offset x="-2" y="-2"/> - </Anchor> - </Anchors> - </Button> - </Frames> - <Scripts> - <OnLoad function="SVUI_ScriptError_OnLoad"/> - <OnShow function="SVUI_ScriptError_OnShow"/> - <OnDragStart> - _G["SVUI_ScriptError"].moving = true; - _G["SVUI_ScriptError"]:StartMoving(); - </OnDragStart> - <OnDragStop> - _G["SVUI_ScriptError"].moving = nil; - _G["SVUI_ScriptError"]:StopMovingOrSizing(); - </OnDragStop> - </Scripts> - </Frame> -</Ui> \ No newline at end of file diff --git a/Interface/AddOns/SVUI_DebugOMatic/debug.lua b/Interface/AddOns/SVUI_DebugOMatic/debug.lua deleted file mode 100644 index 5ad3d23..0000000 --- a/Interface/AddOns/SVUI_DebugOMatic/debug.lua +++ /dev/null @@ -1,296 +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 pairs = _G.pairs; -local type = _G.type; -local tostring = _G.tostring; -local tonumber = _G.tonumber; -local tinsert = _G.tinsert; -local string = _G.string; -local math = _G.math; -local table = _G.table; ---[[ STRING METHODS ]]-- -local format, find, lower, match = string.format, string.find, string.lower, string.match; ---[[ MATH METHODS ]]-- -local floor, abs, min, max = math.floor, math.abs, math.min, math.max; ---[[ TABLE METHODS ]]-- -local tremove, tcopy, twipe, tsort, tconcat, tdump = table.remove, table.copy, table.wipe, table.sort, table.concat, table.dump; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SV, L = unpack(SVUI); -local ErrorStorage = {} -BINDING_HEADER_SVUIDEBUG = "Supervillain UI: Debugger"; ---[[ -########################################################## -CUSTOM MESSAGE WINDOW -########################################################## -]]-- -function SVUI_ScriptError_OnLoad() - SVUI_ScriptError.Source = ""; - SVUI_ScriptError:SetFixedPanelTemplate("Transparent") - SVUI_ScriptErrorDialog:SetFixedPanelTemplate("Transparent") - SVUI_ScriptErrorDialog.Input:SetScript("OnTextChanged", function(self, userInput) - if userInput then return end - local _, max = SVUI_ScriptErrorDialogScrollBar:GetMinMaxValues() - for i = 1, max do - ScrollFrameTemplate_OnMouseWheel(SVUI_ScriptErrorDialog, -1) - end - end) - _G["SVUI_ScriptError"]:RegisterForDrag("LeftButton"); -end - -function SVUI_ScriptError_OnShow() - if SVUI_ScriptError.Source then - local txt = SVUI_ScriptError.Source; - SVUI_ScriptError.Title:SetText(txt); - end -end ---[[ -########################################################## -OTHER SLASH COMMANDS -########################################################## -]]-- -local function GetOriginalContext() - UIParentLoadAddOn("Blizzard_DebugTools") - local orig_DevTools_RunDump = DevTools_RunDump - local originalContext - DevTools_RunDump = function(value, context) - originalContext = context - end - DevTools_Dump("") - DevTools_RunDump = orig_DevTools_RunDump - return originalContext -end - -local function SV_Dump(value) - local context = GetOriginalContext() - local buffer = "" - context.Write = function(self, msg) - buffer = buffer.."\n"..msg - end - - DevTools_RunDump(value, context) - return buffer.."\n"..table.dump(value) -end - -local function DebugDump(any) - if type(any)=="string" then - return any - elseif type(any) == "table" then - return SV_Dump(any) - elseif any==nil or type(any)=="number" then - return tostring(any) - end - return any -end - -local function DebugOutput(msg) - if not SVUI_ScriptError:IsShown() then - SVUI_ScriptError:Show() - end - local outputString = SVUI_ScriptErrorDialog.Input:GetText() - outputString = outputString .. "\n" .. msg - tinsert(ErrorStorage,msg); - SVUI_ScriptErrorDialog.Input:SetText(outputString) -end - -local function ShowDebug(header, ...) - local value = (header and format("Debug %s: ", header)) or "Debug: " - value = format("|cff11ff11 %s|r", value) - for i = 1, select('#', ...), 2 do - local name = select(i, ...) - local var = DebugDump(select(i+1, ...)) - value = format("%s %s = ", value, name)..var - end - SVUI_ScriptError.Source = header; - DebugOutput(value) -end - -function DebugThisFrame(arg) - local outputString = " "; - if arg then - arg = _G[arg] or GetMouseFocus() - else - arg = GetMouseFocus() - end - if arg and (arg.GetName and arg:GetName()) then - local point, relativeTo, relativePoint, xOfs, yOfs = arg:GetPoint() - outputString = outputString.."|cffCC0000----------------------------".."\n" - outputString = outputString.."|cffCC00FF--Mouseover Frame".."|r".."\n" - outputString = outputString.."|cffCC0000----------------------------|r".."\n" - outputString = outputString.."|cff00D1FF".."Name: |cffFFD100"..arg:GetName().."\n" - if arg:GetParent() and arg:GetParent():GetName() then - outputString = outputString.."|cff00D1FF".."Parent: |cffFFD100"..arg:GetParent():GetName().."\n" - end - outputString = outputString.."|cff00D1FF".."Width: |cffFFD100"..format("%.2f",arg:GetWidth()).."\n" - outputString = outputString.."|cff00D1FF".."Height: |cffFFD100"..format("%.2f",arg:GetHeight()).."\n" - outputString = outputString.."|cff00D1FF".."Strata: |cffFFD100"..arg:GetFrameStrata().."\n" - outputString = outputString.."|cff00D1FF".."Level: |cffFFD100"..arg:GetFrameLevel().."\n" - outputString = outputString.."|cff00D1FF".."IsShown: |cffFFD100"..tostring(arg:IsShown()).."\n" - if xOfs then - outputString = outputString.."|cff00D1FF".."X: |cffFFD100"..format("%.2f",xOfs).."\n" - end - if yOfs then - outputString = outputString.."|cff00D1FF".."Y: |cffFFD100"..format("%.2f",yOfs).."\n" - end - if relativeTo and relativeTo:GetName() then - outputString = outputString.."|cff00D1FF".."Point: |cffFFD100"..point.."|r anchored to "..relativeTo:GetName().."'s |cffFFD100"..relativePoint.."\n" - end - local bg = arg:GetBackdrop() - if type(bg) == "table" then - outputString = outputString.."|cffFF9900>> BACKDROP --------------------------|r".."\n" - outputString = outputString..tdump(bg).."\n" - end - if arg._template then - outputString = outputString.."Template Name: |cff00FF55"..arg._template.."\n" - end - if arg.Panel then - local cpt, crt, crp, cxo, cyo = arg.Panel:GetPoint() - outputString = outputString.."|cffFF8800>> backdropFrame --------------------------|r".."\n" - outputString = outputString.."|cff00D1FF".."Width: |cffFFD100"..format("%.2f",arg.Panel:GetWidth()).."\n" - outputString = outputString.."|cff00D1FF".."Height: |cffFFD100"..format("%.2f",arg.Panel:GetHeight()).."\n" - outputString = outputString.."|cff00D1FF".."Strata: |cffFFD100"..arg.Panel:GetFrameStrata().."\n" - outputString = outputString.."|cff00D1FF".."Level: |cffFFD100"..arg.Panel:GetFrameLevel().."\n" - if cxo then - outputString = outputString.."|cff00D1FF".."X: |cffFFD100"..format("%.2f",cxo).."\n" - end - if cyo then - outputString = outputString.."|cff00D1FF".."Y: |cffFFD100"..format("%.2f",cyo).."\n" - end - if crt and crt:GetName() then - outputString = outputString.."|cff00D1FF".."Point: |cffFFD100"..cpt.."|r anchored to "..crt:GetName().."'s |cffFFD100"..crp.."\n" - end - bg = arg.Panel:GetBackdrop() - if type(bg) == "table" then - outputString = outputString.."|cffFF9900>> BACKDROP --------------------------|r".."\n" - outputString = outputString..tdump(bg).."\n" - end - if arg._skin then - local cpt, crt, crp, cxo, cyo = arg._skin:GetPoint() - outputString = outputString.."|cffFF7700>> backdropTexture --------------------------|r".."\n" - outputString = outputString.."|cff00D1FF".."Width: |cffFFD100"..format("%.2f",arg._skin:GetWidth()).."\n" - outputString = outputString.."|cff00D1FF".."Height: |cffFFD100"..format("%.2f",arg._skin:GetHeight()).."\n" - if cxo then - outputString = outputString.."|cff00D1FF".."X: |cffFFD100"..format("%.2f",cxo).."\n" - end - if cyo then - outputString = outputString.."|cff00D1FF".."Y: |cffFFD100"..format("%.2f",cyo).."\n" - end - if crt and crt:GetName() then - outputString = outputString.."|cff00D1FF".."Point: |cffFFD100"..cpt.."|r anchored to "..crt:GetName().."'s |cffFFD100"..crp.."\n" - end - bg = arg._skin:GetTexture() - if bg then - outputString = outputString.."|cff00D1FF".."Texture: |cffFFD100"..bg.."\n" - end - end - end - local childFrames = { arg:GetChildren() } - if #childFrames > 0 then - outputString = outputString.."|cffCC00FF>>>> Child Frames----------------------------".."|r".."\n".."\n" - for _, child in ipairs(childFrames) do - local cpt, crt, crp, cxo, cyo = child:GetPoint() - if child:GetName() then - outputString = outputString.."\n\n|cff00FF55++"..child:GetName().."|r".."\n" - else - outputString = outputString.."\n\n|cff99FF55+!!+".."Anonymous Frame".."|r".."\n" - end - outputString = outputString.."|cffCC00FF----------------------------|r".."\n" - outputString = outputString.."|cff00D1FF".."Width: |cffFFD100"..format("%.2f",child:GetWidth()).."\n" - outputString = outputString.."|cff00D1FF".."Height: |cffFFD100"..format("%.2f",child:GetHeight()).."\n" - outputString = outputString.."|cff00D1FF".."Strata: |cffFFD100"..child:GetFrameStrata().."\n" - outputString = outputString.."|cff00D1FF".."Level: |cffFFD100"..child:GetFrameLevel().."\n" - if cxo then - outputString = outputString.."|cff00D1FF".."X: |cffFFD100"..format("%.2f",cxo).."\n" - end - if cyo then - outputString = outputString.."|cff00D1FF".."Y: |cffFFD100"..format("%.2f",cyo).."\n" - end - if crt and crt:GetName() then - outputString = outputString.."|cff00D1FF".."Point: |cffFFD100"..cpt.."|r anchored to "..crt:GetName().."'s |cffFFD100"..crp.."\n" - end - bg = child:GetBackdrop() - if type(bg) == "table" then - outputString = outputString.."|cffFF9900>> BACKDROP --------------------------|r".."\n" - outputString = outputString..tdump(bg).."\n" - end - if child._template then - outputString = outputString.."Template Name: |cff00FF55"..child._template.."\n" - end - if child.Panel then - local cpt, crt, crp, cxo, cyo = child.Panel:GetPoint() - outputString = outputString.."|cffFF8800>> backdropFrame --------------------------|r".."\n" - outputString = outputString.."|cff00D1FF".."Width: |cffFFD100"..format("%.2f",child.Panel:GetWidth()).."\n" - outputString = outputString.."|cff00D1FF".."Height: |cffFFD100"..format("%.2f",child.Panel:GetHeight()).."\n" - outputString = outputString.."|cff00D1FF".."Strata: |cffFFD100"..child.Panel:GetFrameStrata().."\n" - outputString = outputString.."|cff00D1FF".."Level: |cffFFD100"..child.Panel:GetFrameLevel().."\n" - if cxo then - outputString = outputString.."|cff00D1FF".."X: |cffFFD100"..format("%.2f",cxo).."\n" - end - if cyo then - outputString = outputString.."|cff00D1FF".."Y: |cffFFD100"..format("%.2f",cyo).."\n" - end - if crt and crt:GetName() then - outputString = outputString.."|cff00D1FF".."Point: |cffFFD100"..cpt.."|r anchored to "..crt:GetName().."'s |cffFFD100"..crp.."\n" - end - bg = child.Panel:GetBackdrop() - if type(bg) == "table" then - outputString = outputString.."|cffFF9900>> BACKDROP --------------------------|r".."\n" - outputString = outputString..tdump(bg).."\n" - end - if child._skin then - local cpt, crt, crp, cxo, cyo = child._skin:GetPoint() - outputString = outputString.."|cffFF7700>> backdropTexture --------------------------|r".."\n" - outputString = outputString.."|cff00D1FF".."Width: |cffFFD100"..format("%.2f",child._skin:GetWidth()).."\n" - outputString = outputString.."|cff00D1FF".."Height: |cffFFD100"..format("%.2f",child._skin:GetHeight()).."\n" - if cxo then - outputString = outputString.."|cff00D1FF".."X: |cffFFD100"..format("%.2f",cxo).."\n" - end - if cyo then - outputString = outputString.."|cff00D1FF".."Y: |cffFFD100"..format("%.2f",cyo).."\n" - end - if crt and crt:GetName() then - outputString = outputString.."|cff00D1FF".."Point: |cffFFD100"..cpt.."|r anchored to "..crt:GetName().."'s |cffFFD100"..crp.."\n" - end - bg = child._skin:GetTexture() - if bg then - outputString = outputString.."|cffFF9900----------------------------|r".."\n" - outputString = outputString..bg.."\n" - end - outputString = outputString.."|cffCC0000----------------------------|r".."\n" - end - end - end - outputString = outputString.."\n\n" - end - elseif arg == nil or arg == "" then - outputString = outputString.."Invalid frame name".."\n" - else - outputString = outputString.."Could not find frame info".."\n" - end - DebugOutput(outputString) -end -SLASH_SVUI_FRAME_DEBUG1 = "/svdf" -SlashCmdList["SVUI_FRAME_DEBUG"] = DebugThisFrame; \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/system.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/system.lua index 9d9fcca..6c07211 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/system.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/system.lua @@ -568,21 +568,23 @@ local function SystemPanelQue() end end) - GuildInviteFrame:RemoveTextures() - GuildInviteFrame:SetFixedPanelTemplate('Transparent') - GuildInviteFrameLevel:RemoveTextures() - GuildInviteFrameLevel:ClearAllPoints() - GuildInviteFrameLevel:SetPoint('TOP', GuildInviteFrame, 'CENTER', -15, -25) - GuildInviteFrameJoinButton:SetButtonTemplate() - GuildInviteFrameDeclineButton:SetButtonTemplate() - GuildInviteFrame:Height(225) - GuildInviteFrame:HookScript("OnEvent", function() + if(SV.___interface < 60000) then + GuildInviteFrame:RemoveTextures() + GuildInviteFrame:SetFixedPanelTemplate('Transparent') + GuildInviteFrameLevel:RemoveTextures() + GuildInviteFrameLevel:ClearAllPoints() + GuildInviteFrameLevel:SetPoint('TOP', GuildInviteFrame, 'CENTER', -15, -25) + GuildInviteFrameJoinButton:SetButtonTemplate() + GuildInviteFrameDeclineButton:SetButtonTemplate() GuildInviteFrame:Height(225) - end) + GuildInviteFrame:HookScript("OnEvent", function() + GuildInviteFrame:Height(225) + end) - GuildInviteFrameWarningText:Die() - BattleTagInviteFrame:RemoveTextures() - BattleTagInviteFrame:SetFixedPanelTemplate('Transparent') + GuildInviteFrameWarningText:Die() + BattleTagInviteFrame:RemoveTextures() + BattleTagInviteFrame:SetFixedPanelTemplate('Transparent') + end --BattleTagInviteFrameScrollFrame:SetEditboxTemplate() for i=1, BattleTagInviteFrame:GetNumChildren() do diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/talents.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/talents.lua index 850478e..cc35c17 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/talents.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/talents.lua @@ -261,32 +261,37 @@ local function TalentFrameStyle() end) for b = 1, GetNumSpecializations(false, nil)do - local A = PlayerTalentFrameSpecialization["specButton"..b] - local p, p, p, icon = GetSpecializationInfo(b, false, nil) - A.ring:Hide() - A.specIcon:SetTexture(icon) - A.specIcon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - A.specIcon:SetSize(50, 50) - A.specIcon:Point("LEFT", A, "LEFT", 15, 0) - A.SelectedTexture = A:CreateTexture(nil, 'ARTWORK') - A.SelectedTexture:SetTexture(1, 1, 0, 0.1) + local button = PlayerTalentFrameSpecialization["specButton"..b] + if(button) then + local _, _, _, icon = GetSpecializationInfo(b, false, nil) + button.ring:Hide() + button.specIcon:SetTexture(icon) + button.specIcon:SetTexCoord(0.1, 0.9, 0.1, 0.9) + button.specIcon:SetSize(50, 50) + button.specIcon:Point("LEFT", button, "LEFT", 15, 0) + button.SelectedTexture = button:CreateTexture(nil, 'ARTWORK') + button.SelectedTexture:SetTexture(1, 1, 0, 0.1) + end end local btnList = { "PlayerTalentFrameSpecializationSpecButton", "PlayerTalentFramePetSpecializationSpecButton" } - for p, M in pairs(btnList)do + for _, gName in pairs(btnList)do for b = 1, 4 do - local A = _G[M..b]_G["PlayerTalentFrameSpecializationSpecButton"..b.."Glow"]:Die() - local N = A:CreateTexture(nil, 'ARTWORK') - N:SetTexture(1, 1, 1, 0.1) - A:SetHighlightTexture(N) - A.bg:SetAlpha(0) - A.learnedTex:SetAlpha(0) - A.selectedTex:SetAlpha(0) - A:SetFixedPanelTemplate("Button") - A:GetHighlightTexture():FillInner(A.Panel) + local button = _G[gName..b] + if(button) then + if(_G[gName..b.."Glow"]) then _G[gName..b.."Glow"]:Die() end + local bTex = button:CreateTexture(nil, 'ARTWORK') + bTex:SetTexture(1, 1, 1, 0.1) + button:SetHighlightTexture(bTex) + button.bg:SetAlpha(0) + button.learnedTex:SetAlpha(0) + button.selectedTex:SetAlpha(0) + button:SetFixedPanelTemplate("Button") + button:GetHighlightTexture():FillInner(button.Panel) + end end end