diff --git a/SVUI_!Core/system/_docklets/breakstuff.lua b/SVUI_!Core/system/_docklets/breakstuff.lua index 7119098..c591c4f 100644 --- a/SVUI_!Core/system/_docklets/breakstuff.lua +++ b/SVUI_!Core/system/_docklets/breakstuff.lua @@ -244,11 +244,11 @@ local BreakStuff_OnClick = function(self) self.ttText = "BreakStuff : ON"; self:SetPanelColor("green") self.icon:SetGradient(unpack(SV.media.gradient.green)) - if(SV.Inventory and SV.Inventory.BagFrame) then - if(not SV.Inventory.BagFrame:IsShown()) then + if(SV.Inventory and SV.Inventory.MasterFrame) then + if(not SV.Inventory.MasterFrame:IsShown()) then GameTooltip:Hide() - SV.Inventory.BagFrame:Show() - SV.Inventory.BagFrame:RefreshBags() + SV.Inventory.MasterFrame:Show() + SV.Inventory.MasterFrame:RefreshBags() if(SV.Tooltip) then SV.Tooltip.GameTooltip_SetDefaultAnchor(GameTooltip,self) end diff --git a/SVUI_!Core/system/profile.lua b/SVUI_!Core/system/profile.lua index b4e80c8..7ad6d15 100644 --- a/SVUI_!Core/system/profile.lua +++ b/SVUI_!Core/system/profile.lua @@ -56,22 +56,27 @@ local importHelpText = "TO IMPORT: First click the 'Clear' button, then simply c local completeHelpText = exportHelpText .. "\n\n" .. importHelpText; local ProfileInterface_OnTextChanged = function(self, userInput) - if userInput then - --ProfileInterfaceHelp.Text:SetText(completeHelpText); - else - local _, max = ProfileInterfaceScrollBar:GetMinMaxValues() - for i = 1, max do - ScrollFrameTemplate_OnMouseWheel(ProfileInterfaceDialog, -1) - end + if userInput then + --ProfileInterfaceHelp.Text:SetText(completeHelpText); + else + local _, max = ProfileInterfaceScrollBar:GetMinMaxValues() + for i = 1, max do + ScrollFrameTemplate_OnMouseWheel(ProfileInterfaceDialog, -1) end + end end function SV.ProfileInterface:Toggle() - if not SV.ProfileInterface:IsShown() then - SV.ProfileInterface:Show() - else - SV.ProfileInterface:Hide() - end + local aceConfig = LibStub("AceConfigDialog-1.0") + if(aceConfig and SV.OptionsLoaded) then + aceConfig:Close(SV.NameID) + GameTooltip:Hide() + end + if not SV.ProfileInterface:IsShown() then + SV.ProfileInterface:Show() + else + SV.ProfileInterface:Hide() + end end function SV:LinkProfile(key) diff --git a/SVUI_!Options/SVUI_!Options.lua b/SVUI_!Options/SVUI_!Options.lua index 53a16ab..1ba4045 100644 --- a/SVUI_!Options/SVUI_!Options.lua +++ b/SVUI_!Options/SVUI_!Options.lua @@ -262,6 +262,27 @@ local function RefreshProfileOptions() } } } + optionGroup.extended = { + order = 6, + type = "group", + name = L["Advanced"], + guiInline = true, + args = { + spacer1 = { + order = 1, + type = "description", + name = L["If you would like to (import/export) your profile (from/to) another computer then use this advanced profile tool."] .. "\n", + width = "full", + }, + profileInterface = { + order = 2, + type = "execute", + name = L["Open Import/Export Tool"], + func = function() SV.ProfileInterface:Toggle() end, + width = 'full' + } + } + } end function SVUIOptions:SetToFontConfig(font) diff --git a/SVUI_ActionBars/SVUI_ActionBars.lua b/SVUI_ActionBars/SVUI_ActionBars.lua index a5fec0a..0cab1e3 100644 --- a/SVUI_ActionBars/SVUI_ActionBars.lua +++ b/SVUI_ActionBars/SVUI_ActionBars.lua @@ -45,6 +45,7 @@ local Masque = LibStub("Masque", true); local DEFAULT_MAIN_ANCHOR = _G["SVUI_DockBottomCenter"]; MOD.ButtonCache = {}; MOD.MainAnchor = CreateFrame("Frame", "SVUI_ActionBarMainAnchor"); +MOD.AltVehicleBar = false; --[[ ########################################################## LOCAL VARS @@ -501,16 +502,16 @@ end function MOD:UpdateBarPagingDefaults() PAGE_SHOW_VEHICLE = SHOW_VEHICLE_PATTERN:format(GetVehicleBarIndex(), GetVehicleBarIndex(), GetOverrideBarIndex()); - local vehicle_bar; + self.AltVehicleBar = false; for i=2, TOTAL_BARS do local id = ("Bar%d"):format(i); local bar = _G["SVUI_Action" .. id]; if(bar) then local parse = ''; - if(SV.db.ActionBars[id].showVehicle and (not vehicle_bar)) then + if(SV.db.ActionBars[id].showVehicle and (not self.AltVehicleBar)) then parse = PAGE_SHOW_VEHICLE; - vehicle_bar = true; + self.AltVehicleBar = bar; else parse = PAGE_HIDE_VEHICLE; end @@ -528,7 +529,7 @@ function MOD:UpdateBarPagingDefaults() if(mainbar) then local mainbar_parse = BASE_PAGING; - if(SV.db.ActionBars.Bar1.showVehicle or (not vehicle_bar)) then + if(SV.db.ActionBars.Bar1.showVehicle or (not self.AltVehicleBar)) then mainbar_parse = mainbar_parse .. " " .. PAGE_SHOW_VEHICLE; else mainbar_parse = mainbar_parse .. " " .. PAGE_HIDE_VEHICLE; @@ -866,17 +867,105 @@ function MOD:RefreshActionBars() collectgarbage("collect"); end -local Vehicle_Updater = function() - local bar = _G["SVUI_ActionBar1"] - local space = SV.db.ActionBars["Bar1"].buttonspacing - local total = SV.db.ActionBars["Bar1"].buttons; - local rows = SV.db.ActionBars["Bar1"].buttonsPerRow; - local size = SV.db.ActionBars["Bar1"].buttonsize - local point = SV.db.ActionBars["Bar1"].point; - local columns = ceil(total / rows) +local function UpdateAltVehicleBindings() + if(InCombatLockdown() or (not MOD.AltVehicleBar)) then return end + local bar = MOD.AltVehicleBar; + if(bar and bar.buttons) then + ClearOverrideBindings(bar); + local enabled = (HasOverrideActionBar() or HasVehicleActionBar()); + if(enabled) then + local barName = bar:GetName(); + local vehicleBindings = bar.binding; + for k = 1, #bar.buttons do + local binding = vehicleBindings:format(k); + local btn = ("SVUI_ActionBar1Button%d"):format(k); + for x = 1, select('#', GetBindingKey(binding)) do + local key = select(x, GetBindingKey(binding)); + if (key and key ~= "") then + SetOverrideBindingClick(bar, true, key, btn); + end + end + end + end + end +end + +local function SetStanceBarButtons() + local maxForms = GetNumShapeshiftForms(); + local currentForm = GetShapeshiftForm(); + local maxButtons = NUM_STANCE_SLOTS; + local texture, name, isActive, isCastable, _; + for i = 1, maxButtons do + local button = _G["SVUI_StanceBarButton"..i] + local icon = _G["SVUI_StanceBarButton"..i.."Icon"] + if i <= maxForms then + texture, name, isActive, isCastable = GetShapeshiftFormInfo(i) + if texture == "Interface\\Icons\\Spell_Nature_WispSplode" and SV.db.ActionBars.Stance.style == "darkenInactive" then + _, _, texture = GetSpellInfo(name) + end + + icon:SetTexture(texture) + + if(button.cooldown) then + if texture then + button.cooldown:SetAlpha(1) + button.cooldown:SetSwipeColor(0, 0, 0, 1) + button.cooldown:SetDrawBling(true) + else + button.cooldown:SetAlpha(0) + button.cooldown:SetSwipeColor(0, 0, 0, 0) + button.cooldown:SetDrawBling(false) + end + end + + if isActive then + StanceBarFrame.lastSelected = button:GetID() + + if maxForms > 1 then + if button.checked then button.checked:SetTexture(0, 0.5, 0, 0.2) end + button:SetBackdropBorderColor(0.4, 0.8, 0) + end + icon:SetVertexColor(1, 1, 1) + button:SetChecked(true) + else + if maxForms > 1 and currentForm > 0 then + button:SetBackdropBorderColor(0, 0, 0) + if button.checked then + button.checked:SetAlpha(1) + end + if SV.db.ActionBars.Stance.style == "darkenInactive" then + icon:SetVertexColor(0.25, 0.25, 0.25) + else + icon:SetVertexColor(1, 1, 1) + end + end + + button:SetChecked(false) + end + if isCastable then + icon:SetDesaturated(false) + button:SetAlpha(1) + else + icon:SetDesaturated(true) + button:SetAlpha(0.4) + end + end + end +end + +function MOD:UpdateUniqueBars() + local bar = MOD.AltVehicleBar or _G["SVUI_ActionBar1"]; + local barID = bar.dataID; + local space = SV.db.ActionBars[barID].buttonspacing + local total = SV.db.ActionBars[barID].buttons; + local rows = SV.db.ActionBars[barID].buttonsPerRow; + local size = SV.db.ActionBars[barID].buttonsize + local point = SV.db.ActionBars[barID].point; + local columns = ceil(total / rows); + if (HasOverrideActionBar() or HasVehicleActionBar()) and total == 12 then bar.backdrop:ClearAllPoints() - bar.backdrop:SetPoint(SV.db.ActionBars["Bar1"].point, bar, SV.db.ActionBars["Bar1"].point) + bar.backdrop:SetPoint(SV.db.ActionBars[barID].point, bar, SV.db.ActionBars[barID].point) bar.backdrop:SetWidth(space + ((size * rows) + (space * (rows - 1)) + space)) bar.backdrop:SetHeight(space + ((size * columns) + (space * (columns - 1)) + space)) bar.backdrop:SetFrameLevel(0); @@ -884,7 +973,10 @@ local Vehicle_Updater = function() bar.backdrop:SetAllPoints() bar.backdrop:SetFrameLevel(0); end - MOD:RefreshBar("Bar1") + + MOD:RefreshBar(barID); + UpdateAltVehicleBindings(); + SetStanceBarButtons(); end --[[ ########################################################## @@ -954,8 +1046,9 @@ CreateActionBars = function(self) if(i == 1) then space = (space + 6) end local thisBar = NewActionBar(barName) - thisBar.binding = barBindingIndex[i] - thisBar.page = barPageIndex[i] + thisBar.dataID = barID; + thisBar.binding = barBindingIndex[i]; + thisBar.page = barPageIndex[i]; if(i == 3) then thisBar:SetPoint("BOTTOMLEFT", _G["SVUI_ActionBar1"], "BOTTOMRIGHT", space, 0) @@ -1036,69 +1129,6 @@ CreateActionBars = function(self) end do - local function SetStanceBarButtons() - local maxForms = GetNumShapeshiftForms(); - local currentForm = GetShapeshiftForm(); - local maxButtons = NUM_STANCE_SLOTS; - local texture, name, isActive, isCastable, _; - for i = 1, maxButtons do - local button = _G["SVUI_StanceBarButton"..i] - local icon = _G["SVUI_StanceBarButton"..i.."Icon"] - if i <= maxForms then - texture, name, isActive, isCastable = GetShapeshiftFormInfo(i) - if texture == "Interface\\Icons\\Spell_Nature_WispSplode" and SV.db.ActionBars.Stance.style == "darkenInactive" then - _, _, texture = GetSpellInfo(name) - end - - icon:SetTexture(texture) - - if(button.cooldown) then - if texture then - button.cooldown:SetAlpha(1) - button.cooldown:SetSwipeColor(0, 0, 0, 1) - button.cooldown:SetDrawBling(true) - else - button.cooldown:SetAlpha(0) - button.cooldown:SetSwipeColor(0, 0, 0, 0) - button.cooldown:SetDrawBling(false) - end - end - - if isActive then - StanceBarFrame.lastSelected = button:GetID() - - if maxForms > 1 then - if button.checked then button.checked:SetTexture(0, 0.5, 0, 0.2) end - button:SetBackdropBorderColor(0.4, 0.8, 0) - end - icon:SetVertexColor(1, 1, 1) - button:SetChecked(true) - else - if maxForms > 1 and currentForm > 0 then - button:SetBackdropBorderColor(0, 0, 0) - if button.checked then - button.checked:SetAlpha(1) - end - if SV.db.ActionBars.Stance.style == "darkenInactive" then - icon:SetVertexColor(0.25, 0.25, 0.25) - else - icon:SetVertexColor(1, 1, 1) - end - end - - button:SetChecked(false) - end - if isCastable then - icon:SetDesaturated(false) - button:SetAlpha(1) - else - icon:SetDesaturated(true) - button:SetAlpha(0.4) - end - end - end - end - local function UpdateShapeshiftForms(self, event) if InCombatLockdown() or not _G["SVUI_StanceBar"] then return end @@ -1181,7 +1211,6 @@ do self:RegisterEvent("UPDATE_SHAPESHIFT_COOLDOWN", UpdateShapeshiftCD) self:RegisterEvent("UPDATE_SHAPESHIFT_USABLE", SetStanceBarButtons) self:RegisterEvent("UPDATE_SHAPESHIFT_FORM", SetStanceBarButtons) - self:RegisterEvent("ACTIONBAR_PAGE_CHANGED", SetStanceBarButtons) UpdateShapeshiftForms() stanceBar.snapOffset = -3 SV:NewAnchor(stanceBar, L["Stance Bar"]) @@ -1567,8 +1596,9 @@ function MOD:Load() self:RegisterEvent("UPDATE_BINDINGS", "UpdateAllBindings") self:RegisterEvent("PET_BATTLE_CLOSE", "UpdateAllBindings") self:RegisterEvent("PET_BATTLE_OPENING_DONE", ResetAllBindings) - self:RegisterEvent("UPDATE_VEHICLE_ACTIONBAR", Vehicle_Updater) - self:RegisterEvent("UPDATE_OVERRIDE_ACTIONBAR", Vehicle_Updater) + self:RegisterEvent("UPDATE_VEHICLE_ACTIONBAR", "UpdateUniqueBars") + self:RegisterEvent("UPDATE_OVERRIDE_ACTIONBAR", "UpdateUniqueBars") + self:RegisterEvent("ACTIONBAR_PAGE_CHANGED", "UpdateUniqueBars") if C_PetBattles.IsInBattle()then ResetAllBindings(self) else diff --git a/SVUI_Inventory/SVUI_Inventory.lua b/SVUI_Inventory/SVUI_Inventory.lua index 97ae8ea..cadeb35 100644 --- a/SVUI_Inventory/SVUI_Inventory.lua +++ b/SVUI_Inventory/SVUI_Inventory.lua @@ -58,6 +58,7 @@ local DEBUG_BAGS = false; local CreateFrame = _G.CreateFrame; local hooksecurefunc = _G.hooksecurefunc; local numBagFrame = NUM_BAG_FRAMES + 1; +local MULTI_BAG_LAYOUT = false; local LOOT_CACHE, GEAR_CACHE, GEARSET_LISTING = {}, {}, {}; local internalTimer; local RefProfessionColors = { @@ -184,7 +185,7 @@ local function SearchInBags(frame) end function MOD:INVENTORY_SEARCH_UPDATE() - SearchInBags(self.BagFrame) + SearchInBags(self.MasterFrame) SearchInBags(self.BankFrame) SearchInBags(self.ReagentFrame) end @@ -316,8 +317,10 @@ local ContainerFrame_UpdateLayout = function(self) local precount = 0; for i, bagID in ipairs(self.BagIDs) do - local numSlots = GetContainerNumSlots(bagID); - precount = precount + (numSlots or 0); + if((not MULTI_BAG_LAYOUT) or (isBank or (bagID > 0))) then + local numSlots = GetContainerNumSlots(bagID); + precount = precount + (numSlots or 0); + end end if(SV.db.Inventory.alignToChat) then @@ -440,6 +443,13 @@ local ContainerFrame_UpdateLayout = function(self) self.Bags[bagID].SlotUpdate = SlotUpdate; self.Bags[bagID].RefreshSlots = ContainerFrame_RefreshSlots; end + local bagAnchor = self.holderFrame; + if(self.Bags[bagID].holderFrame) then + bagAnchor = self.Bags[bagID].holderFrame; + lastButton = false; + lastRowButton = false; + totalSlots = 0; + end self.Bags[bagID].numSlots = numSlots; self.Bags[bagID].bagFamily = false; @@ -691,8 +701,8 @@ function MOD:RefreshBagFrames(frame) self[frame]:UpdateLayout() return else - if(self.BagFrame) then - self.BagFrame:UpdateLayout() + if(self.MasterFrame) then + self.MasterFrame:UpdateLayout() end if self.BankFrame then self.BankFrame:UpdateLayout() @@ -717,7 +727,7 @@ function SV:SetLootTooltip(tooltip, itemKey) end function MOD:UpdateGoldText() - self.BagFrame.goldText:SetText(GetCoinTextureString(GetMoney(), 12)) + self.MasterFrame.goldText:SetText(GetCoinTextureString(GetMoney(), 12)) end function MOD:VendorCheck(itemID, bagID, slot) @@ -733,19 +743,19 @@ function MOD:ModifyBags() local docked = SV.db.Inventory.alignToChat local anchor, x, y if(docked) then - if self.BagFrame then - self.BagFrame:ClearAllPoints() - self.BagFrame:SetPoint("BOTTOMRIGHT", SV.Dock.BottomRight, "BOTTOMRIGHT", 0, 0) + if self.MasterFrame then + self.MasterFrame:ClearAllPoints() + self.MasterFrame:SetPoint("BOTTOMRIGHT", SV.Dock.BottomRight, "BOTTOMRIGHT", 0, 0) end if self.BankFrame then self.BankFrame:ClearAllPoints() self.BankFrame:SetPoint("BOTTOMLEFT", SV.Dock.BottomLeft, "BOTTOMLEFT", 0, 0) end else - if self.BagFrame then + if self.MasterFrame then local anchor, x, y = SV.db.Inventory.bags.point, SV.db.Inventory.bags.xOffset, SV.db.Inventory.bags.yOffset - self.BagFrame:ClearAllPoints() - self.BagFrame:SetPoint(anchor, SV.Screen, anchor, x, y) + self.MasterFrame:ClearAllPoints() + self.MasterFrame:SetPoint(anchor, SV.Screen, anchor, x, y) end if self.BankFrame then local anchor, x, y = SV.db.Inventory.bank.point, SV.db.Inventory.bank.xOffset, SV.db.Inventory.bank.yOffset @@ -784,7 +794,7 @@ do if(reset) then BagBar:SetPoint("BOTTOMLEFT", SV.Dock.BottomRight.Window, "TOPLEFT", -4, 0) else - BagBar:SetPoint("BOTTOMLEFT", self.BagFrame, "TOPLEFT", -4, 0) + BagBar:SetPoint("BOTTOMLEFT", self.MasterFrame, "TOPLEFT", -4, 0) end end end @@ -1063,31 +1073,10 @@ do MOD:PositionBagBar(true) end - function MOD:MakeBagFrame(containerID) - local bagName = "SVUI_ContainerFrame" .. containerID; - local uisCount = #UISpecialFrames + 1; - local frame = CreateFrame("Button", bagName, SV.Screen) - - frame:SetStyle("Frame", "Pattern") - frame:SetFrameStrata("HIGH") - frame:SetMovable(true) - frame:RegisterForDrag("LeftButton", "RightButton") - frame:RegisterForClicks("AnyUp") - frame:SetScript("OnDragStart", Container_OnDragStart) - frame:SetScript("OnDragStop", Container_OnDragStop) - frame:SetScript("OnClick", Container_OnClick) - frame:SetScript("OnEnter", Container_OnEnter) - frame:SetScript("OnLeave", Token_OnLeave) - frame:SetScript("OnHide", Container_OnHide) - frame:SetScript("OnShow", Container_OnShow) - tinsert(UISpecialFrames, bagName) - self.ContainerFrame[containerID] = frame - end - - function MOD:MakeBags() - local bagName = "SVUI_ContainerFrame" - local uisCount = #UISpecialFrames + 1; - local frame = CreateFrame("Button", "SVUI_ContainerFrame", SV.Screen) + function MOD:CreateMasterFrame() + local bagName = "SVUI_ContainerFrame"; + local frame = CreateFrame("Button", "SVUI_ContainerFrame", SV.Screen); + tinsert(UISpecialFrames, bagName); frame:SetStyle("Frame", "Pattern") frame:SetFrameStrata("HIGH") @@ -1122,10 +1111,9 @@ do frame:Hide() frame.bottomOffset = 32; frame.topOffset = 65; - frame.BagIDs = {0, 1, 2, 3, 4} - frame.Bags = {} + frame.closeButton = CreateFrame("Button", "SVUI_ContainerFrameCloseButton", frame, "UIPanelCloseButton") frame.closeButton:SetPoint("TOPRIGHT", -4, -4) SV.API:Set("CloseButton", frame.closeButton); @@ -1252,6 +1240,7 @@ do frame.currencyButton:SetPoint("BOTTOMLEFT", frame, "BOTTOMLEFT", 4, 0) frame.currencyButton:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -4, 0) frame.currencyButton:SetHeight(32) + for h = 1, MAX_WATCHED_TOKENS do frame.currencyButton[h] = CreateFrame("Button", nil, frame.currencyButton) frame.currencyButton[h]:SetSize(22, 22) @@ -1269,12 +1258,50 @@ do frame.currencyButton[h]:Hide() end - tinsert(UISpecialFrames, bagName) + if(MULTI_BAG_LAYOUT) then + for i, bagID in ipairs(frame.BagIDs) do + if(bagID > 0) then + local singleBagFrameName = "SVUI_ContainerFrameBag" .. bagID; + local singleBagFrame = CreateFrame("Button", singleBagFrameName, SV.Screen); + tinsert(UISpecialFrames, singleBagFrameName); + + singleBagFrame:SetStyle("Frame", "Pattern") + singleBagFrame:SetFrameStrata("HIGH") + singleBagFrame:SetMovable(true) + singleBagFrame:RegisterForDrag("LeftButton", "RightButton") + singleBagFrame:RegisterForClicks("AnyUp") + singleBagFrame:SetID(bagID); + singleBagFrame.SlotUpdate = SlotUpdate; + singleBagFrame.RefreshSlots = ContainerFrame_RefreshSlots; + + singleBagFrame.closeButton = CreateFrame("Button", singleBagFrameName .. "CloseButton", singleBagFrame, "UIPanelCloseButton") + singleBagFrame.closeButton:SetPoint("TOPRIGHT", -4, -4) + SV.API:Set("CloseButton", singleBagFrame.closeButton); + singleBagFrame.closeButton:SetScript("PostClick", function() + if(not InCombatLockdown()) then CloseBag(0) end + end) + + singleBagFrame.holderFrame = CreateFrame("Frame", nil, singleBagFrame) + singleBagFrame.holderFrame:SetPoint("TOP", singleBagFrame, "TOP", 0, -8) + singleBagFrame.holderFrame:SetPoint("BOTTOM", singleBagFrame, "BOTTOM", 0, 8) + + singleBagFrame:SetScript("OnDragStart", Container_OnDragStart) + singleBagFrame:SetScript("OnDragStop", Container_OnDragStop) + singleBagFrame:SetScript("OnClick", Container_OnClick) + singleBagFrame:SetScript("OnEnter", Container_OnEnter) + singleBagFrame:SetScript("OnLeave", Token_OnLeave) + singleBagFrame:SetScript("OnHide", Container_OnHide) + singleBagFrame:SetScript("OnShow", Container_OnShow) + + frame.Bags[bagID] = singleBagFrame; + end + end + end - self.BagFrame = frame + self.MasterFrame = frame end - function MOD:MakeBankOrReagent(isReagent) + function MOD:CreateBankOrReagentFrame(isReagent) -- Reagent Slots: 1 - 98 -- /script print(ReagentBankFrameItem1:GetInventorySlot()) local bagName = isReagent and "SVUI_ReagentContainerFrame" or "SVUI_BankContainerFrame" @@ -1283,7 +1310,7 @@ do local frame = CreateFrame("Button", bagName, isReagent and self.BankFrame or SV.Screen) frame:SetStyle("Frame", "Pattern") frame:SetFrameStrata("HIGH") - frame:SetFrameLevel(self.BagFrame:GetFrameLevel() + 99) + frame:SetFrameLevel(self.MasterFrame:GetFrameLevel() + 99) frame.UpdateLayout = isReagent and ReagentFrame_UpdateLayout or ContainerFrame_UpdateLayout; frame.RefreshBags = ContainerFrame_UpdateBags; @@ -1475,7 +1502,7 @@ do end function MOD:RefreshTokens() - local frame = MOD.BagFrame; + local frame = MOD.MasterFrame; local index = 0; for i=1,MAX_WATCHED_TOKENS do @@ -1501,13 +1528,13 @@ function MOD:RefreshTokens() frame.bottomOffset = 8; if frame.currencyButton:IsShown() then frame.currencyButton:Hide() - MOD.BagFrame:UpdateLayout() + MOD.MasterFrame:UpdateLayout() end return elseif not frame.currencyButton:IsShown() then frame.bottomOffset = 28; frame.currencyButton:Show() - MOD.BagFrame:UpdateLayout() + MOD.MasterFrame:UpdateLayout() end frame.bottomOffset = 28; @@ -1525,7 +1552,7 @@ function MOD:RefreshTokens() end local function _isBagOpen(bagID) - if(MOD.BagFrame.Bags[0] and MOD.BagFrame.Bags[0]:IsShown()) then + if(MOD.MasterFrame.Bags[0] and MOD.MasterFrame.Bags[0]:IsShown()) then return true elseif(MOD.BankFrame.Bags[bagID] and MOD.BankFrame.Bags[bagID]:IsShown()) then return true @@ -1536,21 +1563,21 @@ end local function _openBags() --print('_openBags') GameTooltip:Hide() - if(not MOD.BagFrame:IsShown()) then - MOD.BagFrame:Show() - MOD.BagFrame:RefreshBags() + if(not MOD.MasterFrame:IsShown()) then + MOD.MasterFrame:Show() + MOD.MasterFrame:RefreshBags() if(SV.Tooltip) then SV.Tooltip.GameTooltip_SetDefaultAnchor(GameTooltip) end - MOD.BagFrame.editBox:SearchReset() + MOD.MasterFrame.editBox:SearchReset() end end local function _closeBags() --print('_closeBags') GameTooltip:Hide() - if(MOD.BagFrame:IsShown()) then - MOD.BagFrame:Hide() + if(MOD.MasterFrame:IsShown()) then + MOD.MasterFrame:Hide() if(MOD.BankFrame) then MOD.BankFrame:Hide() end @@ -1563,7 +1590,7 @@ local function _closeBags() if(SV.Tooltip) then SV.Tooltip.GameTooltip_SetDefaultAnchor(GameTooltip) end - MOD.BagFrame.editBox:SearchReset() + MOD.MasterFrame.editBox:SearchReset() end NEXT_ACTION_TOGGLED = false end @@ -1625,11 +1652,11 @@ local function _toggleByID(bagID) local size = GetContainerNumSlots(bagID); if((size > 0) or (bagID == KEYRING_CONTAINER)) then --print('ToggleBag: '..bagID) - if(not MOD.BagFrame:IsShown()) then + if(not MOD.MasterFrame:IsShown()) then _openBags() end - if(MOD.BagFrame.Bags[bagID]) then - MOD.BagFrame.Bags[bagID]:RefreshSlots() + if(MOD.MasterFrame.Bags[bagID]) then + MOD.MasterFrame.Bags[bagID]:RefreshSlots() elseif(MOD.BankFrame and MOD.BankFrame.Bags[bagID]) then MOD.BankFrame.Bags[bagID]:RefreshSlots() elseif(MOD.ReagentFrame and MOD.ReagentFrame.Bags[bagID]) then @@ -1678,12 +1705,12 @@ end function MOD:BANKFRAME_OPENED() if(not self.BankFrame) then - self:MakeBankOrReagent() + self:CreateBankOrReagentFrame() end self.BankFrame:UpdateLayout() if(not self.ReagentFrame) then - self:MakeBankOrReagent(true) + self:CreateBankOrReagentFrame(true) end if(self.ReagentFrame) then @@ -1694,8 +1721,8 @@ function MOD:BANKFRAME_OPENED() self.BankFrame:Show() self.BankFrame:RefreshBags() - self.BagFrame:Show() - self.BagFrame:RefreshBags() + self.MasterFrame:Show() + self.MasterFrame:RefreshBags() self.RefreshTokens() end @@ -1719,7 +1746,7 @@ end function MOD:PLAYER_ENTERING_WORLD() self:UpdateGoldText() - self.BagFrame:RefreshBags() + self.MasterFrame:RefreshBags() end local function ResetInventoryLogs() @@ -1800,9 +1827,9 @@ function MOD:Load() end self:ModifyBagBar() - self:MakeBags() + self:CreateMasterFrame() self:ModifyBags() - self.BagFrame:UpdateLayout() + self.MasterFrame:UpdateLayout() self:InitializeMenus() diff --git a/SVUI_NamePlates/SVUI_NamePlates.lua b/SVUI_NamePlates/SVUI_NamePlates.lua index 3901cd5..83f8c97 100644 --- a/SVUI_NamePlates/SVUI_NamePlates.lua +++ b/SVUI_NamePlates/SVUI_NamePlates.lua @@ -1158,7 +1158,10 @@ do local ref, skin = {}, {}; local barRegions, fontRegions = plate:GetChildren() - local health, cast = barRegions:GetChildren() + local health, absorb, cast = barRegions:GetChildren() + if(not cast) then + cast = absorb; + end ref.threat, ref.border, diff --git a/SVUI_Tooltip/SVUI_Tooltip.lua b/SVUI_Tooltip/SVUI_Tooltip.lua index 5b310a6..5444b07 100644 --- a/SVUI_Tooltip/SVUI_Tooltip.lua +++ b/SVUI_Tooltip/SVUI_Tooltip.lua @@ -677,8 +677,8 @@ local _hook_GameTooltip_SetDefaultAnchor = function(self, parent) end if(MOD.Holder.Grip and (not MOD.Holder.Grip:HasMoved())) then self:ClearAllPoints() - if(SV.Inventory and SV.Inventory.BagFrame and SV.Inventory.BagFrame:IsShown()) then - self:SetPoint("BOTTOMLEFT", SV.Inventory.BagFrame, "TOPLEFT", 0, MOD.DefaultPadding) + if(SV.Inventory and SV.Inventory.MasterFrame and SV.Inventory.MasterFrame:IsShown()) then + self:SetPoint("BOTTOMLEFT", SV.Inventory.MasterFrame, "TOPLEFT", 0, MOD.DefaultPadding) elseif(SV.Dock.BottomRight:GetAlpha() == 1 and SV.Dock.BottomRight:IsShown()) then self:SetPoint("BOTTOMLEFT", SV.Dock.BottomRight.Window, "TOPLEFT", 0, MOD.DefaultPadding) else