diff --git a/Interface/AddOns/SVUI/SVUI.toc b/Interface/AddOns/SVUI/SVUI.toc index 4e5264d..572cf9a 100644 --- a/Interface/AddOns/SVUI/SVUI.toc +++ b/Interface/AddOns/SVUI/SVUI.toc @@ -1,6 +1,6 @@ ## Interface: 60000 ## Author: Munglunch -## Version: 4.8 +## Version: 4.9 ## Title: |cffFF9900SVUI|r ## Notes: Supervillain UI [|cff9911FFCore Framework|r]. ## SavedVariables: SVUI_Global diff --git a/Interface/AddOns/SVUI/assets/artwork/Icons/COUNT-1.blp b/Interface/AddOns/SVUI/assets/artwork/Icons/COUNT-1.blp new file mode 100644 index 0000000..32efb88 Binary files /dev/null and b/Interface/AddOns/SVUI/assets/artwork/Icons/COUNT-1.blp differ diff --git a/Interface/AddOns/SVUI/assets/artwork/Icons/COUNT-2.blp b/Interface/AddOns/SVUI/assets/artwork/Icons/COUNT-2.blp new file mode 100644 index 0000000..bef839f Binary files /dev/null and b/Interface/AddOns/SVUI/assets/artwork/Icons/COUNT-2.blp differ diff --git a/Interface/AddOns/SVUI/assets/artwork/Icons/COUNT-3.blp b/Interface/AddOns/SVUI/assets/artwork/Icons/COUNT-3.blp new file mode 100644 index 0000000..a46772e Binary files /dev/null and b/Interface/AddOns/SVUI/assets/artwork/Icons/COUNT-3.blp differ diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_ActionPanel/oUF_ActionPanel.toc b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_ActionPanel/oUF_ActionPanel.toc index 5517fa0..9deaa79 100644 --- a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_ActionPanel/oUF_ActionPanel.toc +++ b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_ActionPanel/oUF_ActionPanel.toc @@ -2,7 +2,7 @@ ## Title: oUF ActionPanel ## Notes: Adds a backing to all unit frames that provides many utilities. ## Author: Munglunch -## Version: 4.8 +## Version: 4.9 ## X-Category: oUF ## Dependencies: oUF diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Afflicted/oUF_Afflicted.toc b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Afflicted/oUF_Afflicted.toc index f86751f..e56137c 100644 --- a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Afflicted/oUF_Afflicted.toc +++ b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Afflicted/oUF_Afflicted.toc @@ -2,7 +2,7 @@ ## Title: oUF Afflicted ## Notes: Adds Custom Debuff Highlighting to oUF. ## Author: Munglunch -## Version: 4.8 +## Version: 4.9 ## X-Category: oUF ## Dependencies: oUF diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_ArcaneCharge/oUF_ArcaneCharge.toc b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_ArcaneCharge/oUF_ArcaneCharge.toc index 4c12506..6cbcafa 100644 --- a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_ArcaneCharge/oUF_ArcaneCharge.toc +++ b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_ArcaneCharge/oUF_ArcaneCharge.toc @@ -2,7 +2,7 @@ ## Title: oUF Arcane Charge ## Notes: Adds support for arcane charge indicators to oUF. ## Author: Munglunch -## Version: 4.8 +## Version: 4.9 ## Dependencies: oUF oUF_ArcaneCharge.lua \ No newline at end of file diff --git a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Combatant/oUF_Combatant.toc b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Combatant/oUF_Combatant.toc index 2d58083..3fd9fb2 100644 --- a/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Combatant/oUF_Combatant.toc +++ b/Interface/AddOns/SVUI/libs/oUF_Villain/Plugins/oUF_Combatant/oUF_Combatant.toc @@ -2,7 +2,7 @@ ## Title: oUF Combatant ## Notes: Adds PvP trinket status and spec icons to oUF frames. ## Author: Munglunch -## Version: 4.80 +## Version: 4.90 ## X-Category: oUF ## Dependencies: oUF diff --git a/Interface/AddOns/SVUI/packages/aura/SVAura.lua b/Interface/AddOns/SVUI/packages/aura/SVAura.lua index a849539..c0f31a8 100644 --- a/Interface/AddOns/SVUI/packages/aura/SVAura.lua +++ b/Interface/AddOns/SVUI/packages/aura/SVAura.lua @@ -270,10 +270,10 @@ do if aura.SetDisabledTexture then aura:SetDisabledTexture("") end aura:SetBackdrop({ bgFile = [[Interface\BUTTONS\WHITE8X8]], - tile = false, - tileSize = 0, - edgeFile = [[Interface\BUTTONS\WHITE8X8]], - edgeSize = 2, + tile = false, + tileSize = 0, + edgeFile = [[Interface\BUTTONS\WHITE8X8]], + edgeSize = 3, insets = { left = 0, right = 0, @@ -290,6 +290,7 @@ do end aura.Skinned = true end + local font = LSM:Fetch("font", SV.db.SVAura.font) aura.texture = aura:CreateTexture(nil, "BORDER") aura.texture:FillInner(aura, 2, 2) diff --git a/Interface/AddOns/SVUI/packages/bag/SVBag.lua b/Interface/AddOns/SVUI/packages/bag/SVBag.lua index 659e0d0..f46e5b9 100644 --- a/Interface/AddOns/SVUI/packages/bag/SVBag.lua +++ b/Interface/AddOns/SVUI/packages/bag/SVBag.lua @@ -212,73 +212,70 @@ end local SlotUpdate = function(self, slotID) if(not self[slotID]) then return end - local bag = self:GetID() - local slot, _ = self[slotID], nil; + + local bag = self:GetID(); + local slot = self[slotID]; local bagType = self.bagFamily; - local texture, count, locked = GetContainerItemInfo(bag, slotID) - local itemLink = GetContainerItemLink(bag, slotID); - local key; + slot:Show() - slot.name, slot.rarity = nil, nil; - local start, duration, enable = GetContainerItemCooldown(bag, slotID) - CooldownFrame_SetTimer(slot.cooldown, start, duration, enable) - if duration > 0 and enable == 0 then + + local texture, count, locked, rarity = GetContainerItemInfo(bag, slotID); + local start, duration, enable = GetContainerItemCooldown(bag, slotID); + + CooldownFrame_SetTimer(slot.cooldown, start, duration, enable); + + if(duration > 0 and enable == 0) then SetItemButtonTextureVertexColor(slot, 0.4, 0.4, 0.4) else SetItemButtonTextureVertexColor(slot, 1, 1, 1) - end - if bagType then + end + + if(bagType) then local r, g, b = bagType[1], bagType[2], bagType[3]; slot:SetBackdropColor(r, g, b, 0.5) slot:SetBackdropBorderColor(r, g, b, 1) - elseif itemLink then - local class, subclass, maxStack; - key, _, slot.rarity, _, _, class, subclass, maxStack = GetItemInfo(itemLink) - slot.name = key - local z, A, C = GetContainerItemQuestInfo(bag, slotID) - if A and not isActive then - slot:SetBackdropBorderColor(1.0, 0.3, 0.3) - elseif A or z then - slot:SetBackdropBorderColor(1.0, 0.3, 0.3) - elseif slot.rarity and slot.rarity>1 then - local D, E, F = GetItemQualityColor(slot.rarity) - slot:SetBackdropBorderColor(D, E, F) + elseif(rarity) then + if(rarity > 1) then + local r, g, b = GetItemQualityColor(rarity) + slot:SetBackdropBorderColor(r, g, b) else slot:SetBackdropBorderColor(0, 0, 0) end else slot:SetBackdropBorderColor(0, 0, 0) - end - if C_NewItems.IsNewItem(bag, slotID)then + end + + if(C_NewItems.IsNewItem(bag, slotID)) then ActionButton_ShowOverlayGlow(slot) else ActionButton_HideOverlayGlow(slot) - end + end + SetItemButtonTexture(slot, texture) SetItemButtonCount(slot, count) SetItemButtonDesaturated(slot, locked, 0.5, 0.5, 0.5) end -local RefreshSlots = function(self, bagID) - local id = bagID or self:GetID() - if(not id or (not self.SlotUpdate)) then return end - local maxcount = GetContainerNumSlots(id) - for i = 1, maxcount do - self:SlotUpdate(i) +local RefreshSlots = function(self) + local bagID = self:GetID() + if(not bagID or (not self.SlotUpdate)) then return end + local maxcount = GetContainerNumSlots(bagID) + for slotID = 1, maxcount do + self:SlotUpdate(slotID) end end local BagMenu_OnEnter = function(self) local parent = self.parent if(not parent) then return end - for id, bag in ipairs(parent.Bags) do - local numSlots = GetContainerNumSlots(id) - for i = 1, numSlots do - if bag[i] then - if id == self.id then - bag[i]:SetAlpha(1) + for bagID, bag in ipairs(parent.Bags) do + local numSlots = GetContainerNumSlots(bagID) + for slotID = 1, numSlots do + if bag[slotID] then + if bagID == self.id then + bag[slotID]:SetAlpha(1) else - bag[i]:SetAlpha(0.1) + bag[slotID]:SetAlpha(0.1) end end end @@ -288,26 +285,26 @@ end local BagMenu_OnLeave = function(self) local parent = self.parent if(not parent) then return end - for id, bag in ipairs(parent.Bags) do - local numSlots = GetContainerNumSlots(id) - for i = 1, numSlots do - if bag[i] then - bag[i]:SetAlpha(1) + for bagID, bag in ipairs(parent.Bags) do + local numSlots = GetContainerNumSlots(bagID) + for slotID = 1, numSlots do + if bag[slotID] then + bag[slotID]:SetAlpha(1) end end end end local ContainerFrame_UpdateCooldowns = function(self) - for id, bag in ipairs(self.Bags) do - for i = 1, GetContainerNumSlots(id)do - local start, duration, enable = GetContainerItemCooldown(id, i) - if(bag[i]) then - CooldownFrame_SetTimer(bag[i].cooldown, start, duration, enable) + for bagID, bag in ipairs(self.Bags) do + for slotID = 1, GetContainerNumSlots(bagID)do + local start, duration, enable = GetContainerItemCooldown(bagID, slotID) + if(bag[slotID]) then + CooldownFrame_SetTimer(bag[slotID].cooldown, start, duration, enable) if duration > 0 and enable == 0 then - SetItemButtonTextureVertexColor(bag[i], 0.4, 0.4, 0.4) + SetItemButtonTextureVertexColor(bag[slotID], 0.4, 0.4, 0.4) else - SetItemButtonTextureVertexColor(bag[i], 1, 1, 1) + SetItemButtonTextureVertexColor(bag[slotID], 1, 1, 1) end end end @@ -315,8 +312,8 @@ local ContainerFrame_UpdateCooldowns = function(self) end local ContainerFrame_UpdateBags = function(self) - for id, bag in ipairs(self.Bags) do - bag:RefreshSlots(id) + for bagID, bag in ipairs(self.Bags) do + bag:RefreshSlots() end end @@ -325,6 +322,7 @@ local ContainerFrame_UpdateLayout = function(self) local isBank = self.isBank local isReagent = self.isReagent + local containerName = self:GetName() local buttonSpacing, numContainerRows = 8, 0; local containerWidth, numContainerColumns, buttonSize @@ -360,148 +358,176 @@ local ContainerFrame_UpdateLayout = function(self) local bottomPadding = (containerWidth - holderWidth) * 0.5; local lastButton, lastRowButton, globalName; local numContainerSlots, fullContainerSlots = GetNumBankSlots(); + local totalSlots = 0; self.holderFrame:Width(holderWidth); - self.totalSlots = 0; - for i, bagID in ipairs(self.BagIDs) do - if(not isReagent) then - if((not isBank and bagID <= 3) or (isBank and bagID ~= -1 and numContainerSlots >= 1 and not ((i - 1) > numContainerSlots))) then + local menu = self.BagMenu - self.BagMenu:Size(((buttonSize + buttonSpacing) * (isBank and i - 1 or i)) + buttonSpacing, buttonSize + (buttonSpacing * 2)) + if(not isReagent) then + for i, bagID in ipairs(self.BagIDs) do + if((not isBank and bagID <= 3) or (isBank and bagID ~= -1 and numContainerSlots >= 1 and not ((i - 1) > numContainerSlots))) then + menu:Size(((buttonSize + buttonSpacing) * (isBank and i - 1 or i)) + buttonSpacing, buttonSize + (buttonSpacing * 2)) - if(not self.BagMenu[i]) then + local bagSlot; + + if(not menu[i]) then if isBank then - globalName = "SVUI_BankBag" .. (bagID - 4); - self.BagMenu[i] = NewFrame("CheckButton", globalName, self.BagMenu, "BankItemButtonBagTemplate") + globalName = ("SVUI_BankBag%d"):format((bagID - 4)); + bagSlot = NewFrame("CheckButton", globalName, menu, "BankItemButtonBagTemplate") else - globalName = "SVUI_MainBag" .. bagID .. "Slot"; - self.BagMenu[i] = NewFrame("CheckButton", globalName, self.BagMenu, "BagSlotButtonTemplate") + globalName = ("SVUI_MainBag%dSlot"):format(bagID); + bagSlot = NewFrame("CheckButton", globalName, menu, "BagSlotButtonTemplate") end - self.BagMenu[i].parent = self; - self.BagMenu[i].id = isBank and bagID or bagID + 1; + bagSlot.parent = self; - self.BagMenu[i]:SetNormalTexture("") - self.BagMenu[i]:SetCheckedTexture("") - self.BagMenu[i]:SetPushedTexture("") - self.BagMenu[i]:SetScript("OnClick", nil) - self.BagMenu[i]:SetID(isBank and bagID or (bagID + 1)) + bagSlot:SetNormalTexture("") + bagSlot:SetCheckedTexture("") + bagSlot:SetPushedTexture("") + bagSlot:SetScript("OnClick", nil) + + local texName = ("%sIconTexture"):format(globalName) + bagSlot.iconTexture = _G[texName]; + bagSlot.iconTexture:FillInner() + bagSlot.iconTexture:SetTexCoord(0.1, 0.9, 0.1, 0.9) + + bagSlot:HookScript("OnEnter", BagMenu_OnEnter) + bagSlot:HookScript("OnLeave", BagMenu_OnLeave) + + if(isBank) then + bagSlot:SetID(bagID) + bagSlot.id = bagID; + else + bagSlot.id = (bagID + 1); + end - self.BagMenu[i].iconTexture = _G[self.BagMenu[i]:GetName().."IconTexture"]; - self.BagMenu[i].iconTexture:FillInner() - self.BagMenu[i].iconTexture:SetTexCoord(0.1, 0.9, 0.1, 0.9) + menu[i] = bagSlot; + else + bagSlot = menu[i] + end - self.BagMenu[i]:HookScript("OnEnter", BagMenu_OnEnter) - self.BagMenu[i]:HookScript("OnLeave", BagMenu_OnLeave) + bagSlot:Size(buttonSize) + bagSlot:ClearAllPoints() - if(isBank and (not self.BagMenu[i].tooltipText)) then - self.BagMenu[i].tooltipText = "" + if(isBank) then + if(i == 2) then + bagSlot:SetPoint("BOTTOMLEFT", menu, "BOTTOMLEFT", buttonSpacing, buttonSpacing) + else + bagSlot:SetPoint("LEFT", menu[i - 1], "RIGHT", buttonSpacing, 0) end - end - self.BagMenu[i]:Size(buttonSize) - self.BagMenu[i]:ClearAllPoints() - - if (isBank and i == 2) or (not isBank and i == 1) then - self.BagMenu[i]:SetPoint("BOTTOMLEFT", self.BagMenu, "BOTTOMLEFT", buttonSpacing, buttonSpacing) - else - self.BagMenu[i]:SetPoint("LEFT", self.BagMenu[i - 1], "RIGHT", buttonSpacing, 0) + if(bagSlot.GetInventorySlot) then + BankFrameItemButton_Update(bagSlot) + BankFrameItemButton_UpdateLocked(bagSlot) + end + else + if(i == 1) then + bagSlot:SetPoint("BOTTOMLEFT", menu, "BOTTOMLEFT", buttonSpacing, buttonSpacing) + else + bagSlot:SetPoint("LEFT", menu[i - 1], "RIGHT", buttonSpacing, 0) + end end end - end - - local numSlots = GetContainerNumSlots(bagID); - - if not self.Bags[bagID] then - self.Bags[bagID] = NewFrame("Frame", self:GetName().."Bag"..bagID, self); - self.Bags[bagID]:SetID(bagID); - self.Bags[bagID].numSlots = numSlots; - self.Bags[bagID].SlotUpdate = SlotUpdate; - self.Bags[bagID].RefreshSlots = RefreshSlots; - end - local bag = self.Bags[bagID] - - if numSlots > 0 then - local btype = select(2, GetContainerNumFreeSlots(bagID)); - if RefProfessionColors[btype] then - local r, g, b = unpack(RefProfessionColors[btype]); - bag.bagFamily = {r, g, b}; - bag:SetBackdropColor(r, g, b, 0.25) - bag:SetBackdropBorderColor(r, g, b, 1) + local numSlots = GetContainerNumSlots(bagID); + local bagName = ("%sBag%d"):format(containerName, bagID) + local template = (bagID == -1) and "BankItemButtonGenericTemplate" or "ContainerFrameItemButtonTemplate" + local bag; + + if not self.Bags[bagID] then + bag = NewFrame("Frame", bagName, self); + bag:SetID(bagID); + bag.numSlots = numSlots; + bag.SlotUpdate = SlotUpdate; + bag.RefreshSlots = RefreshSlots; + self.Bags[bagID] = bag else - bag.bagFamily = false; + bag = self.Bags[bagID] end - for i = 1, MAX_CONTAINER_ITEMS do - if bag[i] then - bag[i]:Hide(); - end - end + if numSlots > 0 then + local btype = select(2, GetContainerNumFreeSlots(bagID)); + if RefProfessionColors[btype] then + local r, g, b = unpack(RefProfessionColors[btype]); + bag.bagFamily = {r, g, b}; + bag:SetBackdropColor(r, g, b, 0.25) + bag:SetBackdropBorderColor(r, g, b, 1) + else + bag.bagFamily = false; + end - for slotID = 1, numSlots do - self.totalSlots = self.totalSlots + 1; - if not bag[slotID] then - bag[slotID] = NewFrame("CheckButton", bag:GetName().."Slot"..slotID, bag, bagID == -1 and "BankItemButtonGenericTemplate" or "ContainerFrameItemButtonTemplate"); - bag[slotID]:SetNormalTexture(nil); - bag[slotID]:SetCheckedTexture(nil); - bag[slotID]:SetSlotTemplate(true, 2, 0, 0, true); - - if(_G[bag[slotID]:GetName().."NewItemTexture"]) then - _G[bag[slotID]:GetName().."NewItemTexture"]:Hide() + for i = 1, MAX_CONTAINER_ITEMS do + if bag[i] then + bag[i]:Hide(); end + end - bag[slotID].iconTexture = _G[bag[slotID]:GetName().."IconTexture"]; - bag[slotID].iconTexture:FillInner(bag[slotID]); - bag[slotID].iconTexture:SetTexCoord(0.1, 0.9, 0.1, 0.9); - bag[slotID].cooldown = _G[bag[slotID]:GetName().."Cooldown"]; + for slotID = 1, numSlots do + local slot; + totalSlots = totalSlots + 1; + + if not bag[slotID] then + local slotName = ("%sSlot%d"):format(bagName, slotID) + local newTexName = ("%sNewItemTexture"):format(slotName) + local iconName = ("%sIconTexture"):format(slotName) + local cdName = ("%sCooldown"):format(slotName) + + slot = NewFrame("CheckButton", slotName, bag, template); + slot:SetNormalTexture(nil); + slot:SetCheckedTexture(nil); + slot:SetSlotTemplate(true, 2, 0, 0, true); + + if(_G[newTexName]) then + _G[newTexName]:Hide() + end - SV.Timers:AddCooldown(bag[slotID].cooldown) + slot.iconTexture = _G[iconName]; + slot.iconTexture:FillInner(slot); + slot.iconTexture:SetTexCoord(0.1, 0.9, 0.1, 0.9); + slot.cooldown = _G[cdName]; - bag[slotID].bagID = bagID - bag[slotID].slotID = slotID - end + SV.Timers:AddCooldown(slot.cooldown) - bag[slotID]:SetID(slotID); - bag[slotID]:Size(buttonSize); - bag:SlotUpdate(slotID); + bag[slotID] = slot + else + slot = bag[slotID] + end - if bag[slotID]:GetPoint() then - bag[slotID]:ClearAllPoints(); - end + slot:SetID(slotID); + slot:Size(buttonSize); + bag:SlotUpdate(slotID); - if lastButton then - if (self.totalSlots - 1) % numContainerColumns == 0 then - bag[slotID]:Point("TOP", lastRowButton, "BOTTOM", 0, -buttonSpacing); - lastRowButton = bag[slotID]; - numContainerRows = numContainerRows + 1; + if slot:GetPoint() then + slot:ClearAllPoints(); + end + + if lastButton then + if((totalSlots - 1) % numContainerColumns == 0) then + slot:Point("TOP", lastRowButton, "BOTTOM", 0, -buttonSpacing); + numContainerRows = numContainerRows + 1; + lastRowButton = slot; + else + slot:Point("LEFT", lastButton, "RIGHT", buttonSpacing, 0); + end else - bag[slotID]:Point("LEFT", lastButton, "RIGHT", buttonSpacing, 0); - end - else - bag[slotID]:Point("TOPLEFT", self.holderFrame, "TOPLEFT"); - lastRowButton = bag[slotID]; - numContainerRows = numContainerRows + 1; - end + slot:Point("TOPLEFT", self.holderFrame, "TOPLEFT"); + numContainerRows = numContainerRows + 1; + lastRowButton = slot; + end - lastButton = bag[slotID]; - end - else - for i = 1, MAX_CONTAINER_ITEMS do - if(bag[i]) then - bag[i]:Hide(); + lastButton = slot; + end + else + for i = 1, MAX_CONTAINER_ITEMS do + if(bag[i]) then + bag[i]:Hide(); + end end end + end + end - if(isBank and not isReagent) then - if(self.BagMenu[i] and self.BagMenu[i].GetInventorySlot) then - BankFrameItemButton_Update(self.BagMenu[i]) - BankFrameItemButton_UpdateLocked(self.BagMenu[i]) - end - end - end - end self:Size(containerWidth, (((buttonSize + buttonSpacing) * numContainerRows) - buttonSpacing) + self.topOffset + self.bottomOffset); end @@ -809,9 +835,9 @@ do end local Container_OnEvent = function(self, event, ...) - if(event == "ITEM_LOCK_CHANGED" or event == "ITEM_UNLOCKED") then + if(event == "ITEM_LOCK_CHANGED") then local bagID, slotID = ... - if(bagID and self.Bags[bagID]) then + if(bagID and slotID and self.Bags[bagID] and self.Bags[bagID][slotID]) then self.Bags[bagID]:SlotUpdate(slotID) end elseif(event == "BAG_UPDATE" or event == "EQUIPMENT_SETS_CHANGED") then @@ -960,7 +986,8 @@ do local bagName = "SVUI_ContainerFrame" local uisCount = #UISpecialFrames + 1; local bagsCount = #self.BagFrames + 1; - local frame = NewFrame("Button", bagName, SV.UIParent) + local frame = NewFrame("Button", "SVUI_ContainerFrame", SV.UIParent) + frame:SetPanelTemplate("Container") frame:SetFrameStrata("HIGH") frame.UpdateLayout = ContainerFrame_UpdateLayout; @@ -968,7 +995,6 @@ do frame.RefreshCooldowns = ContainerFrame_UpdateCooldowns; frame:RegisterEvent("ITEM_LOCK_CHANGED") - frame:RegisterEvent("ITEM_UNLOCKED") frame:RegisterEvent("BAG_UPDATE_COOLDOWN") frame:RegisterEvent("BAG_UPDATE") frame:RegisterEvent("EQUIPMENT_SETS_CHANGED") @@ -993,12 +1019,12 @@ do frame.topOffset = 65; frame.BagIDs = {0, 1, 2, 3, 4} frame.Bags = {} - frame.closeButton = NewFrame("Button", bagName.."CloseButton", frame, "UIPanelCloseButton") + frame.closeButton = NewFrame("Button", "SVUI_ContainerFrameCloseButton", frame, "UIPanelCloseButton") frame.closeButton:Point("TOPRIGHT", -4, -4) frame.holderFrame = NewFrame("Frame", nil, frame) frame.holderFrame:Point("TOP", frame, "TOP", 0, -frame.topOffset) frame.holderFrame:Point("BOTTOM", frame, "BOTTOM", 0, frame.bottomOffset) - frame.BagMenu = NewFrame("Button", bagName.."BagMenu", frame) + frame.BagMenu = NewFrame("Button", "SVUI_ContainerFrameBagMenu", frame) frame.BagMenu:Point("BOTTOMLEFT", frame, "TOPLEFT", 0, 1) frame.BagMenu:SetFixedPanelTemplate("Transparent") frame.BagMenu:Hide() @@ -1007,7 +1033,7 @@ do frame.goldText:SetFontTemplate(SV.Media.font.numbers) frame.goldText:Point("BOTTOMRIGHT", frame.holderFrame, "TOPRIGHT", -2, 4) frame.goldText:SetJustifyH("RIGHT") - frame.editBox = NewFrame("EditBox", bagName.."EditBox", frame) + frame.editBox = NewFrame("EditBox", "SVUI_ContainerFrameEditBox", frame) frame.editBox:SetFrameLevel(frame.editBox:GetFrameLevel()+2) frame.editBox:SetEditboxTemplate() frame.editBox:Height(15) @@ -1047,7 +1073,7 @@ do frame.sortButton.ttText = L["Sort Bags"] frame.sortButton:SetScript("OnEnter", Tooltip_Show) frame.sortButton:SetScript("OnLeave", Tooltip_Hide) - local Sort_OnClick = (SV.GameVersion >= 60000) and SortBankBags or MOD:RunSortingProcess(MOD.Sort, "bags") + local Sort_OnClick = (SV.GameVersion >= 60000) and SortBags or MOD:RunSortingProcess(MOD.Sort, "bags") frame.sortButton:SetScript("OnClick", Sort_OnClick) frame.stackButton = NewFrame("Button", nil, frame) @@ -1119,7 +1145,7 @@ do end frame:SetScript("OnHide", CloseAllBags) - UISpecialFrames[uisCount] = bagName; + UISpecialFrames[uisCount] = "SVUI_ContainerFrame"; self.BagFrames[bagsCount] = frame self.BagFrame = frame @@ -1129,19 +1155,18 @@ do -- 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, isReagent and self.BankFrame or SV.UIParent) frame:SetPanelTemplate(isReagent and "Action" or "Container") frame:SetFrameStrata("HIGH") + frame.UpdateLayout = ContainerFrame_UpdateLayout; frame.RefreshBags = ContainerFrame_UpdateBags; frame.RefreshCooldowns = ContainerFrame_UpdateCooldowns; frame:RegisterEvent("ITEM_LOCK_CHANGED") - frame:RegisterEvent("ITEM_UNLOCKED") frame:RegisterEvent("BAG_UPDATE_COOLDOWN") frame:RegisterEvent("BAG_UPDATE") frame:RegisterEvent("EQUIPMENT_SETS_CHANGED") @@ -1163,18 +1188,22 @@ do frame:Hide() frame.bottomOffset = 8; frame.topOffset = 60; + 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") frame.closeButton:Point("TOPRIGHT", -4, -4) + frame.holderFrame = NewFrame("Frame", nil, frame) frame.holderFrame:Point("TOP", frame, "TOP", 0, -frame.topOffset) frame.holderFrame:Point("BOTTOM", frame, "BOTTOM", 0, frame.bottomOffset) + frame.BagMenu = NewFrame("Button", bagName.."BagMenu", frame) frame.BagMenu:Point("BOTTOMLEFT", frame, "TOPLEFT", 0, 1) frame.BagMenu:SetFixedPanelTemplate("Transparent") @@ -1188,7 +1217,7 @@ do frame.sortButton.ttText = L["Sort Bags"] frame.sortButton:SetScript("OnEnter", Tooltip_Show) frame.sortButton:SetScript("OnLeave", Tooltip_Hide) - local Sort_OnClick = (SV.GameVersion >= 60000) and SortReagentBankBags or MOD:RunSortingProcess(MOD.Sort, "bank") + local Sort_OnClick = (SV.GameVersion >= 60000) and BankFrame_AutoSortButtonOnClick or MOD:RunSortingProcess(MOD.Sort, "bank") frame.sortButton:SetScript("OnClick", Sort_OnClick) frame.stackButton = NewFrame("Button", nil, frame) @@ -1285,6 +1314,7 @@ end function MOD:RefreshTokens() local frame = MOD.BagFrame; local index = 0; + for i=1,MAX_WATCHED_TOKENS do local name,count,icon,currencyID = GetBackpackCurrencyInfo(i) local set = frame.currencyButton[i] @@ -1302,7 +1332,8 @@ function MOD:RefreshTokens() else set:Hide() end - end + end + if index == 0 then frame.bottomOffset = 8; if frame.currencyButton:IsShown() then @@ -1314,7 +1345,8 @@ function MOD:RefreshTokens() frame.bottomOffset = 28; frame.currencyButton:Show() MOD.BagFrame:UpdateLayout() - end + end + frame.bottomOffset = 28; local set = frame.currencyButton; if index == 1 then diff --git a/Interface/AddOns/SVUI/scripts/ego.lua b/Interface/AddOns/SVUI/scripts/ego.lua index 45a8b51..c0b963b 100644 --- a/Interface/AddOns/SVUI/scripts/ego.lua +++ b/Interface/AddOns/SVUI/scripts/ego.lua @@ -31,15 +31,41 @@ GET ADDON DATA local SV = select(2, ...) local L = SV.L +local Sequences = { + {65, 1000}, --shrug + {68, 1000}, --cheer + {70, 1000}, --laugh + {74, 1000}, --roar + {77, 1000}, --cry + {84, 1000}, --point + {82, 1000}, --flex +}; + local EgoFrame = CreateFrame("PlayerModel", "SVUI_EgoModel", UIParent); -local LaunchPopup = function(self, emote) +local function rng() + return random(1, #Sequences) +end + +local LaunchAnimation = function(self, key) + key = key or rng() + local emote = Sequences[key][1] + self:Show() + self.anim[2]:SetOffset(0, 0) + self.anim[2]:SetOffset(0, 0) + self.anim:Play() + self:SetAnimation(emote) +end + +local LaunchFreezeFrame = function(self, key) + key = key or rng() + local animation = Sequences[key] local size = SVUIParent:GetHeight() self:Show() self.anim[2]:SetOffset(size, -size) self.anim[2]:SetOffset(0, 0) self.anim:Play() - self:SetAnimation(emote) + self:SetSequenceTime(unpack(animation)) end local ResetPosition = function(self) @@ -52,14 +78,14 @@ end local Ego_OnEvent = function(self, event) if event == "ACHIEVEMENT_EARNED" then - self:LaunchPopup(74) + self:LaunchAnimation(4) else - self:LaunchPopup(84) + self:LaunchAnimation(6) end end function BeAwesome() - EgoFrame:LaunchPopup(74) + EgoFrame:LaunchAnimation(4) end function SV:ToggleEgo() @@ -83,10 +109,11 @@ local function LoadSVEgo() EgoFrame:SetWidth(size) EgoFrame:SetHeight(size) EgoFrame:SetUnit("player") - EgoFrame.LaunchPopup = LaunchPopup + EgoFrame.LaunchAnimation = LaunchAnimation + EgoFrame.LaunchFreezeFrame = LaunchFreezeFrame EgoFrame.ResetPosition = ResetPosition - SV.Animate:Slide(EgoFrame, size, -size, true, 1.5) + SV.Animate:Slide(EgoFrame, 0, 0, true, 1.5) EgoFrame:SetAlpha(0) EgoFrame.anim[4]:SetScript("OnFinished", EgoPop_OnUpdate) diff --git a/Interface/AddOns/SVUI/scripts/mounts.lua b/Interface/AddOns/SVUI/scripts/mounts.lua index 6a98ada..9023c1b 100644 --- a/Interface/AddOns/SVUI/scripts/mounts.lua +++ b/Interface/AddOns/SVUI/scripts/mounts.lua @@ -16,17 +16,17 @@ S U P E R - V I L L A I N - U I By: Munglunch # LOCALIZED LUA FUNCTIONS ########################################################## ]]-- -if(select(4, GetBuildInfo()) >= 60000) then return end; --[[ GLOBALS ]]-- local _G = _G; -local unpack = _G.unpack; -local select = _G.select; -local pairs = _G.pairs; -local tonumber = _G.tonumber; -local tinsert = _G.tinsert; -local table = _G.table; -local bit = _G.bit; - +local unpack = _G.unpack; +local select = _G.select; +local pairs = _G.pairs; +local tonumber = _G.tonumber; +local tinsert = _G.tinsert; +local table = _G.table; +local math = _G.math; +local bit = _G.bit; +local random = math.random; local twipe,band = table.wipe, bit.band; --[[ ########################################################## @@ -41,14 +41,55 @@ LOCAL VARIABLES ########################################################## ]]-- local ttSummary = ""; +local NewHook = hooksecurefunc; +local CountMounts, MountInfo, RandomMount, MountUp, UnMount; + local MountListener = CreateFrame("Frame"); +MountListener.favorites = 0 --[[ ########################################################## LOCAL FUNCTIONS ########################################################## ]]-- +if(select(4, GetBuildInfo()) >= 60000) then + function CountMounts() + return C_MountJournal.GetNumMounts() + end + function MountInfo(index) + return C_MountJournal.GetMountInfo(index) + end + function RandomMount() + if(MountListener.favorites > 0) then + return 0 + end + maxMounts = C_MountJournal.GetNumMounts() + return random(1, maxMounts) + end + function MountUp(index) + index = index or RandomMount() + return C_MountJournal.Summon(index) + end + UnMount = C_MountJournal.Dismiss +else + function CountMounts() + return GetNumCompanions("MOUNT") + end + function MountInfo(index) + return GetCompanionInfo("MOUNT", index) + end + function RandomMount() + maxMounts = GetNumCompanions("MOUNT") + return random(1, maxMounts) + end + function MountUp(index) + index = index or random(1, maxMounts) + return CallCompanion("MOUNT", index) + end + UnMount = Dismount +end + local function UpdateMountCheckboxes(button, index) - local _, creatureName = GetCompanionInfo("MOUNT", index); + local _, creatureName = MountInfo(index); local n = button.MountBar local bar = _G[n] @@ -103,9 +144,9 @@ end local function UpdateMountsCache() if(not MountJournal or not MountJournal.cachedMounts) then return end - local num = GetNumCompanions("MOUNT") + local num = CountMounts() for index = 1, num, 1 do - local _, info, id = GetCompanionInfo("MOUNT", index) + local _, info, id = MountInfo(index) if(SV.cache.Mounts.names["GROUND"] == info) then if(SV.cache.Mounts.types["GROUND"] ~= index) then SV.cache.Mounts.types["GROUND"] = index @@ -254,7 +295,7 @@ local function SetMountCheckButtons() UpdateMountsCache() local scrollFrame = MountJournal.ListScrollFrame; - local scrollBar = _G["MountJournalListScrollFrameScrollBar"] + -- local scrollBar = _G["MountJournalListScrollFrameScrollBar"] local buttons = scrollFrame.buttons; for i = 1, #buttons do @@ -277,11 +318,7 @@ local function SetMountCheckButtons() buttonBar["GROUND"]:SetPanelColor(0.2, 0.7, 0.1, 0.15) buttonBar["GROUND"]:GetCheckedTexture():SetVertexColor(0.2, 0.7, 0.1, 1) buttonBar["GROUND"].key = "GROUND" - if(enabled) then - buttonBar["GROUND"]:SetChecked(1) - else - buttonBar["GROUND"]:SetChecked(0) - end + buttonBar["GROUND"]:SetChecked(0) buttonBar["GROUND"]:SetScript("OnClick", CheckButton_OnClick) buttonBar["GROUND"]:SetScript("OnEnter", CheckButton_OnEnter) buttonBar["GROUND"]:SetScript("OnLeave", CheckButton_OnLeave) @@ -294,11 +331,7 @@ local function SetMountCheckButtons() buttonBar["FLYING"]:SetPanelColor(1, 1, 0.2, 0.15) buttonBar["FLYING"]:GetCheckedTexture():SetVertexColor(1, 1, 0.2, 1) buttonBar["FLYING"].key = "FLYING" - if(enabled) then - buttonBar["FLYING"]:SetChecked(1) - else - buttonBar["FLYING"]:SetChecked(0) - end + buttonBar["FLYING"]:SetChecked(0) buttonBar["FLYING"]:SetScript("OnClick", CheckButton_OnClick) buttonBar["FLYING"]:SetScript("OnEnter", CheckButton_OnEnter) buttonBar["FLYING"]:SetScript("OnLeave", CheckButton_OnLeave) @@ -311,11 +344,7 @@ local function SetMountCheckButtons() buttonBar["SWIMMING"]:SetPanelColor(0.2, 0.42, 0.76, 0.15) buttonBar["SWIMMING"]:GetCheckedTexture():SetVertexColor(0.2, 0.42, 0.76, 1) buttonBar["SWIMMING"].key = "SWIMMING" - if(enabled) then - buttonBar["SWIMMING"]:SetChecked(1) - else - buttonBar["SWIMMING"]:SetChecked(0) - end + buttonBar["SWIMMING"]:SetChecked(0) buttonBar["SWIMMING"]:SetScript("OnClick", CheckButton_OnClick) buttonBar["SWIMMING"]:SetScript("OnEnter", CheckButton_OnEnter) buttonBar["SWIMMING"]:SetScript("OnLeave", CheckButton_OnLeave) @@ -328,11 +357,7 @@ local function SetMountCheckButtons() buttonBar["SPECIAL"]:SetPanelColor(0.7, 0.1, 0.1, 0.15) buttonBar["SPECIAL"]:GetCheckedTexture():SetVertexColor(0.7, 0.1, 0.1, 1) buttonBar["SPECIAL"].key = "SPECIAL" - if(special) then - buttonBar["SPECIAL"]:SetChecked(1) - else - buttonBar["SPECIAL"]:SetChecked(0) - end + buttonBar["SPECIAL"]:SetChecked(0) buttonBar["SPECIAL"]:SetScript("OnClick", CheckButton_OnClick) buttonBar["SPECIAL"]:SetScript("OnEnter", CheckButton_OnEnter) buttonBar["SPECIAL"]:SetScript("OnLeave", CheckButton_OnLeave) @@ -343,8 +368,8 @@ local function SetMountCheckButtons() end - scrollFrame:HookScript("OnMouseWheel", Update_MountCheckButtons) - scrollBar:HookScript("OnValueChanged", Update_MountCheckButtons) + -- scrollFrame:HookScript("OnMouseWheel", Update_MountCheckButtons) + -- scrollBar:HookScript("OnValueChanged", Update_MountCheckButtons) UpdateCurrentMountSelection() if(SV.GameVersion >= 60000) then @@ -355,6 +380,8 @@ local function SetMountCheckButtons() MountListener:RegisterEvent("COMPANION_UNLEARNED") MountListener:RegisterEvent("COMPANION_UPDATE") MountListener:SetScript("OnEvent", ProxyUpdate_Mounts) + + NewHook("MountJournal_UpdateMountList", Update_MountCheckButtons) end --[[ ########################################################## @@ -362,83 +389,43 @@ SLASH FUNCTION ########################################################## ]]-- function SVUILetsRide() - local checkList = SV.cache.Mounts.types - local letsFly, letsSwim, letsSeahorse, vjZone, IbelieveIcantFly - local maxMounts = GetNumCompanions("MOUNT") + local maxMounts = CountMounts() + if(not maxMounts or IsMounted()) then - Dismount() + UnMount() return end + if(CanExitVehicle()) then VehicleExit() return end - if(IsUsableSpell(59569) == nil) then - IbelieveIcantFly = true - end - if(not IbelieveIcantFly and IsFlyableArea()) then - letsFly = true - end - for i = 1, 40 do - local auraID = select(11, UnitBuff("player", i)) - if(auraID == 73701 or auraID == 76377) then - vjZone = true - end - end - if(vjZone and IsSwimming()) then - letsSeahorse = true - end - if(IsSwimming() and IbelieveIcantFly and not letsSeahorse) then - letsSwim = true - end - if(IsModifierKeyDown()) then - if(checkList["SPECIAL"]) then - CallCompanion("MOUNT", checkList["SPECIAL"]) - return - elseif(checkList["GROUND"]) then - CallCompanion("MOUNT", checkList["GROUND"]) - return - end - end - if(letsSeahorse) then - for index = 1, maxMounts, 1 do - local _, info, id = GetCompanionInfo("MOUNT", index) - if(letsSeahorse and id == 75207) then CallCompanion("MOUNT", index) end - end - end - if(letsFly and not letsSwim) then - if(checkList["FLYING"]) then - CallCompanion("MOUNT", checkList["FLYING"]) - return - else - if(checkList["GROUND"]) then - SV:AddonMessage("No flying mount selected! Using your ground mount.") - CallCompanion("MOUNT", checkList["GROUND"]) - return + + local checkList = SV.cache.Mounts.types + local letsFly = IsFlyableArea() + local letsSwim = IsSwimming() + + if(IsModifierKeyDown() and checkList["SPECIAL"]) then + MountUp(checkList["SPECIAL"]) + else + if(letsSwim) then + if(checkList["SWIMMING"]) then + MountUp(checkList["SWIMMING"]) + elseif(letsFly) then + MountUp(checkList["FLYING"]) + else + MountUp(checkList["GROUND"]) end + elseif(letsFly) then + if(checkList["FLYING"]) then + MountUp(checkList["FLYING"]) + else + MountUp(checkList["GROUND"]) + end + else + MountUp(checkList["GROUND"]) end - elseif(not letsFly and not letsSwim) then - if(checkList["GROUND"]) then - CallCompanion("MOUNT", checkList["GROUND"]) - return - end - elseif(letsSwim) then - if(checkList["SWIMMING"]) then - CallCompanion("MOUNT", checkList["SWIMMING"]) - return - elseif(letsFly and checkList["FLYING"]) then - SV:AddonMessage("No swimming mount selected! Using your flying mount.") - CallCompanion("MOUNT", checkList["FLYING"]) - return - end - elseif(checkList["GROUND"]) then - CallCompanion("MOUNT", checkList["GROUND"]) - return - end - if(not checkList["GROUND"] and not checkList["FLYING"] and not checkList["SWIMMING"]) then - CallCompanion("MOUNT", random(1, maxMounts)) end - return end --[[ ########################################################## diff --git a/Interface/AddOns/SVUI/system/common.lua b/Interface/AddOns/SVUI/system/common.lua index 8dca0d5..0cdaa92 100644 --- a/Interface/AddOns/SVUI/system/common.lua +++ b/Interface/AddOns/SVUI/system/common.lua @@ -169,6 +169,15 @@ function SV:ScreenCalibration(event) self.ActualWidth = self.UIParent:GetWidth() end end + +local function scaled(value) + if(not SCREEN_MOD) then + SV:ScreenCalibration() + end + return SCREEN_MOD * floor(value / SCREEN_MOD + .5); +end + +SV.Scale = scaled --[[ ########################################################## APPENDED POSITIONING METHODS @@ -177,13 +186,6 @@ APPENDED POSITIONING METHODS do local PARAMS = {} - local function scaled(value) - if(not SCREEN_MOD) then - SV:ScreenCalibration() - end - return SCREEN_MOD * floor(value / SCREEN_MOD + .5); - end - function SizeScaled(self, width, height) if(type(width) == "number") then local h = (height and type(height) == "number") and height or width @@ -240,7 +242,7 @@ do end self:SetPoint("TOPLEFT", parent, "TOPLEFT", nx, -ny) self:SetPoint("BOTTOMRIGHT", parent, "BOTTOMRIGHT", -nx, ny) - end + end end --[[ ########################################################## @@ -857,8 +859,8 @@ local function CreatePanelTemplate(frame, templateName, underlay, noupdate, padd needsHooks = true local panel = NewFrame('Frame', nil, frame) - panel:Point('TOPLEFT', frame, 'TOPLEFT', (xOffset * -1), yOffset) - panel:Point('BOTTOMRIGHT', frame, 'BOTTOMRIGHT', xOffset, (yOffset * -1)) + panel:SetPoint('TOPLEFT', frame, 'TOPLEFT', (xOffset * -1), yOffset) + panel:SetPoint('BOTTOMRIGHT', frame, 'BOTTOMRIGHT', xOffset, yOffset * -1) if(padding > 0 and type(t) == 'table') then panel[1] = panel:CreateTexture(nil,"BORDER") @@ -903,12 +905,12 @@ local function CreatePanelTemplate(frame, templateName, underlay, noupdate, padd if(not frame.Panel[5]) then if(underlay) then frame.Panel[5] = NewFrame('Frame', nil, frame.Panel) - frame.Panel[5]:Point('TOPLEFT', frame.Panel, 'TOPLEFT', -3, 3) - frame.Panel[5]:Point('BOTTOMRIGHT', frame.Panel, 'BOTTOMRIGHT', 3, -3) + frame.Panel[5]:SetPoint('TOPLEFT', frame.Panel, 'TOPLEFT', -3, 3) + frame.Panel[5]:SetPoint('BOTTOMRIGHT', frame.Panel, 'BOTTOMRIGHT', 3, -3) else frame.Panel[5] = NewFrame('Frame', nil, frame) - frame.Panel[5]:Point('TOPLEFT', frame, 'TOPLEFT', -3, 3) - frame.Panel[5]:Point('BOTTOMRIGHT', frame, 'BOTTOMRIGHT', 3, -3) + frame.Panel[5]:SetPoint('TOPLEFT', frame, 'TOPLEFT', -3, 3) + frame.Panel[5]:SetPoint('BOTTOMRIGHT', frame, 'BOTTOMRIGHT', 3, -3) end end diff --git a/Interface/AddOns/SVUI/system/media.lua b/Interface/AddOns/SVUI/system/media.lua index 9a620c8..54e9e6c 100644 --- a/Interface/AddOns/SVUI/system/media.lua +++ b/Interface/AddOns/SVUI/system/media.lua @@ -325,8 +325,8 @@ function SV:RefreshSystemFonts() SetFont(Tooltip_Small, UNICODE_FONT, unicodesize) SetFont(GameFontNormalSmall, UNICODE_FONT, unicodesize) SetFont(GameFontHighlightSmall, UNICODE_FONT, unicodesize) - SetFont(NumberFont_Shadow_Med, UNICODE_FONT, unicodesize) - SetFont(NumberFont_Shadow_Small, UNICODE_FONT, unicodesize) + SetFont(NumberFont_Shadow_Med, UNICODE_FONT, unicodesize, "OUTLINE") + SetFont(NumberFont_Shadow_Small, UNICODE_FONT, unicodesize, "OUTLINE") SetFont(SystemFont_Tiny, UNICODE_FONT, unicodesize) self:UpdateFontTemplates() diff --git a/Interface/AddOns/SVUI_ChatOMatic/SVUI_ChatOMatic.toc b/Interface/AddOns/SVUI_ChatOMatic/SVUI_ChatOMatic.toc index b061970..ffc27ea 100644 --- a/Interface/AddOns/SVUI_ChatOMatic/SVUI_ChatOMatic.toc +++ b/Interface/AddOns/SVUI_ChatOMatic/SVUI_ChatOMatic.toc @@ -1,6 +1,6 @@ ## Interface: 60000 ## Author: Munglunch -## Version: 4.8 +## Version: 4.9 ## Title: |cffFF9900SVUI |r|cffFFEF00Chat-O-Matic|r ## Notes: Supervillain UI [|cff9911FFVarious Chat Gadgets|r] ## SavedVariables: ChatOMatic_Data diff --git a/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.toc b/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.toc index 0bb6d7b..c6b20a4 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.toc +++ b/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.toc @@ -1,6 +1,6 @@ ## Interface: 60000 ## Author: Munglunch -## Version: 4.8 +## Version: 4.9 ## Title: |cffFF9900SVUI |r|cffFFEF00Config-O-Matic|r ## Notes: Supervillain UI [|cff9911FFConfig Options|r] ## RequiredDeps: SVUI diff --git a/Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.lua b/Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.lua index c095b36..e63bb8c 100644 --- a/Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.lua +++ b/Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.lua @@ -133,10 +133,10 @@ local function CheckForDoubleClick() end --[[ ########################################################## -CORE FUNCTIONS +WORLDFRAME HANDLER ########################################################## ]]-- -function PLUGIN:WorldFrameHook(button) +local _hook_WorldFrame_OnMouseDown = function(self, button) if InCombatLockdown() then return end if(currentModeKey and button == "RightButton" and CheckForDoubleClick()) then local handle = PLUGIN[currentModeKey]; @@ -146,7 +146,7 @@ function PLUGIN:WorldFrameHook(button) end end -function SVUI_ModeCaptureWindow:PostClickHandler() +local ModeCapture_PostClickHandler = function(self, button) if InCombatLockdown() then self:RegisterEvent("PLAYER_REGEN_ENABLED") return @@ -155,6 +155,36 @@ function SVUI_ModeCaptureWindow:PostClickHandler() self.Grip:Hide() end +local ModeCapture_EventHandler = function(self, event, ...) + if event == "PLAYER_REGEN_ENABLED" then + self:UnregisterEvent("PLAYER_REGEN_ENABLED") + PLUGIN:ChangeModeGear() + self:GetScript("PostClick")() + end + if event == "PLAYER_ENTERING_WORLD" then + if (IsSpellKnown(131474) or IsSpellKnown(80451) or IsSpellKnown(818)) then + WorldFrame:HookScript("OnMouseDown", _hook_WorldFrame_OnMouseDown) + end + self:UnregisterEvent("PLAYER_ENTERING_WORLD") + end +end + +local ModeHandler = CreateFrame("Frame") +ModeHandler:SetPoint("LEFT", UIParent, "RIGHT", 10000, 0) +local ModeCapture = CreateFrame("Button", "SVUI_ModeCaptureWindow", ModeHandler, "SecureActionButtonTemplate") +ModeCapture.Grip = ModeHandler +ModeCapture:EnableMouse(true) +ModeCapture:RegisterForClicks("RightButtonUp") +ModeCapture:RegisterEvent("PLAYER_ENTERING_WORLD") +ModeCapture:SetScript("PostClick", ModeCapture_PostClickHandler) +ModeCapture:SetScript("OnEvent", ModeCapture_EventHandler) + +ModeCapture:Hide() +--[[ +########################################################## +CORE FUNCTIONS +########################################################## +]]-- function PLUGIN:CraftingReset() self.TitleWindow:Clear(); self.LogWindow:Clear(); diff --git a/Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.toc b/Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.toc index c32772a..168e57a 100644 --- a/Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.toc +++ b/Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.toc @@ -1,6 +1,6 @@ ## Interface: 60000 ## Author: Munglunch -## Version: 4.8 +## Version: 4.9 ## Title: |cffFF9900SVUI |r|cffFFEF00Craft-O-Matic|r ## Notes: Supervillain UI [|cff9911FFProfession Tools|r]. ## Interface: 60000 diff --git a/Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.xml b/Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.xml index 25b65c4..b59b839 100644 --- a/Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.xml +++ b/Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.xml @@ -1,39 +1,4 @@ <Ui xmlns="http://www.blizzard.com/wow/ui/"> - <Frame name="SVUI_ModesHandler" hidden="true" frameStrata="LOW" parent="UIParent"> - <Anchors> - <Anchor point="LEFT" relativeTo="UIParent" relativePoint="RIGHT"> - <Offset x="10000" y="0"/> - </Anchor> - </Anchors> - <Frames> - <Button name="SVUI_ModeCaptureWindow" inherits="SecureActionButtonTemplate" enableMouse="true"> - <Scripts> - <PostClick> - if(self.PostClickHandler) then self:PostClickHandler() end - </PostClick> - <OnLoad> - self.Grip = _G["SVUI_ModesHandler"]; - self:RegisterForClicks("RightButtonUp"); - self:Hide(); - self:RegisterEvent("PLAYER_ENTERING_WORLD") - self:SetScript("OnEvent", function(self, event, ...) - if event == "PLAYER_REGEN_ENABLED" then - self:UnregisterEvent("PLAYER_REGEN_ENABLED") - CraftOMatic:ChangeModeGear() - self:PostClickHandler() - end - if event == "PLAYER_ENTERING_WORLD" then - if (IsSpellKnown(131474) or IsSpellKnown(80451) or IsSpellKnown(818)) then - WorldFrame:HookScript("OnMouseDown", CraftOMatic.WorldFrameHook) - end - self:UnregisterEvent("PLAYER_ENTERING_WORLD") - end - end) - </OnLoad> - </Scripts> - </Button> - </Frames> - </Frame> <Script file='Loader.lua'/> <Script file='SVUI_CraftOMatic.lua'/> <Include file="components\_load.xml"/> diff --git a/Interface/AddOns/SVUI_CraftOMatic/components/archaeology.lua b/Interface/AddOns/SVUI_CraftOMatic/components/archaeology.lua index 4f5e5b9..7b63e29 100644 --- a/Interface/AddOns/SVUI_CraftOMatic/components/archaeology.lua +++ b/Interface/AddOns/SVUI_CraftOMatic/components/archaeology.lua @@ -55,11 +55,13 @@ local GetContainerNumSlots = GetContainerNumSlots local GetContainerItemInfo = GetContainerItemInfo local GetContainerItemID = GetContainerItemID local DockButton, ModeLogsFrame; + +local COUNT_TEX = [[Interface\AddOns\SVUI\assets\artwork\icons\COUNT-]] + local refArtifacts = {}; for i = 1, 12 do refArtifacts[i] = {} end -local NEEDS_UPDATE = true; local ArchCrafting = CreateFrame("Frame", "SVUI_ArchCrafting", UIParent) --[[ ########################################################## @@ -120,7 +122,7 @@ local function UpdateArtifactBars(index) if GetNumArtifactsByRace(index) ~= 0 then local keystoneBonus = 0 - bar["race"]:SetTextColor(1, 1, 1) + bar["race"]:SetTextColor(1, 0.8, 0) bar["progress"]:SetTextColor(1, 1, 1) if cache["numKeysockets"] then keystoneBonus = min(cache["numKeystones"], cache["numKeysockets"]) * 12 @@ -205,7 +207,6 @@ local function UpdateArtifactCache() end UpdateArtifactBars(index) end - NEEDS_UPDATE = false end local function GetTitleAndSkill() @@ -230,7 +231,12 @@ EVENT HANDLER ]]-- do local SURVEYCDFONT = SV.Media.font.numbers - local SURVEYRED = {0,0.5,1} + local SURVEYCOLOR = { + {0.1, 1, 0.1, 0.2}, + {1, 0.5, 0.1, 0.4}, + {1, 0.1, 0, 0.6} + } + local SURVEYSCALE = {3, 2, 1} local last = 0 local time = 3 @@ -239,26 +245,28 @@ do local ArchSiteFound; local ArchCanSurvey, ArchWillSurvey = false, false; - SurveyCooldown:SetPoint("CENTER", 0, -80) - SurveyCooldown:SetSize(150, 150) - SurveyCooldown.text = SurveyCooldown:CreateFontString(nil, "OVERLAY") + SurveyCooldown:SetPoint("CENTER", UIParent, "CENTER", 0, -80) + SurveyCooldown:SetSize(50, 50) + SurveyCooldown.text = SurveyCooldown:CreateTexture(nil, "OVERLAY") SurveyCooldown.text:SetAllPoints(SurveyCooldown) - SurveyCooldown.text:SetFont(SURVEYCDFONT, 150, "OUTLINE") - SurveyCooldown.text:SetTextColor(0,1,0.12,0.5) - SurveyCooldown.text:SetPoint("CENTER") - SurveyCooldown:SetScale(1.5) + SurveyCooldown.text:SetVertexColor(0,1,0.12,0.5) + SurveyCooldown:SetScale(1) local Arch_OnEvent = function(self, event, ...) if(InCombatLockdown() or not archSpell) then return end + local NEEDS_UPDATE = false; if(event == "CURRENCY_DISPLAY_UPDATE" or event == "CHAT_MSG_SKILL" or event == "ARTIFACT_COMPLETE") then local msg = GetTitleAndSkill() PLUGIN.TitleWindow:Clear() PLUGIN.TitleWindow:AddMessage(msg) + if(event ~= "CHAT_MSG_SKILL") then + NEEDS_UPDATE = true + end end if(CanScanResearchSite() and (event == "CURRENCY_DISPLAY_UPDATE")) then - UpdateArtifactCache() + NEEDS_UPDATE = true elseif(event == "ARCHAEOLOGY_SURVEY_CAST" or event == "ARTIFACT_COMPLETE" or event == "ARTIFACT_DIG_SITE_UPDATED") then - UpdateArtifactCache() + NEEDS_UPDATE = true elseif(event == "ARTIFACT_HISTORY_READY" or event == "ARTIFACT_DIGSITE_COMPLETE") then NEEDS_UPDATE = true else @@ -284,9 +292,10 @@ do ArchSiteFound = nil end end - if(NEEDS_UPDATE) then - UpdateArtifactCache() - end + end + + if(NEEDS_UPDATE) then + UpdateArtifactCache() end end @@ -294,13 +303,17 @@ do last = last + elapsed if last > 1 then time = time - 1 - self.text:SetText(time) + local img = COUNT_TEX .. time if time <= 0 then self:SetScript("OnUpdate", nil) - self.text:SetText("") + self.text:SetTexture(nil) + self:SetScale(1) time = 3 + else + self.text:SetTexture(img) + self.text:SetVertexColor(unpack(SURVEYCOLOR[time])) + self:SetScale(SURVEYSCALE[time]) end - self.text:SetTextColor(SURVEYRED[time],1,0.12,0.8) last = 0 end end @@ -308,7 +321,8 @@ do local Survey_OnEvent = function(self, event, unit, _, _, _, spellid) if not unit == "player" then return end if spellid == 80451 then - self.text:SetText("3") + self.text:SetTexture(COUNT_TEX .. 3) + self:SetScale(1) self:SetScript("OnUpdate", Survey_OnUpdate) end end @@ -476,16 +490,17 @@ function PLUGIN:LoadArchaeologyMode() bar:SetScript("OnLeave", function() GameTooltip:Hide() end) - + local sOffset = SV.Scale(1) -- Race Text - race:SetFont(SV.Media.font.roboto, 12, "OUTLINE") + race:SetFontObject(NumberFont_Outline_Large) race:SetText(RACE) - race:SetPoint("LEFT", bar, "LEFT", 2, 0) + race:SetPoint("TOPLEFT", bar, "TOPLEFT", sOffset, -sOffset) + race:SetTextColor(1,0.8,0) -- Progress Text - progress:SetFont(SV.Media.font.roboto, 12, "OUTLINE") + progress:SetFont(SV.Media.font.roboto, 11, "OUTLINE") progress:SetText("") - progress:SetPoint("RIGHT", bar, "RIGHT", 1, 0) + progress:SetPoint("BOTTOMRIGHT", bar, "BOTTOMRIGHT", -sOffset, sOffset) -- Solve solve:SetAllPoints(bar) diff --git a/Interface/AddOns/SVUI_FightOMatic/SVUI_FightOMatic.toc b/Interface/AddOns/SVUI_FightOMatic/SVUI_FightOMatic.toc index b58b7c1..c43eaec 100644 --- a/Interface/AddOns/SVUI_FightOMatic/SVUI_FightOMatic.toc +++ b/Interface/AddOns/SVUI_FightOMatic/SVUI_FightOMatic.toc @@ -1,6 +1,6 @@ ## Interface: 60000 ## Author: Munglunch -## Version: 4.8 +## Version: 4.9 ## Title: |cffFF9900SVUI |r|cffFFEF00Fight-O-Matic|r ## Notes: Supervillain UI [|cff9911FFPvP Tools|r]. ## SavedVariables: FightOMatic_Data diff --git a/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.toc b/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.toc index 0196894..1438078 100644 --- a/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.toc +++ b/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.toc @@ -1,6 +1,6 @@ ## Interface: 60000 ## Author: Munglunch -## Version: 4.8 +## Version: 4.9 ## Title: |cffFF9900SVUI |r|cffFFEF00Log-O-Matic|r ## Notes: Supervillain UI [|cff9911FFData Logging|r]. ## SavedVariables: LogOMatic_Data diff --git a/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.toc b/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.toc index a7f1c43..8ccf115 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.toc +++ b/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.toc @@ -1,6 +1,6 @@ ## Interface: 60000 ## Author: Munglunch, Azilroka, Sortokk -## Version: 4.8 +## Version: 4.9 ## Title: |cffFF9900SVUI |r|cffFFEF00Style-O-Matic|r ## Notes: Supervillain UI [|cff9911FFAddon Skins|r]. ## RequiredDeps: SVUI diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/style_methods.lua b/Interface/AddOns/SVUI_StyleOMatic/components/style_methods.lua index 110e7c0..f0b54a4 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/components/style_methods.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/components/style_methods.lua @@ -41,6 +41,8 @@ local STYLE = select(2, ...); local Schema = STYLE.Schema; local LSM = LibStub("LibSharedMedia-3.0") local NewHook = hooksecurefunc; + +local ScaledOffset = SV.Scale(1) --[[ ########################################################## /$$$$$$$$/$$$$$$$ /$$$$$$ /$$ /$$ /$$$$$$$$ @@ -182,7 +184,7 @@ function STYLE:ApplyItemButtonStyle(frame, adjust, shrink, noScript) if(not frame.Panel) then if shrink then - frame:SetPanelTemplate("Button", true, 1, -2, -2) + frame:SetPanelTemplate("Button", true, ScaledOffset, -ScaledOffset, ScaledOffset) else frame:SetFixedPanelTemplate("Button") end diff --git a/Interface/AddOns/SVUI_TrackOMatic/SVUI_TrackOMatic.toc b/Interface/AddOns/SVUI_TrackOMatic/SVUI_TrackOMatic.toc index 10c2ffa..78cb107 100644 --- a/Interface/AddOns/SVUI_TrackOMatic/SVUI_TrackOMatic.toc +++ b/Interface/AddOns/SVUI_TrackOMatic/SVUI_TrackOMatic.toc @@ -1,6 +1,6 @@ ## Interface: 60000 ## Author: Munglunch -## Version: 4.8 +## Version: 4.9 ## Title: |cffFF9900SVUI |r|cffFFEF00Track-O-Matic|r ## Notes: Supervillain UI [|cff9911FFRaid & Party Member Tracking|r]. ## RequiredDeps: SVUI