diff --git a/SVUI_!Core/SVUI_!Core.toc b/SVUI_!Core/SVUI_!Core.toc index 1d3f066..9f7342a 100644 --- a/SVUI_!Core/SVUI_!Core.toc +++ b/SVUI_!Core/SVUI_!Core.toc @@ -1,6 +1,6 @@ ## Interface: 60200 ## Author: Munglunch -## Version: 1.2.5 +## Version: 1.2.6 ## Title: |cffFF9900SuperVillain UI: |r|cff00FF00!Core|r ## Notes: SVUI [|cff9911FFCore Framework|r]. ## SavedVariables: SVUI_Global, SVUI_Errors, SVUI_Filters, SVUI_Media diff --git a/SVUI_!Options/SVUI_!Options.toc b/SVUI_!Options/SVUI_!Options.toc index e6e6ae6..7cabd12 100644 --- a/SVUI_!Options/SVUI_!Options.toc +++ b/SVUI_!Options/SVUI_!Options.toc @@ -1,6 +1,6 @@ ## Interface: 60200 ## Author: Munglunch -## Version: 1.2.5 +## Version: 1.2.6 ## Title: |cffFF9900SuperVillain UI: |r|cff00FF00!Options|r ## Notes: SVUI [|cff9911FFConfig Options|r] ## RequiredDeps: SVUI_!Core diff --git a/SVUI_!Options/UnitFrames.lua b/SVUI_!Options/UnitFrames.lua index 669107d..4d68f6b 100644 --- a/SVUI_!Options/UnitFrames.lua +++ b/SVUI_!Options/UnitFrames.lua @@ -1169,6 +1169,31 @@ function SVUIOptions:SetIconConfigGroup(updateFunction, unitName, count) grouporder = grouporder + 1 end + if(iconGroup["aggroIcon"]) then + k.args.aggroIcon = { + order = grouporder, + type = "group", + guiInline = true, + name = L["Aggro (aka: !)"], + get = function(key) + return SV.db.UnitFrames[unitName]["icons"]["aggroIcon"][key[#key]] + end, + set = function(key, value) + MOD:ChangeDBVar(value, key[#key], unitName, "icons", "aggroIcon") + updateFunction(MOD, unitName, count) + end, + args = { + enable = {type = "toggle", order = 1, name = L["Enable"]}, + attachTo = {type = "select", order = 2, name = L["Position"], values = SV.PointIndexes}, + spacer = { order = 3, name = "", type = "description", width = "full"}, + size = {type = "range", name = L["Size"], order = 3, min = 8, max = 60, step = 1}, + xOffset = {order = 4, type = "range", name = L["xOffset"], min = -300, max = 300, step = 1}, + yOffset = {order = 5, type = "range", name = L["yOffset"], min = -300, max = 300, step = 1} + } + } + grouporder = grouporder + 1 + end + if(iconGroup["combatIcon"]) then k.args.combatIcon = { order = grouporder, diff --git a/SVUI_ActionBars/Loader.lua b/SVUI_ActionBars/Loader.lua index 9ad098d..dd53387 100644 --- a/SVUI_ActionBars/Loader.lua +++ b/SVUI_ActionBars/Loader.lua @@ -76,7 +76,8 @@ SV.defaults[Schema] = { ["point"] = "BOTTOMLEFT", ["backdrop"] = false, ["buttonsize"] = 32, - ["buttonspacing"] = 2, + ["buttonspacing"] = 2, + ["showVehicle"] = true, ["useCustomPaging"] = true, ["useCustomVisibility"] = false, ["customVisibility"] = "[petbattle] hide; show", @@ -103,10 +104,11 @@ SV.defaults[Schema] = { ["point"] = "BOTTOMLEFT", ["backdrop"] = false, ["buttonsize"] = 32, - ["buttonspacing"] = 2, + ["buttonspacing"] = 2, + ["showVehicle"] = false, ["useCustomPaging"] = false, ["useCustomVisibility"] = false, - ["customVisibility"] = "[vehicleui] hide; [overridebar] hide; [petbattle] hide; show", + ["customVisibility"] = "[petbattle] hide; show", ["customPaging"] = { ["HUNTER"] = "", ["WARLOCK"] = "", @@ -131,9 +133,10 @@ SV.defaults[Schema] = { ["backdrop"] = false, ["buttonsize"] = 32, ["buttonspacing"] = 2, + ["showVehicle"] = false, ["useCustomPaging"] = false, ["useCustomVisibility"] = false, - ["customVisibility"] = "[vehicleui] hide; [overridebar] hide; [petbattle] hide; show", + ["customVisibility"] = "[petbattle] hide; show", ["customPaging"] = { ["HUNTER"] = "", ["WARLOCK"] = "", @@ -158,9 +161,10 @@ SV.defaults[Schema] = { ["backdrop"] = false, ["buttonsize"] = 32, ["buttonspacing"] = 2, + ["showVehicle"] = false, ["useCustomPaging"] = false, ["useCustomVisibility"] = false, - ["customVisibility"] = "[vehicleui] hide; [overridebar] hide; [petbattle] hide; show", + ["customVisibility"] = "[petbattle] hide; show", ["customPaging"] = { ["HUNTER"] = "", ["WARLOCK"] = "", @@ -185,9 +189,10 @@ SV.defaults[Schema] = { ["backdrop"] = false, ["buttonsize"] = 32, ["buttonspacing"] = 2, + ["showVehicle"] = false, ["useCustomPaging"] = false, ["useCustomVisibility"] = false, - ["customVisibility"] = "[vehicleui] hide; [overridebar] hide; [petbattle] hide; show", + ["customVisibility"] = "[petbattle] hide; show", ["customPaging"] = { ["HUNTER"] = "", ["WARLOCK"] = "", @@ -212,9 +217,10 @@ SV.defaults[Schema] = { ["backdrop"] = false, ["buttonsize"] = 32, ["buttonspacing"] = 2, + ["showVehicle"] = false, ["useCustomPaging"] = false, ["useCustomVisibility"] = false, - ["customVisibility"] = "[vehicleui] hide; [overridebar] hide; [petbattle] hide; show", + ["customVisibility"] = "[petbattle] hide; show", ["customPaging"] = { ["HUNTER"] = "", ["WARLOCK"] = "", @@ -239,9 +245,10 @@ SV.defaults[Schema] = { ["backdrop"] = false, ["buttonsize"] = 32, ["buttonspacing"] = 2, + ["showVehicle"] = false, ["useCustomPaging"] = false, ["useCustomVisibility"] = false, - ["customVisibility"] = "[vehicleui] hide; [overridebar] hide; [petbattle] hide; show", + ["customVisibility"] = "[petbattle] hide; show", ["customPaging"] = { ["HUNTER"] = "", ["WARLOCK"] = "", @@ -266,9 +273,10 @@ SV.defaults[Schema] = { ["backdrop"] = false, ["buttonsize"] = 32, ["buttonspacing"] = 2, + ["showVehicle"] = false, ["useCustomPaging"] = false, ["useCustomVisibility"] = false, - ["customVisibility"] = "[vehicleui] hide; [overridebar] hide; [petbattle] hide; show", + ["customVisibility"] = "[petbattle] hide; show", ["customPaging"] = { ["HUNTER"] = "", ["WARLOCK"] = "", @@ -293,9 +301,10 @@ SV.defaults[Schema] = { ["backdrop"] = false, ["buttonsize"] = 32, ["buttonspacing"] = 2, + ["showVehicle"] = false, ["useCustomPaging"] = false, ["useCustomVisibility"] = false, - ["customVisibility"] = "[vehicleui] hide; [overridebar] hide; [petbattle] hide; show", + ["customVisibility"] = "[petbattle] hide; show", ["customPaging"] = { ["HUNTER"] = "", ["WARLOCK"] = "", @@ -320,9 +329,10 @@ SV.defaults[Schema] = { ["backdrop"] = false, ["buttonsize"] = 32, ["buttonspacing"] = 2, + ["showVehicle"] = false, ["useCustomPaging"] = false, ["useCustomVisibility"] = false, - ["customVisibility"] = "[vehicleui] hide; [overridebar] hide; [petbattle] hide; show", + ["customVisibility"] = "[petbattle] hide; show", ["customPaging"] = { ["HUNTER"] = "", ["WARLOCK"] = "", @@ -941,9 +951,10 @@ function MOD:LoadOptions() for barNumber = 1, count do local barKey = L["Bar"] .. barNumber; + local barTitle = L["Bar"] .. " " .. barNumber; SV.Options.args[Schema].args.barGroup.args[barKey] = { order = (barNumber + 1), - name = L["Bar"] .. " " .. barNumber, + name = barTitle, type = "group", guiInline = false, get = function(key) @@ -1052,10 +1063,27 @@ function MOD:LoadOptions() guiInline = true, disabled = function()return not SV.db[Schema][barKey].enable end, args = { - useCustomPaging = { + showVehicle = { order = 1, type = "toggle", - name = L["Enable"], + name = L["Vehicle Bar"], + desc = L["Assign " .. barTitle .. " as the location for the vehicle bar. NOTE: Only one bar can have this assigned."], + get = function()return SV.db[Schema][barKey].showVehicle end, + set = function(e, f) + SV.db[Schema][barKey].showVehicle = f; + for z = 1, count do + if(z ~= barNumber) then + SV.db[Schema][L["Bar"] .. z].showVehicle = false; + end + end + MOD:UpdateBarPagingDefaults(); + MOD:RefreshBar(barKey) + end + }, + useCustomPaging = { + order = 2, + type = "toggle", + name = L["Custom Paging"], desc = L["Allow the use of custom paging for this bar"], get = function()return SV.db[Schema][barKey].useCustomPaging end, set = function(e, f) @@ -1065,7 +1093,7 @@ function MOD:LoadOptions() end }, resetStates = { - order = 2, + order = 3, type = "execute", name = L["Restore Defaults"], desc = L["Restore default paging attributes for this bar"], @@ -1076,7 +1104,7 @@ function MOD:LoadOptions() end }, customPaging = { - order = 3, + order = 4, type = "input", width = "full", name = L["Paging"], @@ -1090,7 +1118,7 @@ function MOD:LoadOptions() disabled = function()return not SV.db[Schema][barKey].useCustomPaging end, }, useCustomVisibility = { - order = 4, + order = 5, type = "toggle", name = L["Enable"], desc = L["Allow the use of custom paging for this bar"], @@ -1102,7 +1130,7 @@ function MOD:LoadOptions() end }, resetVisibility = { - order = 5, + order = 6, type = "execute", name = L["Restore Defaults"], desc = L["Restore default visibility attributes for this bar"], @@ -1114,7 +1142,7 @@ function MOD:LoadOptions() end }, customVisibility = { - order = 6, + order = 7, type = "input", width = "full", name = L["Visibility"], diff --git a/SVUI_ActionBars/SVUI_ActionBars.lua b/SVUI_ActionBars/SVUI_ActionBars.lua index 81af869..bf784f2 100644 --- a/SVUI_ActionBars/SVUI_ActionBars.lua +++ b/SVUI_ActionBars/SVUI_ActionBars.lua @@ -56,7 +56,10 @@ local NewFrame = CreateFrame local NewHook = hooksecurefunc local NUM_ACTIONBAR_BUTTONS = NUM_ACTIONBAR_BUTTONS; local SEQUENCE_PATTERN = '%s [bar:%d] %d;'; -local BASE_PAGING = '[vehicleui,mod:alt,mod:ctrl] %d; [possessbar] %d; [overridebar] %d; [form,noform] 0; [shapeshift] 13;'; +local BASE_PAGING = '[form,noform] 0; [shapeshift] 13; '; +local SHOW_VEHICLE_PATTERN = '[vehicleui,mod:alt,mod:ctrl] %d; [possessbar] %d; [overridebar] %d; '; +local PAGE_SHOW_VEHICLE = ' '; +local PAGE_HIDE_VEHICLE = '[vehicleui] hide; [possessbar] hide; [overridebar] hide; '; --[[ Quick explaination of what Im doing with all of these locals... What I have done is set local variables for every database value @@ -497,11 +500,41 @@ function MOD:SetBarConfigData(bar) end function MOD:UpdateBarPagingDefaults() - local core_paging = BASE_PAGING:format(GetVehicleBarIndex(), GetVehicleBarIndex(), GetOverrideBarIndex()); + PAGE_SHOW_VEHICLE = SHOW_VEHICLE_PATTERN:format(GetVehicleBarIndex(), GetVehicleBarIndex(), GetOverrideBarIndex()); + local vehicle_bar; + + 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 + parse = PAGE_SHOW_VEHICLE; + vehicle_bar = true; + else + parse = PAGE_HIDE_VEHICLE; + end + + if(SV.db.ActionBars[id].useCustomPaging) then + parse = parse .. SV.db.ActionBars[id].customPaging[SV.class]; + --print('Bar '..i..': '..bar.conditions); + end + + bar.conditions = parse; + end + end + local mainbar = _G["SVUI_ActionBar1"]; if(mainbar) then - local parse = core_paging .. " "; + local parse = BASE_PAGING; + + if SV.db.ActionBars.Bar1.showVehicle then + parse = parse .. " " .. PAGE_SHOW_VEHICLE; + else + parse = parse .. " " .. PAGE_HIDE_VEHICLE; + end + local parse = BASE_PAGING; for i=2, TOTAL_BARS do parse = SEQUENCE_PATTERN:format(parse, i, i) end @@ -513,15 +546,6 @@ function MOD:UpdateBarPagingDefaults() mainbar.conditions = parse; end - for i=2, TOTAL_BARS do - local id = ("Bar%d"):format(i) - local bar = _G["SVUI_Action" .. id] - if(bar and SV.db.ActionBars[id].useCustomPaging) then - bar.conditions = SV.db.ActionBars[id].customPaging[SV.class]; - --print('Bar '..i..': '..bar.conditions); - end - end - if((not SV.db.ActionBars.enable or InCombatLockdown()) or not self.isInitialized) then return end local Bar2Option = InterfaceOptionsActionBarsPanelBottomRight local Bar3Option = InterfaceOptionsActionBarsPanelBottomLeft diff --git a/SVUI_ActionBars/SVUI_ActionBars.toc b/SVUI_ActionBars/SVUI_ActionBars.toc index 072b89f..9912463 100644 --- a/SVUI_ActionBars/SVUI_ActionBars.toc +++ b/SVUI_ActionBars/SVUI_ActionBars.toc @@ -1,6 +1,6 @@ ## Interface: 60200 ## Author: Munglunch -## Version: 1.2.5 +## Version: 1.2.6 ## Title: |cffFF9900SuperVillain UI: |r|cffFFEF00Action Bars|r ## Notes: Action Bar Plugin for [|cff9911FFSVUI|r]. ## OptionalDeps: LibSharedMedia-3.0, LibActionButton-1.0 diff --git a/SVUI_Auras/SVUI_Auras.toc b/SVUI_Auras/SVUI_Auras.toc index fbeb17b..be30654 100644 --- a/SVUI_Auras/SVUI_Auras.toc +++ b/SVUI_Auras/SVUI_Auras.toc @@ -1,6 +1,6 @@ ## Interface: 60200 ## Author: Munglunch -## Version: 1.2.5 +## Version: 1.2.6 ## Title: |cffFF9900SuperVillain UI: |r|cffFFEF00Auras|r ## Notes: Aura Plugin for [|cff9911FFSVUI|r]. ## OptionalDeps: LibSharedMedia-3.0 diff --git a/SVUI_Chat/SVUI_Chat.toc b/SVUI_Chat/SVUI_Chat.toc index afb034d..7ec1095 100644 --- a/SVUI_Chat/SVUI_Chat.toc +++ b/SVUI_Chat/SVUI_Chat.toc @@ -1,6 +1,6 @@ ## Interface: 60200 ## Author: Munglunch -## Version: 1.2.5 +## Version: 1.2.6 ## Title: |cffFF9900SuperVillain UI: |r|cffFFEF00Chat|r ## Notes: Chat Plugin for [|cff9911FFSVUI|r]. ## SavedVariablesPerCharacter: SVUI_Private_ChatCache diff --git a/SVUI_CraftOMatic/SVUI_CraftOMatic.lua b/SVUI_CraftOMatic/SVUI_CraftOMatic.lua index 3e3aef7..753a638 100644 --- a/SVUI_CraftOMatic/SVUI_CraftOMatic.lua +++ b/SVUI_CraftOMatic/SVUI_CraftOMatic.lua @@ -407,11 +407,26 @@ function PLUGIN:SetJobMode(category) end self:ChangeModeGear() if(currentModeKey and self[currentModeKey] and self[currentModeKey].Disable) then - self:EndJobModes() - return; + if(currentModeKey == category) then + self:EndJobModes() + return; + else + self:EndJobModes() + end end currentModeKey = category; if(self[category] and self[category].Enable) then + for key,button in pairs(self.ToolBar.Buttons) do + if(key == category) then + button.currentColor = "highlight"; + button.icon:SetGradient(unpack(SV.media.gradient.highlight)) + button:SetAlpha(1) + else + button.currentColor = "icon"; + button.icon:SetGradient(unpack(SV.media.gradient.icon)) + button:SetAlpha(0.5) + end + end self[category].Enable() else self:EndJobModes() @@ -420,6 +435,11 @@ function PLUGIN:SetJobMode(category) end function PLUGIN:EndJobModes() + for key,button in pairs(self.ToolBar.Buttons) do + button.currentColor = "icon"; + button.icon:SetGradient(unpack(SV.media.gradient.icon)); + button:SetAlpha(1); + end if(currentModeKey and self[currentModeKey] and self[currentModeKey].Disable) then self[currentModeKey].Disable() end @@ -521,7 +541,7 @@ end local ModeButton_OnLeave = function(self) if InCombatLockdown() then return; end - self.icon:SetGradient("VERTICAL", 0.5, 0.53, 0.55, 0.8, 0.8, 1) + self.icon:SetGradient(unpack(SV.media.gradient[self.currentColor])) GameTooltip:Hide() end @@ -536,13 +556,7 @@ SIZING CALLBACK ]]-- local function ResizeCraftingDock() local DOCK_HEIGHT = PLUGIN.Docklet.Parent.Window:GetHeight(); - local BUTTON_SIZE = (DOCK_HEIGHT * 0.25) - 4; - SVUI_ModesDockToolBar:SetWidth(BUTTON_SIZE + 4); - SVUI_ModesDockToolBar:SetHeight((BUTTON_SIZE + 4) * 4); - SVUI_ModeButton4:SetSize(BUTTON_SIZE,BUTTON_SIZE); - SVUI_ModeButton3:SetSize(BUTTON_SIZE,BUTTON_SIZE); - SVUI_ModeButton2:SetSize(BUTTON_SIZE,BUTTON_SIZE); - SVUI_ModeButton1:SetSize(BUTTON_SIZE,BUTTON_SIZE); + SVUI_ModesDockToolBar:SetHeight(DOCK_HEIGHT); end SV.Events:On("DOCKS_UPDATED", ResizeCraftingDock, true); @@ -564,58 +578,62 @@ function PLUGIN:Load() local DOCKLET_HEIGHT = DOCK_HEIGHT - 4; local BUTTON_SIZE = (DOCK_HEIGHT * 0.25) - 4; - local modesToolBar = CreateFrame("Frame", "SVUI_ModesDockToolBar", self.Docklet) - modesToolBar:SetWidth(BUTTON_SIZE + 4); - modesToolBar:SetHeight((BUTTON_SIZE + 4) * 4); - modesToolBar:SetPoint("BOTTOMLEFT", self.Docklet, "BOTTOMLEFT", 0, 0); - - local mode4Button = CreateFrame("Frame", "SVUI_ModeButton4", modesToolBar) - mode4Button:SetPoint("BOTTOM",modesToolBar,"BOTTOM",0,0) - mode4Button:SetSize(BUTTON_SIZE,BUTTON_SIZE) - mode4Button.icon = mode4Button:CreateTexture(nil, 'BACKGROUND') - mode4Button.icon:SetTexture(FARM_ICON) - mode4Button.icon:InsetPoints(mode4Button) - mode4Button.icon:SetGradient("VERTICAL", 0.5, 0.53, 0.55, 0.8, 0.8, 1) - mode4Button.modeName = "Farming" - mode4Button:SetScript('OnEnter', ModeButton_OnEnter) - mode4Button:SetScript('OnLeave', ModeButton_OnLeave) - mode4Button:SetScript('OnMouseDown', ModeButton_OnMouseDown) - - local mode3Button = CreateFrame("Frame", "SVUI_ModeButton3", modesToolBar) - mode3Button:SetPoint("BOTTOM",mode4Button,"TOP",0,2) - mode3Button:SetSize(BUTTON_SIZE,BUTTON_SIZE) - mode3Button.icon = mode3Button:CreateTexture(nil, 'BACKGROUND') - mode3Button.icon:SetTexture(ARCH_ICON) - mode3Button.icon:InsetPoints(mode3Button) - mode3Button.icon:SetGradient("VERTICAL", 0.5, 0.53, 0.55, 0.8, 0.8, 1) - mode3Button.modeName = "Archaeology" - mode3Button:SetScript('OnEnter', ModeButton_OnEnter) - mode3Button:SetScript('OnLeave', ModeButton_OnLeave) - mode3Button:SetScript('OnMouseDown', ModeButton_OnMouseDown) - - local mode2Button = CreateFrame("Frame", "SVUI_ModeButton2", modesToolBar) - mode2Button:SetPoint("BOTTOM",mode3Button,"TOP",0,2) - mode2Button:SetSize(BUTTON_SIZE,BUTTON_SIZE) - mode2Button.icon = mode2Button:CreateTexture(nil, 'BACKGROUND') - mode2Button.icon:SetTexture(FISH_ICON) - mode2Button.icon:InsetPoints(mode2Button) - mode2Button.icon:SetGradient("VERTICAL", 0.5, 0.53, 0.55, 0.8, 0.8, 1) - mode2Button.modeName = "Fishing" - mode2Button:SetScript('OnEnter', ModeButton_OnEnter) - mode2Button:SetScript('OnLeave', ModeButton_OnLeave) - mode2Button:SetScript('OnMouseDown', ModeButton_OnMouseDown) - - local mode1Button = CreateFrame("Frame", "SVUI_ModeButton1", modesToolBar) - mode1Button:SetPoint("BOTTOM",mode2Button,"TOP",0,2) - mode1Button:SetSize(BUTTON_SIZE,BUTTON_SIZE) - mode1Button.icon = mode1Button:CreateTexture(nil, 'BACKGROUND') - mode1Button.icon:SetTexture(COOK_ICON) - mode1Button.icon:InsetPoints(mode1Button) - mode1Button.icon:SetGradient("VERTICAL", 0.5, 0.53, 0.55, 0.8, 0.8, 1) - mode1Button.modeName = "Cooking" - mode1Button:SetScript('OnEnter', ModeButton_OnEnter) - mode1Button:SetScript('OnLeave', ModeButton_OnLeave) - mode1Button:SetScript('OnMouseDown', ModeButton_OnMouseDown) + local toolBar = CreateFrame("Frame", "SVUI_ModesDockToolBar", self.Docklet) + toolBar:SetWidth(BUTTON_SIZE + 4); + toolBar:SetHeight((BUTTON_SIZE + 4) * 4); + toolBar:SetPoint("BOTTOMLEFT", self.Docklet, "BOTTOMLEFT", 0, 0); + + local tool4 = CreateFrame("Frame", nil, toolBar) + tool4:SetPoint("BOTTOM",toolBar,"BOTTOM",0,0) + tool4:SetSize(BUTTON_SIZE,BUTTON_SIZE) + tool4.icon = tool4:CreateTexture(nil, 'BACKGROUND') + tool4.icon:SetTexture(FARM_ICON) + tool4.icon:InsetPoints(tool4) + tool4.icon:SetGradient("VERTICAL", 0.5, 0.53, 0.55, 0.8, 0.8, 1) + tool4.modeName = "Farming" + tool4.currentColor = "icon" + tool4:SetScript('OnEnter', ModeButton_OnEnter) + tool4:SetScript('OnLeave', ModeButton_OnLeave) + tool4:SetScript('OnMouseDown', ModeButton_OnMouseDown) + + local tool3 = CreateFrame("Frame", nil, toolBar) + tool3:SetPoint("BOTTOM",tool4,"TOP",0,2) + tool3:SetSize(BUTTON_SIZE,BUTTON_SIZE) + tool3.icon = tool3:CreateTexture(nil, 'BACKGROUND') + tool3.icon:SetTexture(ARCH_ICON) + tool3.icon:InsetPoints(tool3) + tool3.icon:SetGradient("VERTICAL", 0.5, 0.53, 0.55, 0.8, 0.8, 1) + tool3.modeName = "Archaeology" + tool3.currentColor = "icon" + tool3:SetScript('OnEnter', ModeButton_OnEnter) + tool3:SetScript('OnLeave', ModeButton_OnLeave) + tool3:SetScript('OnMouseDown', ModeButton_OnMouseDown) + + local tool2 = CreateFrame("Frame", nil, toolBar) + tool2:SetPoint("BOTTOM",tool3,"TOP",0,2) + tool2:SetSize(BUTTON_SIZE,BUTTON_SIZE) + tool2.icon = tool2:CreateTexture(nil, 'BACKGROUND') + tool2.icon:SetTexture(FISH_ICON) + tool2.icon:InsetPoints(tool2) + tool2.icon:SetGradient("VERTICAL", 0.5, 0.53, 0.55, 0.8, 0.8, 1) + tool2.modeName = "Fishing" + tool2.currentColor = "icon" + tool2:SetScript('OnEnter', ModeButton_OnEnter) + tool2:SetScript('OnLeave', ModeButton_OnLeave) + tool2:SetScript('OnMouseDown', ModeButton_OnMouseDown) + + local tool1 = CreateFrame("Frame", nil, toolBar) + tool1:SetPoint("BOTTOM",tool2,"TOP",0,2) + tool1:SetSize(BUTTON_SIZE,BUTTON_SIZE) + tool1.icon = tool1:CreateTexture(nil, 'BACKGROUND') + tool1.icon:SetTexture(COOK_ICON) + tool1.icon:InsetPoints(tool1) + tool1.icon:SetGradient("VERTICAL", 0.5, 0.53, 0.55, 0.8, 0.8, 1) + tool1.modeName = "Cooking" + tool1.currentColor = "icon" + tool1:SetScript('OnEnter', ModeButton_OnEnter) + tool1:SetScript('OnLeave', ModeButton_OnLeave) + tool1:SetScript('OnMouseDown', ModeButton_OnMouseDown) local ModeAlert = CreateFrame("Frame", nil, self.Docklet) ModeAlert:SetAllPoints(self.Docklet.Parent.Alert) @@ -639,7 +657,7 @@ function PLUGIN:Load() ModeAlert:Hide() ModeLogsFrame:SetFrameStrata("MEDIUM") - ModeLogsFrame:SetPoint("TOPLEFT", mode1Button, "TOPRIGHT", 5, -5) + ModeLogsFrame:SetPoint("TOPLEFT", toolBar, "TOPRIGHT", 5, -5) ModeLogsFrame:SetPoint("BOTTOMRIGHT", self.Docklet, "BOTTOMRIGHT", -5, 5) ModeLogsFrame:SetParent(self.Docklet) @@ -656,16 +674,16 @@ function PLUGIN:Load() title:SetInsertMode('TOP') title.divider = title:CreateTexture(nil,"OVERLAY") - title.divider:SetTexture(0,0,0,0.5) - title.divider:SetPoint("BOTTOMLEFT") - title.divider:SetPoint("BOTTOMRIGHT") - title.divider:SetHeight(1) + title.divider:SetTexture(0,0,0,0.5) + title.divider:SetPoint("BOTTOMLEFT") + title.divider:SetPoint("BOTTOMRIGHT") + title.divider:SetHeight(1) - local topleftline = title:CreateTexture(nil,"OVERLAY") - topleftline:SetTexture(0,0,0,0.5) - topleftline:SetPoint("TOPLEFT") - topleftline:SetPoint("BOTTOMLEFT") - topleftline:SetWidth(1) + local topleftline = title:CreateTexture(nil,"OVERLAY") + topleftline:SetTexture(0,0,0,0.5) + topleftline:SetPoint("TOPLEFT") + topleftline:SetPoint("BOTTOMLEFT") + topleftline:SetWidth(1) local log = CreateFrame("ScrollingMessageFrame", nil, ModeLogsFrame) log:SetSpacing(4) @@ -684,14 +702,22 @@ function PLUGIN:Load() log:SetInsertMode('TOP') local bottomleftline = log:CreateTexture(nil,"OVERLAY") - bottomleftline:SetTexture(0,0,0,0.5) - bottomleftline:SetPoint("TOPLEFT") - bottomleftline:SetPoint("BOTTOMLEFT") - bottomleftline:SetWidth(1) - - self.ModeAlert = ModeAlert - self.TitleWindow = title - self.LogWindow = log + bottomleftline:SetTexture(0,0,0,0.5) + bottomleftline:SetPoint("TOPLEFT") + bottomleftline:SetPoint("BOTTOMLEFT") + bottomleftline:SetWidth(1) + + self.ToolBar = toolBar; + self.ToolBar.Buttons = { + ["Cooking"] = tool1, + ["Fishing"] = tool2, + ["Archaeology"] = tool3, + ["Farming"] = tool4 + }; + + self.ModeAlert = ModeAlert; + self.TitleWindow = title; + self.LogWindow = log; --self.Docklet:Hide() self.ListenerEnabled = false; self:CraftingReset() @@ -701,4 +727,5 @@ function PLUGIN:Load() self:PrepareFarmingTools() self:RegisterEvent("SKILL_LINES_CHANGED") + SV.Events:On("DOCK_EXPANDED", ResizeCraftingDock, true); end diff --git a/SVUI_FightOMatic/SVUI_FightOMatic.lua b/SVUI_FightOMatic/SVUI_FightOMatic.lua index 98b3da3..0a6f5c5 100644 --- a/SVUI_FightOMatic/SVUI_FightOMatic.lua +++ b/SVUI_FightOMatic/SVUI_FightOMatic.lua @@ -200,7 +200,7 @@ local function Stealth_Emote(name) end --[[ ########################################################## -CORE FUNCTIONS +VARS ########################################################## ]]-- local EnemyCache, AlertedCache = {},{} @@ -405,6 +405,59 @@ local function StealthAlarm(spell, name) end end +local function PopulateScans() + PLUGIN.Title:Clear(); + PLUGIN.Summary:Clear(); + PLUGIN.LOG.Output:Clear(); + PLUGIN.Title:AddMessage(("Scanning %s"):format(ACTIVE_ZONE), 1, 1, 0); + PLUGIN.Switch:Show() + local stored = PLUGIN.public; + local amount = 0 + for _,data in pairs(stored) do + if type(data) == "table" and data.name and data.class then + amount = amount + 1; + end + end + PLUGIN.Summary:AddMessage(("You Have |cffff5500%s|r Mortal Enemies"):format(amount), 0.8, 0.8, 0.8); + local hasScans = false; + for _,data in pairs(EnemyCache) do + if type(data) == "table" and data.name and data.class and data.race then + local nameLink = linkString:format(data.name, data.name) + local hex = ("%s - %s %s"):format(nameLink, data.race, data.class) + PLUGIN.LOG.Output:AddMessage(hex, data.colors.r, data.colors.g, data.colors.b); + hasScans = true; + end + end +end + +local function PopulateRadio() + PLUGIN.Title:Clear(); + PLUGIN.Summary:Clear(); + PLUGIN.LOG.Output:Clear(); + PLUGIN.Switch:Hide(); + PLUGIN.Title:AddMessage('Radio Communicator', 1, 1, 0); +end + +local function PopulateStats() + PLUGIN.Title:Clear(); + PLUGIN.Summary:Clear(); + PLUGIN.LOG.Output:Clear(); + PLUGIN.Switch:Hide(); + PLUGIN.Title:AddMessage('PvP Stats', 1, 1, 0); +end + +local function PopulateMisc() + PLUGIN.Title:Clear(); + PLUGIN.Summary:Clear(); + PLUGIN.LOG.Output:Clear(); + PLUGIN.Switch:Hide(); + PLUGIN.Title:AddMessage('Misc', 1, 1, 0); +end +--[[ +########################################################## +CORE FUNCTIONS +########################################################## +]]-- function PLUGIN:UpdateSummary() self.Summary:Clear(); local stored = self.public; @@ -454,31 +507,6 @@ function PLUGIN:PopulateKOS() self.Summary:AddMessage(("You Have |cffff5500%s|r Mortal Enemies"):format(amount), 0.8, 0.8, 0.8) end -function PLUGIN:PopulateScans() - self.Title:Clear(); - self.Summary:Clear(); - self.LOG.Output:Clear(); - self.Title:AddMessage(("Scanning %s"):format(ACTIVE_ZONE), 1, 1, 0); - self.Switch:Show() - local stored = self.public; - local amount = 0 - for _,data in pairs(stored) do - if type(data) == "table" and data.name and data.class then - amount = amount + 1; - end - end - self.Summary:AddMessage(("You Have |cffff5500%s|r Mortal Enemies"):format(amount), 0.8, 0.8, 0.8); - local hasScans = false; - for _,data in pairs(EnemyCache) do - if type(data) == "table" and data.name and data.class and data.race then - local nameLink = linkString:format(data.name, data.name) - local hex = ("%s - %s %s"):format(nameLink, data.race, data.class) - self.LOG.Output:AddMessage(hex, data.colors.r, data.colors.g, data.colors.b); - hasScans = true; - end - end -end - function PLUGIN:PauseScanner() if(not self.InPVP) then self.Title:Clear(); @@ -492,7 +520,7 @@ function PLUGIN:PauseScanner() self.LOG.Output:AddMessage("The Enenmy Scanner Will Resume", 0.8, 0.8, 0.8); self.LOG.Output:AddMessage("When You Leave This BattleGround", 0.8, 0.8, 0.8); else - self:PopulateScans() + PopulateScans() end end @@ -521,7 +549,7 @@ function PLUGIN:UpdateCommunicator() self.InPVP = nil self:RegisterEvent("UPDATE_BATTLEFIELD_SCORE") self.Scanning = true - self:PopulateScans() + PopulateScans() else local mapID = GetCurrentMapAreaID() if(mapID) then @@ -842,9 +870,9 @@ local function MakeUtilityWindow() fbText:SetFont(SV.media.font.default, 12, "NONE") fbText:SetText("Utilities Coming Soon....") - PLUGIN.TOOL = frame - PLUGIN.TOOL:Hide() - return PLUGIN.TOOL + PLUGIN.MISC = frame + PLUGIN.MISC:Hide() + return PLUGIN.MISC end local function MakeInfoWindow() @@ -931,7 +959,7 @@ end local FightOMaticTool_OnLeave = function(self) if InCombatLockdown() then return; end - self.icon:SetGradient("VERTICAL", 0.5, 0.53, 0.55, 0.8, 0.8, 1) + self.icon:SetGradient(unpack(SV.media.gradient[self.currentColor])) GameTooltip:Hide() end @@ -939,21 +967,21 @@ local FightOMaticTool_OnMouseDown = function(self) RadioSound() PLUGIN.LOG:FadeOut(0.5, 1, 0, true) PLUGIN.COMM:FadeOut(0.5, 1, 0, true) - PLUGIN.TOOL:FadeOut(0.5, 1, 0, true) + PLUGIN.MISC:FadeOut(0.5, 1, 0, true) PLUGIN.INFO:FadeOut(0.5, 1, 0, true) - self.Window:FadeIn(0.3, 0, 1) - PLUGIN.Title:Clear(); - PLUGIN.Title:AddMessage(self.TTitle, 1, 1, 0); -end - -local Scanner_OnMouseDown = function(self) - RadioSound() - PLUGIN.LOG:FadeOut(0.5, 1, 0, true) - PLUGIN.COMM:FadeOut(0.5, 1, 0, true) - PLUGIN.TOOL:FadeOut(0.5, 1, 0, true) - PLUGIN.INFO:FadeOut(0.5, 1, 0, true) - self.Window:FadeIn(0.3, 0, 1) - PLUGIN:PopulateScans() + self.Window:FadeIn(0.3, 0, 1); + for key,button in pairs(PLUGIN.ToolBar.Buttons) do + if(key == self.TText) then + button.currentColor = "highlight"; + button.icon:SetGradient(unpack(SV.media.gradient.highlight)) + button:SetAlpha(1) + else + button.currentColor = "icon"; + button.icon:SetGradient(unpack(SV.media.gradient.icon)) + button:SetAlpha(0.5) + end + end + self.Activate(); end local Switch_OnEnter = function(self) @@ -982,7 +1010,7 @@ local Switch_OnClick = function(self, button) ClearCacheScans() else if(self.ShowingKOS) then - PLUGIN:PopulateScans() + PopulateScans() self.ShowingKOS = false else PLUGIN:PopulateKOS() @@ -993,6 +1021,15 @@ local Switch_OnClick = function(self, button) end --[[ ########################################################## +SIZING CALLBACK +########################################################## +]]-- +local function ResizeFightDock() + local DOCK_HEIGHT = PLUGIN.Docklet.Parent.Window:GetHeight(); + SVUI_FightOMaticToolBar:SetHeight(DOCK_HEIGHT); +end +--[[ +########################################################## BUILD FUNCTION ########################################################## ]]-- @@ -1073,33 +1110,39 @@ function PLUGIN:Load() divider2:SetPoint("BOTTOMRIGHT") divider2:SetHeight(1) - local tool4 = CreateFrame("Frame", "SVUI_FightOMaticTool4", toolBar) + local tool4 = CreateFrame("Frame", "SVUI_FightOMaticTool3", toolBar) tool4:SetPoint("BOTTOM",toolBar,"BOTTOM",0,0) tool4:SetSize(BUTTON_SIZE,BUTTON_SIZE) tool4.icon = tool4:CreateTexture(nil, 'OVERLAY') - tool4.icon:SetTexture(INFO_ICON) + tool4.icon:SetTexture(UTILITY_ICON) tool4.icon:InsetPoints(tool4) - tool4.icon:SetGradient("VERTICAL", 0.5, 0.53, 0.55, 0.8, 0.8, 1) - tool4.TText = "Stats" - tool4.TTitle = "Statistics and Information" + tool4.icon:SetGradient(unpack(SV.media.gradient.icon)) + tool4.TText = "Misc" + tool4.TTitle = "Tools and Utilities" + tool4.currentColor = "icon" tool4:SetScript('OnEnter', FightOMaticTool_OnEnter) tool4:SetScript('OnLeave', FightOMaticTool_OnLeave) tool4:SetScript('OnMouseDown', FightOMaticTool_OnMouseDown) - tool4.Window = MakeInfoWindow() + tool4.Activate = PopulateMisc; + tool4.Window = MakeUtilityWindow(); + tool4:SetAlpha(0.5); - local tool3 = CreateFrame("Frame", "SVUI_FightOMaticTool3", toolBar) + local tool3 = CreateFrame("Frame", "SVUI_FightOMaticTool4", toolBar) tool3:SetPoint("BOTTOM",tool4,"TOP",0,2) tool3:SetSize(BUTTON_SIZE,BUTTON_SIZE) tool3.icon = tool3:CreateTexture(nil, 'OVERLAY') - tool3.icon:SetTexture(UTILITY_ICON) + tool3.icon:SetTexture(INFO_ICON) tool3.icon:InsetPoints(tool3) - tool3.icon:SetGradient("VERTICAL", 0.5, 0.53, 0.55, 0.8, 0.8, 1) - tool3.TText = "Tools" - tool3.TTitle = "Tools and Utilities" + tool3.icon:SetGradient(unpack(SV.media.gradient.icon)) + tool3.TText = "Stats" + tool3.TTitle = "Statistics and Information" + tool3.currentColor = "icon" tool3:SetScript('OnEnter', FightOMaticTool_OnEnter) tool3:SetScript('OnLeave', FightOMaticTool_OnLeave) tool3:SetScript('OnMouseDown', FightOMaticTool_OnMouseDown) - tool3.Window = MakeUtilityWindow() + tool3.Activate = PopulateStats; + tool3.Window = MakeInfoWindow(); + tool3:SetAlpha(0.5); local tool2 = CreateFrame("Frame", "SVUI_FightOMaticTool2", toolBar) tool2:SetPoint("BOTTOM",tool3,"TOP",0,2) @@ -1107,13 +1150,16 @@ function PLUGIN:Load() tool2.icon = tool2:CreateTexture(nil, 'OVERLAY') tool2.icon:SetTexture(RADIO_ICON) tool2.icon:InsetPoints(tool2) - tool2.icon:SetGradient("VERTICAL", 0.5, 0.53, 0.55, 0.8, 0.8, 1) + tool2.icon:SetGradient(unpack(SV.media.gradient.icon)) tool2.TText = "Radio" tool2.TTitle = "Radio Communicator" + tool2.currentColor = "icon" tool2:SetScript('OnEnter', FightOMaticTool_OnEnter) tool2:SetScript('OnLeave', FightOMaticTool_OnLeave) tool2:SetScript('OnMouseDown', FightOMaticTool_OnMouseDown) - tool2.Window = MakeCommWindow() + tool2.Activate = PopulateRadio; + tool2.Window = MakeCommWindow(); + tool2:SetAlpha(0.5) local tool1 = CreateFrame("Frame", "SVUI_FightOMaticTool1", toolBar) tool1:SetPoint("BOTTOM",tool2,"TOP",0,2) @@ -1121,15 +1167,23 @@ function PLUGIN:Load() tool1.icon = tool1:CreateTexture(nil, 'OVERLAY') tool1.icon:SetTexture(SCANNER_ICON) tool1.icon:InsetPoints(tool1) - tool1.icon:SetGradient("VERTICAL", 0.5, 0.53, 0.55, 0.8, 0.8, 1) + tool1.icon:SetGradient(unpack(SV.media.gradient.highlight)) tool1.TText = "Scanner" tool1.TTitle = "Enemy Scanner" + tool1.currentColor = "highlight" tool1:SetScript('OnEnter', FightOMaticTool_OnEnter) tool1:SetScript('OnLeave', FightOMaticTool_OnLeave) - tool1:SetScript('OnMouseDown', Scanner_OnMouseDown) + tool1:SetScript('OnMouseDown', FightOMaticTool_OnMouseDown) + tool1.Activate = PopulateScans; tool1.Window = MakeLogWindow() - --self.Docklet:Hide() + self.ToolBar = toolBar; + self.ToolBar.Buttons = { + ["Scanner"] = tool1, + ["Radio"] = tool2, + ["Stats"] = tool3, + ["Misc"] = tool4 + }; self:ResetLogs() @@ -1159,4 +1213,6 @@ function PLUGIN:Load() SVUI_Player.Health.LowAlertFunc = LowHealth_PlayerEmote SVUI_Target.Health.LowAlertFunc = LowHealth_TargetEmote end + + SV.Events:On("DOCK_EXPANDED", ResizeFightDock, true); end diff --git a/SVUI_Inventory/SVUI_Inventory.toc b/SVUI_Inventory/SVUI_Inventory.toc index 1b3bda9..7cd23da 100644 --- a/SVUI_Inventory/SVUI_Inventory.toc +++ b/SVUI_Inventory/SVUI_Inventory.toc @@ -1,6 +1,6 @@ ## Interface: 60200 ## Author: Munglunch -## Version: 1.2.5 +## Version: 1.2.6 ## Title: |cffFF9900SuperVillain UI: |r|cffFFEF00Inventory|r ## Notes: Inventory Plugin for [|cff9911FFSVUI|r]. ## SavedVariables: SVUI_LootCache diff --git a/SVUI_Maps/SVUI_Maps.toc b/SVUI_Maps/SVUI_Maps.toc index 9f4f2c4..afed44d 100644 --- a/SVUI_Maps/SVUI_Maps.toc +++ b/SVUI_Maps/SVUI_Maps.toc @@ -1,6 +1,6 @@ ## Interface: 60200 ## Author: Munglunch -## Version: 1.2.5 +## Version: 1.2.6 ## Title: |cffFF9900SuperVillain UI: |r|cffFFEF00Maps|r ## Notes: Maps Plugin for [|cff9911FFSVUI|r]. ## OptionalDeps: LibSharedMedia-3.0 diff --git a/SVUI_NamePlates/SVUI_NamePlates.toc b/SVUI_NamePlates/SVUI_NamePlates.toc index 36c42ae..83e7e5d 100644 --- a/SVUI_NamePlates/SVUI_NamePlates.toc +++ b/SVUI_NamePlates/SVUI_NamePlates.toc @@ -1,6 +1,6 @@ ## Interface: 60200 ## Author: Munglunch -## Version: 1.2.5 +## Version: 1.2.6 ## Title: |cffFF9900SuperVillain UI: |r|cffFFEF00NamePlates|r ## Notes: NamePlates Plugin for [|cff9911FFSVUI|r]. ## OptionalDeps: LibSharedMedia-3.0 diff --git a/SVUI_QuestTracker/SVUI_QuestTracker.toc b/SVUI_QuestTracker/SVUI_QuestTracker.toc index 9e5c9da..182e0c3 100644 --- a/SVUI_QuestTracker/SVUI_QuestTracker.toc +++ b/SVUI_QuestTracker/SVUI_QuestTracker.toc @@ -1,6 +1,6 @@ ## Interface: 60200 ## Author: Munglunch -## Version: 1.2.5 +## Version: 1.2.6 ## Title: |cffFF9900SuperVillain UI: |r|cffFFEF00QuestTracker|r ## Notes: QuestTracker Plugin for [|cff9911FFSVUI|r]. ## OptionalDeps: LibSharedMedia-3.0 diff --git a/SVUI_Skins/SVUI_Skins.toc b/SVUI_Skins/SVUI_Skins.toc index db7dd70..546fcb0 100644 --- a/SVUI_Skins/SVUI_Skins.toc +++ b/SVUI_Skins/SVUI_Skins.toc @@ -1,6 +1,6 @@ ## Interface: 60200 ## Author: Munglunch, Azilroka, Sortokk -## Version: 1.2.5 +## Version: 1.2.6 ## Title: |cffFF9900SuperVillain UI: |r|cffFFEF00Skins|r ## Notes: SVUI [|cff9911FFSkins System and AddOn Frames|r]. ## SavedVariables: SVUIUI_STYLE_GLOBAL diff --git a/SVUI_Skins/components/blizzard/auctionhouse.lua b/SVUI_Skins/components/blizzard/auctionhouse.lua index 14a43e2..db10465 100644 --- a/SVUI_Skins/components/blizzard/auctionhouse.lua +++ b/SVUI_Skins/components/blizzard/auctionhouse.lua @@ -111,6 +111,8 @@ local function AuctionStyle() ExactMatchCheckButton:RemoveTextures() ExactMatchCheckButton:SetStyle("CheckButton") + ExactMatchCheckButtonText:ClearAllPoints() + ExactMatchCheckButtonText:SetPoint("LEFT", ExactMatchCheckButton, "RIGHT", 6, 0) --SideDressUpFrame:SetPoint("LEFT", AuctionFrame, "RIGHT", 16, 0) AuctionProgressFrame:RemoveTextures() @@ -201,10 +203,22 @@ local function AuctionStyle() _G[field]:SetTextInsets(-1, -1, -2, -2) end + BrowseNameText:ClearAllPoints() + BrowseNameText:SetPoint("BOTTOMLEFT", AuctionFrame, "TOPLEFT", 30, -47) + BrowseLevelText:ClearAllPoints() + BrowseLevelText:SetPoint("BOTTOMLEFT", AuctionFrame, "TOPLEFT", 190, -47) + BrowseNameSearchIcon:ClearAllPoints() + BrowseNameSearchIcon:SetPoint("RIGHT", BrowseName, "LEFT", -2, -2) BrowseMinLevel:ClearAllPoints() - BrowseMinLevel:SetPoint("LEFT", BrowseName, "RIGHT", 8, 0) + BrowseMinLevel:SetPoint("LEFT", BrowseName, "RIGHT", 18, 0) + BrowseLevelHyphen:ClearAllPoints() + BrowseLevelHyphen:SetPoint("LEFT", BrowseMinLevel, "RIGHT", 5, 0) BrowseMaxLevel:ClearAllPoints() - BrowseMaxLevel:SetPoint("LEFT", BrowseMinLevel, "RIGHT", 8, 0) + BrowseMaxLevel:SetPoint("LEFT", BrowseMinLevel, "RIGHT", 16, 0) + BrowseDropDownName:ClearAllPoints() + BrowseDropDownName:SetPoint("BOTTOMLEFT", BrowseLevelText, "BOTTOMRIGHT", 18, 0) + BrowseDropDown:ClearAllPoints() + BrowseDropDown:SetPoint("TOPLEFT", BrowseLevelText, "BOTTOMRIGHT", -2, 0) AuctionsStackSizeEntry.Panel:SetAllPoints() AuctionsNumStacksEntry.Panel:SetAllPoints() diff --git a/SVUI_Tooltip/SVUI_Tooltip.toc b/SVUI_Tooltip/SVUI_Tooltip.toc index 5c37364..b45608d 100644 --- a/SVUI_Tooltip/SVUI_Tooltip.toc +++ b/SVUI_Tooltip/SVUI_Tooltip.toc @@ -1,6 +1,6 @@ ## Interface: 60200 ## Author: Munglunch -## Version: 1.2.5 +## Version: 1.2.6 ## Title: |cffFF9900SuperVillain UI: |r|cffFFEF00Tooltip|r ## Notes: Tooltip Plugin for [|cff9911FFSVUI|r]. ## OptionalDeps: LibSharedMedia-3.0 diff --git a/SVUI_UnitFrames/Loader.lua b/SVUI_UnitFrames/Loader.lua index c69b9b9..37daaed 100644 --- a/SVUI_UnitFrames/Loader.lua +++ b/SVUI_UnitFrames/Loader.lua @@ -291,12 +291,19 @@ SV.defaults[Schema] = { ["xOffset"] = 0, ["yOffset"] = 0, }, + ["aggroIcon"] = { + ["enable"] = true, + ["size"] = 50, + ["attachTo"] = "TOPRIGHT", + ["xOffset"] = 45, + ["yOffset"] = -10, + }, ["combatIcon"] = { ["enable"] = true, ["size"] = 26, ["attachTo"] = "TOPRIGHT", - ["xOffset"] = 28, - ["yOffset"] = 2, + ["xOffset"] = 22, + ["yOffset"] = -5, }, ["restIcon"] = { ["enable"] = true, diff --git a/SVUI_UnitFrames/SVUI_UnitFrames.toc b/SVUI_UnitFrames/SVUI_UnitFrames.toc index 00902b8..157ee00 100644 --- a/SVUI_UnitFrames/SVUI_UnitFrames.toc +++ b/SVUI_UnitFrames/SVUI_UnitFrames.toc @@ -1,6 +1,6 @@ ## Interface: 60200 ## Author: Munglunch -## Version: 1.2.5 +## Version: 1.2.6 ## Title: |cffFF9900SuperVillain UI: |r|cffFFEF00UnitFrames|r ## Notes: UnitFrames Plugin for [|cff9911FFSVUI|r]. ## OptionalDeps: LibSharedMedia-3.0 diff --git a/SVUI_UnitFrames/elements/essentials.lua b/SVUI_UnitFrames/elements/essentials.lua index 2697a66..b883c2f 100644 --- a/SVUI_UnitFrames/elements/essentials.lua +++ b/SVUI_UnitFrames/elements/essentials.lua @@ -143,21 +143,22 @@ end local UpdatePlayerThreat = function(self, event, unit) if(unit ~= "player" or not IsLoggedIn()) then return end - local threat = self.Threat - local aggro = self.Aggro + local threat = self.Threat; + local aggro = self.Aggro; + local useAggro = aggro.isEnabled; local status = UnitThreatSituation(unit) local r, g, b if(status and status > 0) then r, g, b = GetThreatStatusColor(status) threat:SetBackdropBorderColor(r, g, b) - if(status > 1 and (not aggro:IsShown())) then + if(useAggro and (status > 1) and (not aggro:IsShown())) then self.Combat:Hide() aggro:Show() end threat:Show() else threat:SetBackdropBorderColor(0, 0, 0, 0.5) - if(aggro:IsShown()) then + if(useAggro and aggro:IsShown()) then aggro:Hide() if(UnitAffectingCombat('player')) then self.Combat:Show() @@ -199,6 +200,7 @@ local function CreateThreat(frame, unit) this.anim:Play() end); aggro:Hide(); + aggro.isEnabled = true; frame.Aggro = aggro threat.Override = UpdatePlayerThreat diff --git a/SVUI_UnitFrames/frames.lua b/SVUI_UnitFrames/frames.lua index fba5d96..128ed2c 100644 --- a/SVUI_UnitFrames/frames.lua +++ b/SVUI_UnitFrames/frames.lua @@ -229,6 +229,20 @@ local UpdatePlayerFrame = function(self) end end end + do + local aggro = self.Aggro; + if aggro then + if iconDB and iconDB.aggroIcon then + aggro.isEnabled = iconDB.aggroIcon.enable; + if(iconDB.aggroIcon.enable) then + local size = iconDB.aggroIcon.size; + aggro:ClearAllPoints() + aggro:SetSize(size, size) + SV:SetReversePoint(aggro, iconDB.aggroIcon.attachTo, self, iconDB.aggroIcon.xOffset, iconDB.aggroIcon.yOffset) + end + end + end + end do local pvp = self.PvPText; local point = db.pvp.position;