diff --git a/Fonts/DAMAGE.ttf b/Fonts/DAMAGE.ttf deleted file mode 100644 index 5933d31..0000000 Binary files a/Fonts/DAMAGE.ttf and /dev/null differ diff --git a/Fonts/FRIENDS.ttf b/Fonts/FRIENDS.ttf new file mode 100644 index 0000000..d7ea883 Binary files /dev/null and b/Fonts/FRIENDS.ttf differ diff --git a/Interface/AddOns/SVUI/SVUI.xml b/Interface/AddOns/SVUI/SVUI.xml index 99085a3..896020d 100644 --- a/Interface/AddOns/SVUI/SVUI.xml +++ b/Interface/AddOns/SVUI/SVUI.xml @@ -154,4 +154,5 @@ <Script file="scripts\questwatch.lua"/> <Script file="scripts\raid.lua"/> <Script file="scripts\reactions.lua"/> + <Script file="scripts\spellbind.lua"/> </Ui> \ No newline at end of file diff --git a/Interface/AddOns/SVUI/assets/fonts/Action.ttf b/Interface/AddOns/SVUI/assets/fonts/Action.ttf index fb09813..4d68705 100644 Binary files a/Interface/AddOns/SVUI/assets/fonts/Action.ttf and b/Interface/AddOns/SVUI/assets/fonts/Action.ttf differ diff --git a/Interface/AddOns/SVUI/assets/fonts/Combat.ttf b/Interface/AddOns/SVUI/assets/fonts/Combat.ttf index 4d68705..fb09813 100644 Binary files a/Interface/AddOns/SVUI/assets/fonts/Combat.ttf and b/Interface/AddOns/SVUI/assets/fonts/Combat.ttf differ diff --git a/Interface/AddOns/SVUI/packages/unit/SVUnit.lua b/Interface/AddOns/SVUI/packages/unit/SVUnit.lua index ec07620..fc01b3b 100644 --- a/Interface/AddOns/SVUI/packages/unit/SVUnit.lua +++ b/Interface/AddOns/SVUI/packages/unit/SVUnit.lua @@ -320,10 +320,9 @@ end function MOD:RefreshUnitFrames() if(InCombatLockdown()) then self:RegisterEvent("PLAYER_REGEN_ENABLED"); return end - if(not self.db.enable) then return end self:RefreshUnitColors() for unit,frame in pairs(self.Units)do - if self.db[frame.___key].enable then + if(self.db.enable == true and self.db[frame.___key].enable) then frame:Enable() frame:Update() else @@ -340,6 +339,7 @@ function MOD:RefreshUnitFrames() raidDebuffs:RegisterDebuffs(SuperVillain.db.filter["CC"]) end end + for _,group in pairs(self.Headers) do group:Update() if group.SetConfigEnvironment then @@ -1304,12 +1304,10 @@ BUILD FUNCTION / UPDATE ########################################################## ]]-- function MOD:ReLoad() - if(not self.db.enable or self.db.enable == false) then return end self:RefreshUnitFrames() end function MOD:Load() - if(not self.db.enable or self.db.enable == false) then return end self:RefreshUnitColors() local SVUI_UnitFrameParent = CreateFrame("Frame", "SVUI_UnitFrameParent", SuperVillain.UIParent, "SecureHandlerStateTemplate") diff --git a/Interface/AddOns/SVUI/packages/unit/frames.lua b/Interface/AddOns/SVUI/packages/unit/frames.lua index 43a4678..f23e7ae 100644 --- a/Interface/AddOns/SVUI/packages/unit/frames.lua +++ b/Interface/AddOns/SVUI/packages/unit/frames.lua @@ -1034,7 +1034,7 @@ function MOD:SetUnitFrame(key) if frame:GetParent() ~= SVUI_UnitFrameParent then frame:SetParent(SVUI_UnitFrameParent) end - if self.db[key].enable then + if(self.db.enable and self.db[key].enable) then frame:Enable() frame:Update() else @@ -1064,7 +1064,7 @@ function MOD:SetEnemyFrames(key, maxCount) if frame.isForced then self:AllowElement(frame) end - if self.db[key].enable then + if(self.db.enable and self.db[key].enable) then frame:Enable() frame:Update() else @@ -2028,7 +2028,7 @@ LOAD/UPDATE METHOD ]]-- function MOD:SetGroupFrame(key, filter, template1, forceUpdate, template2) if(InCombatLockdown()) then self:RegisterEvent("PLAYER_REGEN_ENABLED"); return end - if not self.db[key] then return end + if(not self.db.enable or not self.db[key]) then return end local db = self.db[key] local realName = key:gsub("(.)", upper, 1) local styleName = "SVUI_"..realName diff --git a/Interface/AddOns/SVUI/scripts/misc.lua b/Interface/AddOns/SVUI/scripts/misc.lua index 7bb98f2..46403e8 100644 --- a/Interface/AddOns/SVUI/scripts/misc.lua +++ b/Interface/AddOns/SVUI/scripts/misc.lua @@ -613,6 +613,10 @@ local Totems_OnEvent = function(self, event) end end +local Totem_OnClick = function(self) + _G["TotemFrameTotem"..self:GetID()]:Click(RightButton) +end + function SuperVillain:UpdateTotems() local totemSize = self.db.system.totems.size; local totemSpace = self.db.system.totems.spacing; @@ -650,8 +654,8 @@ function SuperVillain:UpdateTotems() end end end - local tS1 = ((totemSize * MAX_TOTEMS) + (totemSpace * MAX_TOTEMS) + totemSpace); - local tS2 = (totemSize + (totemSpace * 2)); + local tS1 = ((totemSize * MAX_TOTEMS) + (totemSpace * MAX_TOTEMS) + totemSpace); + local tS2 = (totemSize + (totemSpace * 2)); local tW = (totemGrowth == "HORIZONTAL" and tS1 or tS2); local tH = (totemGrowth == "HORIZONTAL" and tS2 or tS1); TotemBar:Size(tW, tH); @@ -678,6 +682,9 @@ local function CreateTotemBar() totem.CD:SetReverse(true) totem.CD:FillInner() SuperVillain:AddCD(totem.CD) + totem:EnableMouse(true) + totem:RegisterForClicks('RightButtonUp') + totem:SetScript("OnClick", Totem_OnClick) TotemBar[i] = totem end TotemBar:Show() diff --git a/Interface/AddOns/SVUI/scripts/spellbind.lua b/Interface/AddOns/SVUI/scripts/spellbind.lua new file mode 100644 index 0000000..8c9ce72 --- /dev/null +++ b/Interface/AddOns/SVUI/scripts/spellbind.lua @@ -0,0 +1,395 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +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 ipairs = _G.ipairs; +local type = _G.type; +local tinsert = _G.tinsert; +local string = _G.string; +--[[ STRING METHODS ]]-- +local format, gsub = string.format, string.gsub; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SuperVillain, L = unpack(select(2, ...)); +--[[ +########################################################## +Simple click2cast spell binder(sBinder by Fernir) +########################################################## +]]-- +local DB = {}; +DB.spells = DB.spells or {} +DB.frames = DB.frames or {} +DB.keys = DB.keys or {} +local SpellBinder = CreateFrame("Frame", "SpellBinder", SpellBookFrame, "ButtonFrameTemplate") +SpellBinder:SetPoint("TOPLEFT", SpellBookFrame, "TOPRIGHT", 100, 0) +SpellBinder:SetSize(300, 400) +SpellBinder:Hide() + +_G["SpellBinderPortrait"]:SetTexture("Interface\\Spellbook\\Spellbook-Icon") + +SpellBinder.title = _G["SpellBinderTitle"] or SpellBinder:CreateFontString("SpellBinderTitle", "OVERLAY", "GameFontNormal") +SpellBinder.title:SetPoint("TOP", _G["SpellBinder"], "TOP", 0, -5) +SpellBinder.title:SetText("SpellBinder") + +SpellBinder.sbOpen = false +SpellBinder.spellbuttons = {} + +ClickCastFrames = _G.ClickCastFrames or {} +for i, v in pairs({ + "PlayerFrame", "PetFrame", + -- Party members + "PartyMemberFrame1", "PartyMemberFrame2", "PartyMemberFrame3", "PartyMemberFrame4", "PartyMemberFrame5", + -- Party pets + "PartyMemberFrame1PetFrame", "PartyMemberFrame2PetFrame", "PartyMemberFrame3PetFrame", "PartyMemberFrame4PetFrame", "PartyMemberFrame5PetFrame", + -- Compact party member frame + "CompactPartyFrameMemberSelf", "CompactPartyFrameMemberSelfBuff1", "CompactPartyFrameMemberSelfBuff2", "CompactPartyFrameMemberSelfBuff3", "CompactPartyFrameMemberSelfDebuff1", "CompactPartyFrameMemberSelfDebuff2", "CompactPartyFrameMemberSelfDebuff3", + "CompactPartyFrameMember1Buff1", "CompactPartyFrameMember1Buff2", "CompactPartyFrameMember1Buff3", "CompactPartyFrameMember1Debuff1", "CompactPartyFrameMember1Debuff2", "CompactPartyFrameMember1Debuff3", + "CompactPartyFrameMember2Buff1", "CompactPartyFrameMember2Buff2", "CompactPartyFrameMember2Buff3", "CompactPartyFrameMember2Debuff1", "CompactPartyFrameMember2Debuff2", "CompactPartyFrameMember2Debuff3", + "CompactPartyFrameMember3Buff1", "CompactPartyFrameMember3Buff2", "CompactPartyFrameMember3Buff3", "CompactPartyFrameMember3Debuff1", "CompactPartyFrameMember3Debuff2", "CompactPartyFrameMember3Debuff3", + "CompactPartyFrameMember4Buff1", "CompactPartyFrameMember4Buff2", "CompactPartyFrameMember4Buff3", "CompactPartyFrameMember4Debuff1", "CompactPartyFrameMember4Debuff2", "CompactPartyFrameMember4Debuff3", + "CompactPartyFrameMember5Buff1", "CompactPartyFrameMember5Buff2", "CompactPartyFrameMember5Buff3", "CompactPartyFrameMember5Debuff1", "CompactPartyFrameMember5Debuff2", "CompactPartyFrameMember5Debuff3", + -- Target and focus frames + "TargetFrame", "TargetFrameToT", + "FocusFrame", "FocusFrameToT", + -- Boss and arena frames + "Boss1TargetFrame", "Boss2TargetFrame", "Boss3TargetFrame", "Boss4TargetFrame", + "ArenaEnemyFrame1", "ArenaEnemyFrame2", "ArenaEnemyFrame3", "ArenaEnemyFrame4", "ArenaEnemyFrame5", +}) do + if _G[v] then ClickCastFrames[_G[v]] = true end +end + +hooksecurefunc("CreateFrame", function(ftype, name, parent, template) if template and template:find("SecureUnitButtonTemplate") then ClickCastFrames[_G[name]] = true end end) +hooksecurefunc("CompactUnitFrame_SetUpFrame", function(frame, ...) ClickCastFrames[frame] = true end) + +local ScrollSpells = CreateFrame("ScrollFrame", "SpellBinderScrollFrameSpellList", _G["SpellBinderInset"], "UIPanelScrollFrameTemplate") +ScrollSpells.child = CreateFrame("Frame", "SpellBinderScrollFrameSpellListChild", ScrollSpells) +ScrollSpells:SetPoint("TOPLEFT", _G["SpellBinderInset"], "TOPLEFT", 0, -5) +ScrollSpells:SetPoint("BOTTOMRIGHT", _G["SpellBinderInset"], "BOTTOMRIGHT", -30, 5) +ScrollSpells:SetScrollChild(ScrollSpells.child) + +SpellBinder.makeSpellsList = function(self, scroll, delete) + local oldb + scroll:SetPoint("TOPLEFT") + scroll:SetSize(270, 300) + + if delete then + i = 1 + while _G[i.."_cbs"] do + _G[i.."_fs"]:SetText("") + _G[i.."_texture"]:SetTexture(nil) + _G[i.."_cbs"].checked = false + _G[i.."_cbs"]:ClearAllPoints() + _G[i.."_cbs"]:Hide() + i = i + 1 + end + end + + for i, spell in ipairs(DB.spells) do + v = spell.spell + if v then + local bf = _G[i.."_cbs"] or CreateFrame("Button", i.."_cbs", scroll) + spell.checked = spell.checked or false + + if i == 1 then + bf:SetPoint("TOPLEFT", scroll, "TOPLEFT", 10, -10) + bf:SetPoint("BOTTOMRIGHT", scroll, "TOPRIGHT", -10, -34) + else + bf:SetPoint("TOPLEFT", oldb, "BOTTOMLEFT", 0, -2) + bf:SetPoint("BOTTOMRIGHT", oldb, "BOTTOMRIGHT", 0, -26) + end + + bf:EnableMouse(true) + + bf.tex = bf.tex or bf:CreateTexture(i.."_texture", "OVERLAY") + bf.tex:SetSize(22, 22) + bf.tex:SetPoint("LEFT") + bf.tex:SetTexture(spell.texture) + bf.tex:SetTexCoord(0.1, 0.9, 0.1, 0.9) + + bf.delete = bf.delete or CreateFrame("Button", i.."_delete", bf) + bf.delete:SetSize(16, 16) + bf.delete:SetPoint("RIGHT") + bf.delete:SetNormalTexture("Interface\\BUTTONS\\UI-GroupLoot-Pass-Up") + bf.delete:GetNormalTexture():SetVertexColor(0.8, 0, 0) + bf.delete:SetPushedTexture("Interface\\BUTTONS\\UI-GroupLoot-Pass-Up") + bf.delete:SetHighlightTexture("Interface\\BUTTONS\\UI-GroupLoot-Pass-Up") + bf.delete:SetScript("OnClick", function(self) + for j, k in ipairs(DB.spells) do + if k ~= spell then + k.checked = false + _G[j.."_cbs"]:SetBackdropColor(0, 0, 0, 0) + end + end + spell.checked = not spell.checked + SpellBinder.DeleteSpell() + end) + + bf:SetScript("OnEnter", function(self) bf.delete:GetNormalTexture():SetVertexColor(1, 0, 0) self:SetBackdrop({bgFile = "Interface\\Buttons\\WHITE8x8"}) self:SetBackdropColor(0.2, 0.2, 0.2, 0.7) end) + bf:SetScript("OnLeave", function(self) bf.delete:GetNormalTexture():SetVertexColor(0.8, 0, 0) self:SetBackdrop(nil) end) + + bf.fs = bf.fs or bf:CreateFontString(i.."_fs", "OVERLAY", "GameFontNormal") + bf.fs:SetText(spell.modifier..spell.origbutton) + bf.fs:SetPoint("RIGHT", bf.delete, "LEFT", -4, 0) + + for frame, j in pairs(ClickCastFrames) do + local f + if frame and type(frame) == "table" then f = frame:GetName() end + if f and DB.frames[frame] then + if _G[f]:CanChangeAttribute() or _G[f]:CanChangeProtectedState() then + if _G[f]:GetAttribute(spell.modifier.."type"..spell.button) ~= "menu" then + _G[f]:RegisterForClicks("AnyDown") + + if spell.button:find("harmbutton") then + _G[f]:SetAttribute(spell.modifier..spell.button, spell.spell) + _G[f]:SetAttribute(spell.modifier.."type-"..spell.spell, "spell") + _G[f]:SetAttribute(spell.modifier.."spell-"..spell.spell, spell.spell) + + DB.keys[spell.modifier..spell.button] = spell.spell + DB.keys[spell.modifier.."type-"..spell.spell] = "spell" + DB.keys[spell.modifier.."spell-"..spell.spell] = spell.spell + else + _G[f]:SetAttribute(spell.modifier.."type"..spell.button, "spell") + _G[f]:SetAttribute(spell.modifier.."spell"..spell.button, spell.spell) + + DB.keys[spell.modifier.."type"..spell.button] = "spell" + DB.keys[spell.modifier.."spell"..spell.button] = spell.spell + end + end + end + end + end + + bf:Show() + oldb = bf + end + end +end + +SpellBinder.makeFramesList = function(self) + for frame, value in pairs(ClickCastFrames) do + local v + if frame and type(frame) == "table" then v = frame:GetName() end + if v ~= "SVUI_Target" and v ~= "SVUI_Player" then DB.frames[frame] = DB.frames[frame] or true end + end +end + +SpellBinder.ToggleButtons = function() + for i = 1, SPELLS_PER_PAGE do + if(SpellBinder.spellbuttons[i]) then + SpellBinder.spellbuttons[i]:Hide() + end + if SpellBinder.sbOpen and SpellBookFrame.bookType ~= BOOKTYPE_PROFESSION then + local slot = SpellBook_GetSpellBookSlot(SpellBinder.spellbuttons[i]:GetParent()) + if slot then + local spellname, subtype = GetSpellBookItemName(slot, SpellBookFrame.bookType) + if spellname then + SpellBinder.spellbuttons[i]:Show() + end + end + end + end + SpellBinder:makeFramesList() + SpellBinder:makeSpellsList(ScrollSpells.child, true) + if SpellBinder:IsVisible() then SpellBinder.OpenButton:SetChecked(true) else SpellBinder.OpenButton:SetChecked(false) end +end + +hooksecurefunc("SpellBookFrame_Update", function() if SpellBinder.sbOpen then SpellBinder:ToggleButtons() end end) + +SpellBinder.OpenButton = CreateFrame("CheckButton", "SpellBinderOpenButton", _G["SpellBookSkillLineTab1"], "SpellBookSkillLineTabTemplate") +SpellBinder.OpenButton:SetNormalTexture("Interface\\ICONS\\Achievement_Guild_Doctorisin") + +SpellBinder.OpenButton:SetScript("OnShow", function(self) + if SpellBinder:IsVisible() then self:SetChecked(true) end + local num = GetNumSpellTabs() + local lastTab = _G["SpellBookSkillLineTab"..num] + + self:ClearAllPoints() + self:SetPoint("TOPLEFT", lastTab, "BOTTOMLEFT", 0, -17) + + self:SetScript("OnEnter", function(self) GameTooltip:ClearLines() GameTooltip:SetOwner(self, "ANCHOR_RIGHT") GameTooltip:AddLine("SpellBinder") GameTooltip:Show() end) + self:SetScript("OnLeave", function() GameTooltip:Hide() end) +end) + +SpellBinder.OpenButton:SetScript("OnClick", function(self) + if InCombatLockdown() then SpellBinder:Hide() return end + if SpellBinder:IsVisible() then + SpellBinder:Hide() + SpellBinder.sbOpen = false + else + SpellBinder:Show() + SpellBinder.sbOpen = true + end + SpellBinder:ToggleButtons() +end) +SpellBinder.OpenButton:Show() + +_G["SpellBinderCloseButton"]:SetScript("OnClick", function(self) + SpellBinder:Hide() + SpellBinder.sbOpen = false + SpellBinder:ToggleButtons() +end) + +hooksecurefunc(SpellBookFrame, "Hide", function() + SpellBinder:Hide() + SpellBinder.sbOpen = false + SpellBinder:ToggleButtons() +end) + +SpellBinder.DeleteSpell = function() + local count = table.getn(DB.spells) + for i, spell in ipairs(DB.spells) do + if spell.checked then + for frame, j in pairs(ClickCastFrames) do + local f + if frame and type(frame) == "table" then f = frame:GetName() end + if f then + if _G[f]:CanChangeAttribute() or _G[f]:CanChangeProtectedState() then + if _G[f]:GetAttribute(spell.modifier.."type"..spell.button) ~= "menu" then + if spell.button:find("harmbutton") then + _G[f]:SetAttribute(spell.modifier..spell.button, nil) + _G[f]:SetAttribute(spell.modifier.."type-"..spell.spell, nil) + _G[f]:SetAttribute(spell.modifier.."spell-"..spell.spell, nil) + else + _G[f]:SetAttribute(spell.modifier.."type"..spell.button, nil) + _G[f]:SetAttribute(spell.modifier.."spell"..spell.button, nil) + end + end + end + end + end + tremove(DB.spells, i) + end + end + SpellBinder:makeSpellsList(ScrollSpells.child, true) +end + +local addSpell = function(self, button) + if SpellBinder.sbOpen then + local slot = SpellBook_GetSpellBookSlot(self:GetParent()) + local spellname, subtype = GetSpellBookItemName(slot, SpellBookFrame.bookType) + local texture = GetSpellBookItemTexture(slot, SpellBookFrame.bookType) + + if spellname ~= 0 and ((SpellBookFrame.bookType == BOOKTYPE_PET) or (SpellBookFrame.selectedSkillLine > 1)) then + local originalbutton = button + local modifier = "" + + if IsShiftKeyDown() then modifier = "Shift-"..modifier end + if IsControlKeyDown() then modifier = "Ctrl-"..modifier end + if IsAltKeyDown() then modifier = "Alt-"..modifier end + + if IsHarmfulSpell(slot, SpellBookFrame.bookType) then + button = format("%s%d", "harmbutton", SecureButton_GetButtonSuffix(button)) + originalbutton = "|cffff2222(harm)|r "..originalbutton + else + button = SecureButton_GetButtonSuffix(button) + end + + for i, v in pairs(DB.spells) do if v.spell == spellname then return end end + + tinsert(DB.spells, {["id"] = slot, ["modifier"] = modifier, ["button"] = button, ["spell"] = spellname, ["rank"] = rank, ["texture"] = texture, ["origbutton"] = originalbutton,}) + SpellBinder:makeSpellsList(ScrollSpells.child, false) + end + end +end + +SpellBinder.UpdateAll = function() + if InCombatLockdown() then + SpellBinder.SheduleUpdate() + return + end + SpellBinder:makeFramesList() + SpellBinder:makeSpellsList(ScrollSpells.child, true) +end + +SpellBinder.SheduleUpdate = function() + SpellBinder.updated = false + if InCombatLockdown() then + SpellBinder:RegisterEvent("PLAYER_REGEN_ENABLED") + SpellBinder:SetScript("OnEvent", function(self) + SpellBinder.UpdateAll() + if SpellBinder.updated then + SpellBinder:UnregisterEvent("PLAYER_REGEN_ENABLED") + end + end) + else + SpellBinder.UpdateAll() + end +end + +SpellBinder:RegisterEvent("GROUP_ROSTER_UPDATE") +SpellBinder:RegisterEvent("PLAYER_ENTERING_WORLD") +SpellBinder:RegisterEvent("PLAYER_LOGIN") +SpellBinder:RegisterEvent("ZONE_CHANGED_NEW_AREA") +SpellBinder:RegisterEvent("ZONE_CHANGED") +SpellBinder:SetScript("OnEvent", function(self, event, ...) + if event == "PLAYER_LOGIN" then + DB = SVUI_Cache["Bindings"] or {} + DB.spells = DB.spells or {} + DB.frames = DB.frames or {} + DB.keys = DB.keys or {} + SpellBinder:makeFramesList() + SpellBinder:makeSpellsList(ScrollSpells.child, true) + + for i = 1, SPELLS_PER_PAGE do + local parent = _G["SpellButton"..i] + local button = CreateFrame("Button", "SpellBinderFakeButton"..i, parent) + button:SetID(parent:GetID()) + button:RegisterForClicks("AnyDown") + button:SetAllPoints(parent) + button:SetScript("OnClick", addSpell) + + button.shine = SpellBook_GetAutoCastShine() + button.shine:Show() + button.shine:SetParent(button) + button.shine:SetAllPoints() + AutoCastShine_AutoCastStart(button.shine) + + button:Hide() + SpellBinder.spellbuttons[i] = button + end + + self:UnregisterEvent("PLAYER_LOGIN") + elseif event == "PLAYER_ENTERING_WORLD" or event == "GROUP_ROSTER_UPDATE" or event == "ZONE_CHANGED" or event == "ZONE_CHANGED_NEW_AREA" then + SpellBinder.UpdateAll() + end +end) + +SpellBinder:Formula409() +SpellBinderInset:Formula409() + +SpellBinder:SetPanelTemplate("Action") +SpellBinder.Panel:SetPoint("TOPLEFT", -18, 0) +SpellBinder.Panel:SetPoint("BOTTOMRIGHT", 0, 0) + +SpellBinder.OpenButton:Formula409() +SpellBinder.OpenButton:SetButtonTemplate() +SpellBinder.OpenButton:SetNormalTexture("Interface\\ICONS\\Achievement_Guild_Doctorisin") +SpellBinder.OpenButton:GetNormalTexture():ClearAllPoints() +SpellBinder.OpenButton:GetNormalTexture():SetPoint("TOPLEFT", 2, -2) +SpellBinder.OpenButton:GetNormalTexture():SetPoint("BOTTOMRIGHT", -2, 2) +SpellBinder.OpenButton:GetNormalTexture():SetTexCoord(0.1, 0.9, 0.1, 0.9) + +SpellBinderScrollFrameSpellList:Formula409() +SpellBinderScrollFrameSpellList:SetPanelTemplate("Inset") \ No newline at end of file diff --git a/Interface/AddOns/SVUI/system/database.lua b/Interface/AddOns/SVUI/system/database.lua index dcfa36e..5720620 100644 --- a/Interface/AddOns/SVUI/system/database.lua +++ b/Interface/AddOns/SVUI/system/database.lua @@ -98,7 +98,7 @@ SuperVillain.Shared:Register("font","SVUI Dialog Font",[[Interface\AddOns\SVUI\a SuperVillain.Shared:Register("font","SVUI Narrator Font",[[Interface\AddOns\SVUI\assets\fonts\Narrative.ttf]]) SuperVillain.Shared:Register("font","SVUI Number Font",[[Interface\AddOns\SVUI\assets\fonts\Numbers.ttf]]) SuperVillain.Shared:Register("font","SVUI Combat Font",[[Interface\AddOns\SVUI\assets\fonts\Combat.ttf]]) -SuperVillain.Shared:Register("font","SVUI Action Font",[[Interface\AddOns\SVUI\assets\fonts\Display.ttf]]) +SuperVillain.Shared:Register("font","SVUI Action Font",[[Interface\AddOns\SVUI\assets\fonts\Action.ttf]]) SuperVillain.Shared:Register("font","SVUI Name Font",[[Interface\AddOns\SVUI\assets\fonts\Names.ttf]]) SuperVillain.Shared:Register("font","SVUI Alert Font",[[Interface\AddOns\SVUI\assets\fonts\Alert.ttf]]) SuperVillain.Shared:Register("font","Roboto",[[Interface\AddOns\SVUI\assets\fonts\Roboto.ttf]],SuperVillain.Shared.LOCALE_BIT_ruRU+SuperVillain.Shared.LOCALE_BIT_western) @@ -238,7 +238,7 @@ local DefaultSettings = { ["name"] = "SVUI Name Font", ["number"] = "SVUI Number Font", ["combat"] = "SVUI Combat Font", - ["giant"] = "SVUI Narrator Font", + ["giant"] = "SVUI Action Font", ["size"] = 10, ["unicodeSize"] = 12, }, diff --git a/Interface/AddOns/SVUI/system/system.lua b/Interface/AddOns/SVUI/system/system.lua index 4bf9394..9a534c6 100644 --- a/Interface/AddOns/SVUI/system/system.lua +++ b/Interface/AddOns/SVUI/system/system.lua @@ -780,6 +780,7 @@ function SuperVillain:Load() if not SVUI_Cache then SVUI_Cache = {} end if not SVUI_Cache["Dock"] then SVUI_Cache["Dock"] = {} end if not SVUI_Cache["Mentalo"] then SVUI_Cache["Mentalo"] = {} end + if not SVUI_Cache["Bindings"] then SVUI_Cache["Bindings"] = {} end if(not SVUI_Cache["screenheight"] or (SVUI_Cache["screenheight"] and type(SVUI_Cache["screenheight"]) ~= "number")) then SVUI_Cache["screenheight"] = gxHeight end diff --git a/Interface/AddOns/SVUI/system/updates.lua b/Interface/AddOns/SVUI/system/updates.lua index aedd293..5430c99 100644 --- a/Interface/AddOns/SVUI/system/updates.lua +++ b/Interface/AddOns/SVUI/system/updates.lua @@ -105,9 +105,9 @@ function SuperVillain:RefreshSystemFonts() CHAT_FONT_HEIGHTS = {8,9,10,11,12,13,14,15,16,17,18,19,20} UIDROPDOWNMENU_DEFAULT_TEXT_HEIGHT = fontsize - SetFont(GameFont_Gigantic, GIANT_TEXT_FONT, fontsize*3, "THICKOUTLINE", 32) - SetFont(SystemFont_Shadow_Huge1, GIANT_TEXT_FONT, fontsize*1.8, "OUTLINE") - SetFont(SystemFont_OutlineThick_Huge2, GIANT_TEXT_FONT, fontsize*1.8, "THICKOUTLINE") + -- SetFont(GameFont_Gigantic, GIANT_TEXT_FONT, fontsize*3, "THICKOUTLINE", 32) + -- SetFont(SystemFont_Shadow_Huge1, GIANT_TEXT_FONT, fontsize*1.8, "OUTLINE") + -- SetFont(SystemFont_OutlineThick_Huge2, GIANT_TEXT_FONT, fontsize*1.8, "THICKOUTLINE") SetFont(QuestFont_Large, UNIT_NAME_FONT, fontsize+4) SetFont(ZoneTextString, UNIT_NAME_FONT, fontsize*4.2, "OUTLINE") @@ -144,6 +144,10 @@ function SuperVillain:RefreshSystemFonts() SetFont(FriendsFont_Large, STANDARD_TEXT_FONT, fontsize) SetFont(FriendsFont_UserText, STANDARD_TEXT_FONT, fontsize) + SetFont(GameFont_Gigantic, GIANT_TEXT_FONT, 200, "THICKOUTLINE", 32) + SetFont(SystemFont_Shadow_Huge1, GIANT_TEXT_FONT, 200, "OUTLINE") + SetFont(SystemFont_OutlineThick_Huge2, GIANT_TEXT_FONT, 200, "THICKOUTLINE") + SetFont(SystemFont_Shadow_Huge3, DAMAGE_TEXT_FONT, 200, "THICKOUTLINE") SetFont(CombatTextFont, DAMAGE_TEXT_FONT, 200, "THICKOUTLINE") @@ -174,9 +178,9 @@ function SuperVillain:RefreshAllSystemMedia() CHAT_FONT_HEIGHTS = {8,9,10,11,12,13,14,15,16,17,18,19,20} UIDROPDOWNMENU_DEFAULT_TEXT_HEIGHT = fontsize - SetFont(GameFont_Gigantic, GIANT_TEXT_FONT, fontsize*3, "THICKOUTLINE", 32) - SetFont(SystemFont_Shadow_Huge1, GIANT_TEXT_FONT, fontsize*1.8, "OUTLINE") - SetFont(SystemFont_OutlineThick_Huge2, GIANT_TEXT_FONT, fontsize*1.8, "THICKOUTLINE") + -- SetFont(GameFont_Gigantic, GIANT_TEXT_FONT, fontsize*3, "THICKOUTLINE", 32) + -- SetFont(SystemFont_Shadow_Huge1, GIANT_TEXT_FONT, fontsize*1.8, "OUTLINE") + -- SetFont(SystemFont_OutlineThick_Huge2, GIANT_TEXT_FONT, fontsize*1.8, "THICKOUTLINE") SetFont(QuestFont_Large, UNIT_NAME_FONT, fontsize+4) SetFont(ZoneTextString, UNIT_NAME_FONT, fontsize*4.2, "OUTLINE") @@ -213,6 +217,10 @@ function SuperVillain:RefreshAllSystemMedia() SetFont(FriendsFont_Large, STANDARD_TEXT_FONT, fontsize) SetFont(FriendsFont_UserText, STANDARD_TEXT_FONT, fontsize) + SetFont(GameFont_Gigantic, GIANT_TEXT_FONT, 200, "THICKOUTLINE", 32) + SetFont(SystemFont_Shadow_Huge1, GIANT_TEXT_FONT, 200, "OUTLINE") + SetFont(SystemFont_OutlineThick_Huge2, GIANT_TEXT_FONT, 200, "THICKOUTLINE") + SetFont(SystemFont_Shadow_Huge3, DAMAGE_TEXT_FONT, 200, "THICKOUTLINE") SetFont(CombatTextFont, DAMAGE_TEXT_FONT, 200, "THICKOUTLINE") @@ -229,4 +237,33 @@ function SuperVillain:RefreshAllSystemMedia() self:MediaUpdate() self.MediaInitialized = true -end; \ No newline at end of file +end +--[[ +########################################################## +INIT SOME COMBAT FONTS +########################################################## +]]-- +do + local fontFile = "Interface\\AddOns\\SVUI\\assets\\fonts\\Combat.ttf" + + DAMAGE_TEXT_FONT = fontFile + NUM_COMBAT_TEXT_LINES = 20; + COMBAT_TEXT_SCROLLSPEED = 1.0; + COMBAT_TEXT_FADEOUT_TIME = 1.0; + COMBAT_TEXT_HEIGHT = 18; + COMBAT_TEXT_CRIT_MAXHEIGHT = 2.0; + COMBAT_TEXT_CRIT_MINHEIGHT = 1.2; + COMBAT_TEXT_CRIT_SCALE_TIME = 0.7; + COMBAT_TEXT_CRIT_SHRINKTIME = 0.2; + COMBAT_TEXT_TO_ANIMATE = {}; + COMBAT_TEXT_STAGGER_RANGE = 20; + COMBAT_TEXT_SPACING = 7; + COMBAT_TEXT_MAX_OFFSET = 130; + COMBAT_TEXT_LOW_HEALTH_THRESHOLD = 0.2; + COMBAT_TEXT_LOW_MANA_THRESHOLD = 0.2; + COMBAT_TEXT_LOCATIONS = {}; + + local fName, fHeight, fFlags = CombatTextFont:GetFont() + + CombatTextFont:SetFont(fontFile, 24, fFlags) +end \ No newline at end of file diff --git a/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.lua b/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.lua index 2abf3ad..3e75291 100644 --- a/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.lua +++ b/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.lua @@ -182,7 +182,7 @@ local GameTooltip_LogTooltipSetItem = function(self) self:AddLine(" ") self:AddDoubleLine("|cFFFFDD3C[Character]|r","|cFFFFDD3C[Count]|r") for alt,amt in pairs(LOG.BagItemCache[key]) do - local hexString = SVLOG_Data[realmKey]["info"][alt] + local hexString = SVLOG_Data[realmKey]["info"][alt] or "|cffCC1410" local name = ("%s%s|r"):format(hexString, alt) local result = ("%s%s|r"):format(hexString, amt) self:AddDoubleLine(name,result) @@ -343,6 +343,7 @@ local function LoadLogOMatic() if BAGS.BagFrame then BAGS.BagFrame.RefreshBagsSlots = RefreshLoggedBagsSlots; NewHook(BAGS, "MakeBank", LOG.AppendBankFunctions); + RefreshLoggedBagsSlots(BAGS.BagFrame) end end if SuperVillain.db.SVTip.enable then diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Skada.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Skada.lua index 0e79ee4..dde4bc7 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Skada.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Skada.lua @@ -38,16 +38,47 @@ local activePanels = {}; SKADA ########################################################## ]]-- -local mFrame = CreateFrame("Frame","SkadaHolder",UIParent) -mFrame:SetAllPoints() +local function Skada_ShowPopup(self) + STYLE:LoadAlert(L['Do you want to reset Skada?'], function(self) Skada:Reset() self:GetParent():Hide() end) +end + +local function skada_panel_loader(holder, window, parent) + if not window then return end; + + local bars = Skada.displays['bar'] + + holder:SetParent(parent) + holder:SetAllPoints() + + local width,height = holder:GetSize() + + window.db.barspacing = 1; + window.db.barwidth = width - 4; + window.db.background.height = height - (window.db.enabletitle and window.db.title.height or 0) - 1; + window.db.spark=false; + window.db.barslocked = true; + window.bargroup:ClearAllPoints() + window.bargroup:SetPoint('BOTTOMLEFT',holder,'BOTTOMLEFT',0,0) + window.bargroup:SetParent(holder) + window.bargroup:SetFrameStrata('LOW') + + local bgroup = window.bargroup.backdrop; + if bgroup and not bgroup.Panel then + bgroup:Show() + bgroup:SetFixedPanelTemplate('Transparent',true) + end; -local eFrame = CreateFrame("Frame","SkadaHolder2",UIParent) -eFrame:SetAllPoints() + bars.ApplySettings(bars, window) +end local function StyleSkada() - function Skada:ShowPopup() - STYLE:LoadAlert(L['Do you want to reset Skada?'], function(self) Skada:Reset() self:GetParent():Hide() end) + if(not SkadaHolder) then + local SkadaHolder = CreateFrame("Frame", "SkadaHolder", UIParent) end + if(not SkadaHolder2) then + local SkadaHolder2 = CreateFrame("Frame", "SkadaHolder2", UIParent) + end + Skada.ShowPopup = Skada_ShowPopup local SkadaDisplayBar = Skada.displays['bar'] @@ -95,11 +126,13 @@ local function StyleSkada() STYLE:Docklet_Skada() end end) + hooksecurefunc(Skada, 'DeleteWindow', function() if SuperVillain.CurrentlyDocked["SkadaHolder"] or SuperVillain.CurrentlyDocked["SkadaHolder2"] then STYLE:Docklet_Skada() end end) + hooksecurefunc(Skada, 'UpdateDisplay', function() if SuperVillain.CurrentlyDocked["SkadaHolder"] or SuperVillain.CurrentlyDocked["SkadaHolder2"] then STYLE:Docklet_Skada() @@ -107,49 +140,24 @@ local function StyleSkada() end) end -STYLE:SaveAddonStyle("Skada", StyleSkada) - function STYLE:Docklet_Skada() if not Skada then return end; - - local function skada_panel_loader(holder, window, width, height, parent) - if not window then return end; - - local bars = Skada.displays['bar'] - - holder:SetParent(parent) - holder:SetAllPoints() - - window.db.barspacing = 1; - window.db.barwidth = width - 4; - window.db.background.height = height - (window.db.enabletitle and window.db.title.height or 0) - 1; - window.db.spark=false; - window.db.barslocked = true; - window.bargroup:ClearAllPoints() - window.bargroup:SetPoint('BOTTOMLEFT',holder,'BOTTOMLEFT',0,0) - window.bargroup:SetParent(holder) - window.bargroup:SetFrameStrata('LOW') - - local bgroup = window.bargroup.backdrop; - if bgroup and not bgroup.Panel then - bgroup:Show() - bgroup:SetFixedPanelTemplate('Transparent',true) - end; - - bars.ApplySettings(bars, window) - end; - + if(not SkadaHolder) then + local SkadaHolder = CreateFrame("Frame", "SkadaHolder", UIParent) + end + if(not SkadaHolder2) then + local SkadaHolder2 = CreateFrame("Frame", "SkadaHolder2", UIParent) + end for index,window in pairs(Skada:GetWindows()) do local key = "Skada"..window.db.name - local parent; if(SuperVillain.db.SVDock.docklets.DockletMain == key)then - parent = SuperDockletMain - skada_panel_loader(SkadaHolder, window, parent:GetWidth(), parent:GetHeight(), parent) + skada_panel_loader(SkadaHolder, window, SuperDockletMain) elseif(SuperVillain.db.SVDock.docklets.enableExtra and SuperVillain.db.SVDock.docklets.DockletExtra == key) then - parent = SuperDockletExtra - skada_panel_loader(SkadaHolder2, window, parent:GetWidth(), parent:GetHeight(), parent) + skada_panel_loader(SkadaHolder2, window, SuperDockletExtra) else window.db.barslocked = false; end - end; -end; \ No newline at end of file + end +end + +STYLE:SaveAddonStyle("Skada", StyleSkada) \ No newline at end of file