diff --git a/Interface/AddOns/SVUI/assets/fonts/Pixel.ttf b/Interface/AddOns/SVUI/assets/fonts/Pixel.ttf index a19139b..cdb4c21 100644 Binary files a/Interface/AddOns/SVUI/assets/fonts/Pixel.ttf and b/Interface/AddOns/SVUI/assets/fonts/Pixel.ttf differ diff --git a/Interface/AddOns/SVUI/libs/oUF/elements/health.lua b/Interface/AddOns/SVUI/libs/oUF/elements/health.lua index ecec3b5..d2863b4 100644 --- a/Interface/AddOns/SVUI/libs/oUF/elements/health.lua +++ b/Interface/AddOns/SVUI/libs/oUF/elements/health.lua @@ -94,7 +94,7 @@ local Update = function(self, event, unit) min = random(1,max) health:SetValue(min) end - if(db and db.gridMode) then + if(health.gridMode) then health:SetOrientation("VERTICAL") end diff --git a/Interface/AddOns/SVUI/packages/unit/SVUnit.lua b/Interface/AddOns/SVUI/packages/unit/SVUnit.lua index 28d7df3..626e670 100644 --- a/Interface/AddOns/SVUI/packages/unit/SVUnit.lua +++ b/Interface/AddOns/SVUI/packages/unit/SVUnit.lua @@ -325,7 +325,6 @@ function MOD:RefreshUnitColors() oUF_SuperVillain.SVConfigs.classbackdrop = SuperVillain.db.SVUnit.classbackdrop oUF_SuperVillain.SVConfigs.healthclass = SuperVillain.db.SVUnit.healthclass oUF_SuperVillain.SVConfigs.colorhealthbyvalue = SuperVillain.db.SVUnit.colorhealthbyvalue - oUF_SuperVillain.SVConfigs.gridMode = SuperVillain.db.SVUnit.grid.enable end function MOD:RefreshAllUnitMedia() @@ -393,7 +392,7 @@ function MOD:RefreshUnitMedia(unitName) if(panel) then if(panel.Name and unitDB.name) then if(db.grid.enable and unitDB.gridAllowed) then - panel.Name:SetFont([[Interface\AddOns\SVUI\assets\fonts\Roboto.ttf]], unitDB.name.fontSize, unitDB.name.fontOutline) + panel.Name:SetFont(SuperVillain.Media.font.pixel, 8, "MONOCHROMEOUTLINE") panel.Name:SetShadowOffset(1, -1) panel.Name:SetShadowColor(0, 0, 0, 0.75) else @@ -483,6 +482,7 @@ function MOD:RefreshUnitLayout(frame, template) local POWER_HEIGHT = (db.power and db.power.enable) and (db.power.height - 1) or 1; local PORTRAIT_WIDTH = (1 * TOP_MODIFIER) local GRID_MODE = (self.db.grid.enable and db.gridAllowed) or false + local MINI_GRID = (GRID_MODE and self.db.grid.size < 26) or false local healthPanel = frame.HealthPanel local infoPanel = frame.InfoPanel @@ -553,12 +553,22 @@ function MOD:RefreshUnitLayout(frame, template) if(infoPanel.Name and db.name) then local nametext = infoPanel.Name - point = db.name.position - cX = db.name.xOffset - cY = db.name.yOffset - nametext:ClearAllPoints() - SuperVillain:ReversePoint(nametext, point, infoPanel, cX, cY) - frame:Tag(nametext, db.name.tags) + if(GRID_MODE) then + if(self.db.grid.shownames and self.db.grid.size >= 30) then + if(not nametext:IsShown()) then nametext:Show() end + nametext:Point("CENTER", frame, "CENTER", 1, 0) + frame:Tag(nametext, "[name:grid]") + else + nametext:Hide() + end + else + point = db.name.position + cX = db.name.xOffset + cY = db.name.yOffset + nametext:ClearAllPoints() + SuperVillain:ReversePoint(nametext, point, infoPanel, cX, cY) + frame:Tag(nametext, db.name.tags) + end end if(frame.Health and infoPanel.Health and db.health) then @@ -618,22 +628,20 @@ function MOD:RefreshUnitLayout(frame, template) end health.Smooth = self.db.smoothbars; - health.colorSmooth = nil; health.colorHealth = nil; health.colorClass = nil; health.colorReaction = nil; health.colorOverlay = nil; health.overlayAnimation = overlayAnimation - if(db.health and (db.health.frequentUpdates ~= nil)) then - end - if(frame.HealPrediction) then + + if(not GRID_MODE and frame.HealPrediction) then frame.HealPrediction["frequentUpdates"] = health.frequentUpdates end - if(portraitOverlay and self.db.forceHealthColor) then + if(not GRID_MODE and portraitOverlay and self.db.forceHealthColor) then health.colorOverlay = true; else - if(db.colorOverride and db.colorOverride == "FORCE_ON") then + if(GRID_MODE or (db.colorOverride and db.colorOverride == "FORCE_ON")) then health.colorClass = true; health.colorReaction = true elseif(db.colorOverride and db.colorOverride == "FORCE_OFF") then @@ -657,8 +665,11 @@ function MOD:RefreshUnitLayout(frame, template) end health:ClearAllPoints() health:SetAllPoints(healthPanel) - if db.health and db.health.orientation then - health:SetOrientation(db.health.orientation) + + health.gridMode = GRID_MODE; + + if(db.health and db.health.orientation) then + health:SetOrientation(GRID_MODE and "VERTICAL" or db.health.orientation) end self:RefreshHealthBar(frame, portraitOverlay) @@ -735,9 +746,9 @@ function MOD:RefreshUnitLayout(frame, template) if db.portrait and frame.Portrait then local portrait = frame.Portrait; - portrait:Show() + if(not GRID_MODE and db.portrait.enable) then + portrait:Show() - if db.portrait.enable then if not frame:IsElementEnabled('Portrait')then frame:EnableElement('Portrait') end @@ -774,10 +785,11 @@ function MOD:RefreshUnitLayout(frame, template) end end else - if frame:IsElementEnabled('Portrait')then + portrait:Hide() + portrait.Panel:Hide() + + if frame:IsElementEnabled('Portrait') then frame:DisableElement('Portrait') - portrait:Hide() - portrait.Panel:Hide() end end end @@ -885,7 +897,7 @@ function MOD:RefreshUnitLayout(frame, template) local buffCount = perRow * numRows; buffs.forceShow = frame.forceShowAuras; - buffs.num = buffCount; + buffs.num = GRID_MODE and 0 or buffCount; local tempSize = (((UNIT_WIDTH + 2) - (buffs.spacing * (perRow - 1))) / perRow); local auraSize = min(BEST_SIZE, tempSize) @@ -917,7 +929,7 @@ function MOD:RefreshUnitLayout(frame, template) local debuffCount = perRow * numRows; debuffs.forceShow = frame.forceShowAuras; - debuffs.num = debuffCount; + debuffs.num = GRID_MODE and 0 or debuffCount; local tempSize = (((UNIT_WIDTH + 2) - (debuffs.spacing * (perRow - 1))) / perRow); local auraSize = min(BEST_SIZE,tempSize) @@ -1010,8 +1022,16 @@ function MOD:RefreshUnitLayout(frame, template) frame:EnableElement('RaidIcon') local size = ico.raidicon.size; raidIcon:ClearAllPoints() - raidIcon:Size(size) - SuperVillain:ReversePoint(raidIcon, ico.raidicon.attachTo, healthPanel, ico.raidicon.xOffset, ico.raidicon.yOffset) + + if(GRID_MODE) then + raidIcon:SetAlpha(0.7) + raidIcon:Size(10) + raidIcon:Point("TOP", healthPanel, "TOP", 0, 0) + else + raidIcon:SetAlpha(1) + raidIcon:Size(size) + SuperVillain:ReversePoint(raidIcon, ico.raidicon.attachTo, healthPanel, ico.raidicon.xOffset, ico.raidicon.yOffset) + end else frame:DisableElement('RaidIcon') raidIcon:Hide() @@ -1022,13 +1042,21 @@ function MOD:RefreshUnitLayout(frame, template) if(ico.roleIcon and frame.LFDRole) then local lfd = frame.LFDRole; - if ico.roleIcon.enable then + if(not MINI_GRID and ico.roleIcon.enable) then lfd:Show() frame:EnableElement('LFDRole') local size = ico.roleIcon.size; lfd:ClearAllPoints() - lfd:Size(size) - SuperVillain:ReversePoint(lfd, ico.roleIcon.attachTo, healthPanel, ico.roleIcon.xOffset, ico.roleIcon.yOffset) + + if(GRID_MODE) then + lfd:SetAlpha(0.7) + lfd:Size(10) + lfd:Point("BOTTOM", healthPanel, "BOTTOM", 0, 0) + else + lfd:SetAlpha(1) + lfd:Size(size) + SuperVillain:ReversePoint(lfd, ico.roleIcon.attachTo, healthPanel, ico.roleIcon.xOffset, ico.roleIcon.yOffset) + end else frame:DisableElement('LFDRole') lfd:Hide() @@ -1039,14 +1067,22 @@ function MOD:RefreshUnitLayout(frame, template) if(ico.raidRoleIcons and frame.RaidRoleFramesAnchor) then local roles = frame.RaidRoleFramesAnchor; - if ico.raidRoleIcons.enable then + if(not MINI_GRID and ico.raidRoleIcons.enable) then roles:Show() frame:EnableElement('Leader') frame:EnableElement('MasterLooter') local size = ico.raidRoleIcons.size; roles:ClearAllPoints() - roles:Size(size) - SuperVillain:ReversePoint(roles, ico.raidRoleIcons.attachTo, healthPanel, ico.raidRoleIcons.xOffset, ico.raidRoleIcons.yOffset) + + if(GRID_MODE) then + roles:SetAlpha(0.7) + roles:Size(10) + roles:Point("CENTER", healthPanel, "TOPLEFT", 0, 2) + else + roles:SetAlpha(1) + roles:Size(size) + SuperVillain:ReversePoint(roles, ico.raidRoleIcons.attachTo, healthPanel, ico.raidRoleIcons.xOffset, ico.raidRoleIcons.yOffset) + end else roles:Hide() frame:DisableElement('Leader') @@ -1171,6 +1207,7 @@ local function SetProxyEnv() for i=1, 30 do tags['name:'..i] = oUF_SuperVillain.Tags.Methods['name:'..i] end + tags['name:grid'] = oUF_SuperVillain.Tags.Methods['name:grid'] tags['health:color'] = oUF_SuperVillain.Tags.Methods['health:color'] tags['health:current'] = oUF_SuperVillain.Tags.Methods['health:current'] tags['health:deficit'] = oUF_SuperVillain.Tags.Methods['health:deficit'] diff --git a/Interface/AddOns/SVUI/packages/unit/config.lua b/Interface/AddOns/SVUI/packages/unit/config.lua index 81e4119..897661f 100644 --- a/Interface/AddOns/SVUI/packages/unit/config.lua +++ b/Interface/AddOns/SVUI/packages/unit/config.lua @@ -72,7 +72,10 @@ CONFIGS["SVUnit"] = { ["gpsLowHealth"] = false, ["grid"] = { ["enable"] = false, - ["size"] = 28, + ["size"] = 28, + ["shownames"] = false, + ["font"] = "Roboto", + ["fontsize"] = 16, }, ["player"] = { ["enable"] = true, @@ -240,8 +243,8 @@ CONFIGS["SVUnit"] = { ["raidicon"] = { ["enable"] = true, - ["size"] = 30, - ["attachTo"] = "INNERRIGHT", + ["size"] = 25, + ["attachTo"] = "INNERBOTTOMRIGHT", ["xOffset"] = 0, ["yOffset"] = 0, }, @@ -254,7 +257,7 @@ CONFIGS["SVUnit"] = { }, ["restIcon"] = { ["enable"] = true, - ["size"] = 26, + ["size"] = 25, ["attachTo"] = "INNERTOPRIGHT", ["xOffset"] = 0, ["yOffset"] = 0, @@ -1650,7 +1653,7 @@ CONFIGS["SVUnit"] = { { ["enable"] = false, ["perrow"] = 2, - ["numrows"] = 2, + ["numrows"] = 1, ["attachTo"] = "FRAME", ["anchorPoint"] = "RIGHTTOP", ["verticalGrowth"] = "DOWN", @@ -1670,7 +1673,7 @@ CONFIGS["SVUnit"] = { { ["enable"] = true, ["perrow"] = 2, - ["numrows"] = 2, + ["numrows"] = 1, ["attachTo"] = "FRAME", ["anchorPoint"] = "RIGHTTOP", ["verticalGrowth"] = "DOWN", diff --git a/Interface/AddOns/SVUI/packages/unit/elements/essentials.lua b/Interface/AddOns/SVUI/packages/unit/elements/essentials.lua index ec0923d..426dbbc 100644 --- a/Interface/AddOns/SVUI/packages/unit/elements/essentials.lua +++ b/Interface/AddOns/SVUI/packages/unit/elements/essentials.lua @@ -496,6 +496,7 @@ function MOD:CreateHealthBar(frame, hasbg, reverse) healthBar.animation = flasher healthBar.noupdate = false; healthBar.fillInverted = reverse; + healthBar.gridMode = false; healthBar.colorTapping = true; healthBar.colorDisconnected = true; healthBar.Override = false; diff --git a/Interface/AddOns/SVUI/packages/unit/elements/tags.lua b/Interface/AddOns/SVUI/packages/unit/elements/tags.lua index af59fa3..c957aad 100644 --- a/Interface/AddOns/SVUI/packages/unit/elements/tags.lua +++ b/Interface/AddOns/SVUI/packages/unit/elements/tags.lua @@ -21,7 +21,7 @@ local pairs = _G.pairs; local table = _G.table; local string = _G.string; --[[ STRING METHODS ]]-- -local find, format, byte = string.find, string.format, string.byte; +local find, format, byte, upper = string.find, string.format, string.byte, string.upper; local sub, gsub, len = string.sub, string.gsub, string.len; --[[ TABLE METHODS ]]-- local twipe = table.wipe; @@ -55,6 +55,13 @@ local SKULL_ICON = "|TInterface\\TARGETINGFRAME\\UI-TargetingFrame-Skull.blp:16: LOCAL FUNCTIONS ########################################################## ]]-- +local function Hex(r, g, b) + if type(r) == "table" then + if r.r then r, g, b = r.r, r.g, r.b else r, g, b = unpack(r) end + end + return format("|cff%02x%02x%02x", r*255, g*255, b*255) +end + local function TruncateString(value) if value >= 1e9 then return ("%.1fb"):format(value / 1e9):gsub("%.?0 + ([kmb])$", "%1") @@ -201,6 +208,7 @@ for i = 1, 30 do oUF_SuperVillain.Tags.Events["name:"..i] = "UNIT_NAME_UPDATE"; end oUF_SuperVillain.Tags.Events["name:level"] = "UNIT_LEVEL PLAYER_LEVEL_UP PLAYER_FLAGS_CHANGED"; +oUF_SuperVillain.Tags.Events["name:grid"] = "UNIT_NAME_UPDATE"; oUF_SuperVillain.Tags.Events["health:color"] = "UNIT_HEALTH_FREQUENT UNIT_MAXHEALTH UNIT_CONNECTION PLAYER_FLAGS_CHANGED"; oUF_SuperVillain.Tags.Events["health:deficit"] = "UNIT_HEALTH_FREQUENT UNIT_MAXHEALTH UNIT_CONNECTION PLAYER_FLAGS_CHANGED"; @@ -286,6 +294,27 @@ oUF_SuperVillain.Tags.Methods["name:level"] = function(unit) hexString = Hex(r, g, b) return ("%s%s|r"):format(hexString, levelString) end + +oUF_SuperVillain.Tags.Methods["name:grid"] = function(unit) + local name = UnitName(unit) + if not name then return "" end + local unitReaction = UnitReaction(unit, "player") + local _, classToken = UnitClass(unit) + local result = "|cffC2C2C2" + if UnitIsPlayer(unit) then + local class = RAID_CLASS_COLORS[classToken] + if class then + result = Hex(class.r, class.g, class.b) + end + elseif unitReaction then + local reaction = oUF_SuperVillain["colors"].reaction[unitReaction] + result = Hex(reaction[1], reaction[2], reaction[3]) + end + name = TrimTagText(name, 4) + name = upper(name) + result = ("%s%s|r"):format(result, name) + return result +end --[[ ########################################################## HEALTH TAG METHODS diff --git a/Interface/AddOns/SVUI/system/database.lua b/Interface/AddOns/SVUI/system/database.lua index a5c802a..6fc573e 100644 --- a/Interface/AddOns/SVUI/system/database.lua +++ b/Interface/AddOns/SVUI/system/database.lua @@ -84,6 +84,7 @@ SuperVillain.Shared:Register("font","SVUI Combat Font",[[Interface\AddOns\SVUI\a 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","SVUI Pixel Font",[[Interface\AddOns\SVUI\assets\fonts\Pixel.ttf]],SuperVillain.Shared.LOCALE_BIT_ruRU+SuperVillain.Shared.LOCALE_BIT_western) SuperVillain.Shared:Register("font","Roboto",[[Interface\AddOns\SVUI\assets\fonts\Roboto.ttf]],SuperVillain.Shared.LOCALE_BIT_ruRU+SuperVillain.Shared.LOCALE_BIT_western) --[[ ########################################################## @@ -125,6 +126,7 @@ do ["names"] = Shared:Fetch("font", "SVUI Name Font"), ["alert"] = Shared:Fetch("font", "SVUI Alert Font"), ["numbers"] = Shared:Fetch("font", "SVUI Number Font"), + ["pixel"] = Shared:Fetch("font", "SVUI Pixel Font"), ["roboto"] = Shared:Fetch("font", "Roboto") } diff --git a/Interface/AddOns/SVUI/system/installer.lua b/Interface/AddOns/SVUI/system/installer.lua index 772dceb..05144ce 100644 --- a/Interface/AddOns/SVUI/system/installer.lua +++ b/Interface/AddOns/SVUI/system/installer.lua @@ -748,6 +748,7 @@ local function SetPage(newPage) setupFrame.Desc1:SetText(L["You can now choose what group layout you prefer."]) setupFrame.Desc2:SetText(L["This will adjust various settings on group units, attempting to make certain roles more usable"]) setupFrame.Desc3:SetText(L["CHOOSE_OR_DIE"]) + SVUI_InstallOption1Button:Show() SVUI_InstallOption1Button:SetScript("OnClick", function() SuperVillain.db.LAYOUT.groupstyle = "default"; @@ -757,6 +758,7 @@ local function SetPage(newPage) SVUI_SetupHolder.Desc3:SetText(CONTINUED..L["frames schmames, lets kill some stuff!"]) end) SVUI_InstallOption1Button:SetText(L["Standard"]) + SVUI_InstallOption2Button:Show() SVUI_InstallOption2Button:SetScript("OnClick", function() SuperVillain.db.LAYOUT.groupstyle = nil; @@ -766,6 +768,7 @@ local function SetPage(newPage) SVUI_SetupHolder.Desc3:SetText(CONTINUED..L["Hey, even a super villain gets his ass kicked once in awhile. We need the likes of you!"]) end) SVUI_InstallOption2Button:SetText(L["Healer"]) + SVUI_InstallOption3Button:Show() SVUI_InstallOption3Button:SetScript("OnClick", function() SuperVillain.db.LAYOUT.groupstyle = nil; @@ -775,6 +778,16 @@ local function SetPage(newPage) SVUI_SetupHolder.Desc3:SetText(CONTINUED..L["I will move and squeeze group frames out of your way so you have more room for BOOM!"]) end) SVUI_InstallOption3Button:SetText(L["DPS"]) + + SVUI_InstallOption4Button:Show() + SVUI_InstallOption4Button:SetScript("OnClick", function() + SuperVillain.db.LAYOUT.groupstyle = nil; + SuperVillain:SetGroupframeLayout("grid") + SVUI_SetupHolder.Desc1:SetText(L["|cff00FFFFCubed|r"]) + SVUI_SetupHolder.Desc2:SetText(L["You are cold and calculated, your frames should reflect as much."]..CONTINUED) + SVUI_SetupHolder.Desc3:SetText(CONTINUED..L["I'm gonna make these frames so precise that you can cut your finger on them!"]) + end) + SVUI_InstallOption4Button:SetText(L["Grid"]) elseif newPage == 7 then setupFrame.SubTitle:SetText(ACTIONBAR_LABEL.." "..SETTINGS) diff --git a/Interface/AddOns/SVUI/system/presets.lua b/Interface/AddOns/SVUI/system/presets.lua index 2640ac3..99ed974 100644 --- a/Interface/AddOns/SVUI/system/presets.lua +++ b/Interface/AddOns/SVUI/system/presets.lua @@ -776,6 +776,9 @@ local presets = { ["layouts"] = { ["link"] = "SVUnit", ["default"] = { + ["grid"] = { + ["enable"] = false, + }, ["party"] = { width = 75, height = 60, @@ -875,6 +878,9 @@ local presets = { }, }, ["healer"] = { + ["grid"] = { + ["enable"] = false, + }, ["party"] = { width = 75, height = 60, @@ -974,6 +980,9 @@ local presets = { }, }, ["dps"] = { + ["grid"] = { + ["enable"] = false, + }, ["party"] = { width = 115, height = 25, @@ -1076,6 +1085,39 @@ local presets = { ["height"] = 20, }, }, + ["grid"] = { + ["grid"] = { + ["enable"] = true, + ["size"] = 34, + ["shownames"] = true, + }, + ["party"] = { + ["gridAllowed"] = true, + ["wrapXOffset"] = 1, + ["wrapYOffset"] = 1, + }, + ["raid10"] = { + ["gridAllowed"] = true, + ["wrapXOffset"] = 1, + ["wrapYOffset"] = 1, + ["gRowCol"] = 1, + ["showBy"] = "RIGHT_DOWN", + }, + ["raid25"] = { + ["gridAllowed"] = true, + ["wrapXOffset"] = 1, + ["wrapYOffset"] = 1, + ["gRowCol"] = 1, + ["showBy"] = "RIGHT_DOWN", + }, + ["raid40"] = { + ["gridAllowed"] = true, + ["wrapXOffset"] = 1, + ["wrapYOffset"] = 1, + ["gRowCol"] = 1, + ["showBy"] = "RIGHT_DOWN", + }, + }, } }; diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/core.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/core.lua index d4268f8..008d80d 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/core.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/core.lua @@ -1563,9 +1563,23 @@ SuperVillain.Options.args.SVUnit = { MOD:ChangeDBVar(value, "enable", "grid"); MOD:RefreshUnitFrames(); end - }, - size = { + }, + shownames = { order = 2, + name = L["Show Grid Names"], + desc = L["Grid frames will show name texts."], + type = "toggle", + get = function(key) + return SuperVillain.db.SVUnit.grid.shownames + end, + set = function(key, value) + if(SuperVillain.db.SVUnit.grid.size < 30) then MOD:ChangeDBVar(30, "size", "grid"); end + MOD:ChangeDBVar(value, "shownames", "grid"); + MOD:RefreshUnitFrames(); + end + }, + size = { + order = 3, name = L["Grid Size"], desc = L["The universal size of grid squares."], type = "range", @@ -1573,6 +1587,9 @@ SuperVillain.Options.args.SVUnit = { max = 70, step = 1, width = "full", + get = function(key) + return SuperVillain.db.SVUnit.grid.size + end, set = function(key, value) MOD:ChangeDBVar(value, "size", "grid"); MOD:RefreshUnitFrames(); diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/party.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/party.lua index f5725b6..d57be1e 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/party.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/party.lua @@ -73,6 +73,14 @@ SuperVillain.Options.args.SVUnit.args.party = { type = 'group', name = L['General'], args = { + gridAllowed = { + type = 'toggle', + order = 1, + name = L['Grid Mode Allowed'], + desc = L['If grid-mode is enabled, these units will be changed.'], + get = function(l)return SuperVillain.db.SVUnit['party'].gridAllowed end, + set = function(l, m) SuperVillain.db.SVUnit['party'].gridAllowed = m; MOD:SetGroupFrame('party') end, + }, hideonnpc = { type = 'toggle', order = 2, @@ -348,8 +356,16 @@ SuperVillain.Options.args.SVUnit.args.party = { name = L['Enable'], order = 1, }, - width = { + gridAllowed = { + type = 'toggle', order = 2, + name = L['Grid Mode Allowed'], + desc = L['If grid-mode is enabled, these units will be changed.'], + get = function(l)return SuperVillain.db.SVUnit['party']['petsGroup'].gridAllowed end, + set = function(l, m) SuperVillain.db.SVUnit['party']['petsGroup'].gridAllowed = m; MOD:SetGroupFrame('party') end, + }, + width = { + order = 3, name = L['Width'], type = 'range', min = 10, @@ -357,7 +373,7 @@ SuperVillain.Options.args.SVUnit.args.party = { step = 1, }, height = { - order = 3, + order = 4, name = L['Height'], type = 'range', min = 10, @@ -419,8 +435,16 @@ SuperVillain.Options.args.SVUnit.args.party = { name = L['Enable'], order = 1, }, - width = { + gridAllowed = { + type = 'toggle', order = 2, + name = L['Grid Mode Allowed'], + desc = L['If grid-mode is enabled, these units will be changed.'], + get = function(l)return SuperVillain.db.SVUnit['party']['targetsGroup'].gridAllowed end, + set = function(l, m) SuperVillain.db.SVUnit['party']['targetsGroup'].gridAllowed = m; MOD:SetGroupFrame('party') end, + }, + width = { + order = 3, name = L['Width'], type = 'range', min = 10, @@ -428,7 +452,7 @@ SuperVillain.Options.args.SVUnit.args.party = { step = 1, }, height = { - order = 3, + order = 4, name = L['Height'], type = 'range', min = 10, diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/raid.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/raid.lua index 97aa496..0909417 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/raid.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/raid.lua @@ -74,6 +74,14 @@ for w=10,40,15 do type = "group", name = L["General Settings"], args = { + gridAllowed = { + type = 'toggle', + order = 1, + name = L['Grid Mode Allowed'], + desc = L['If grid-mode is enabled, these units will be changed.'], + get = function(l)return SuperVillain.db.SVUnit["raid" .. w].gridAllowed end, + set = function(l, m) SuperVillain.db.SVUnit["raid" .. w].gridAllowed = m; MOD:SetGroupFrame("raid" .. w) end, + }, hideonnpc = { type = "toggle", @@ -459,6 +467,14 @@ SuperVillain.Options.args.SVUnit.args.raidpet ={ type='group', name=L['General Settings'], args={ + gridAllowed = { + type = 'toggle', + order = 1, + name = L['Grid Mode Allowed'], + desc = L['If grid-mode is enabled, these units will be changed.'], + get = function(l)return SuperVillain.db.SVUnit["raidpet"].gridAllowed end, + set = function(l, m) SuperVillain.db.SVUnit["raidpet"].gridAllowed = m; MOD:SetGroupFrame("raidpet") end, + }, rangeCheck ={ order = 3, name = L["Range Check"],