formatOptions = { { text = "CurrentHp(+predictedHp) / MaxHp" }, { text = "+predicted -MissingHp" }, { text = "-MissingHp(+predicted) / MaxHp" } , { text = "+predicted CurrentHp" } , { text = "+predicted% Current%" } , { text = "No Text" } , }; local sortedGroups = { "RaidFrames:set_tanks","RaidFrames:set_healers","RaidFrames:set_ranged","RaidFrames:set_melee" }; local function fnFormatOptions() return formatOptions; end BarColors = { { text = "Green -> Red" }, { text = "Static Green" }, { text = "Class Color" } , { text = "User Defined" }, }; druidHots = { { text = "Rejuvenation" }, { text = "Regrowth" }, { text = "Lifebloom" }, }; priestTack = { { text = "HOTs" }, { text = "Grace" }, }; local function fnPriestTrack() return priestTack; end local function fnDruidHots() return druidHots; end local function fnBarColors() return BarColors; end local function setRange(path) local fs, handle = {}, RDXDB.AccessPath(RDXDB.ParsePath(path)); VFL.print(path); for o,x in pairs(handle.data) do if (x.feature and type(x.feature)) then if(x.name and (x.name=="inRange" or x.name=="InRange" or x.name=="wwizaset")) then BRF.print("Fixing Range Check on frame " .. path); x.set.file="Builtin:range_0_40"; end end end end function fixRangeCheck() setRange("RaidFrames:unitFrame_mana_DGT_Ph_border"); setRange("RaidFrames:unitFrame_mana_Ph_border"); setRange("RaidFrames:unitFrame_hpCurMax_DGT_Ph_border"); setRange("RaidFrames:unitFrame_hpCurMax_Ph_border"); setRange("RaidFrames:unitFrame_mana_DGT_Ph"); setRange("RaidFrames:unitFrame_mana_DGT"); setRange("RaidFrames:unitFrame_mana_Ph"); setRange("RaidFrames:unitFrame_mana"); setRange("RaidFrames:unitFrame_hpCurMax_DGT_Ph"); setRange("RaidFrames:unitFrame_hpCurMax_DGT"); setRange("RaidFrames:unitFrame_hpCurMax_Ph"); setRange("RaidFrames:unitFrame_hpCurMax"); setRange("RaidFrames:unitFrame_sRaidFrames"); setRange("RaidFrames:unitFrame_sRaidFramesMana"); setRange("RaidFrames:unitFrame_sRaidFramesManaPh"); setRange("RaidFrames:unitFrame_sRaidFramesPh"); setRange("RaidFrames:unitFrame_perfectRaid"); setRange("RaidFrames:unitFrame_perfectRaidMana"); setRange("RaidFrames:unitFrame_perfectRaidManaPh"); setRange("RaidFrames:unitFrame_perfectRaidPh"); setRange("RaidFrames:unitFrame_gridManaPh"); setRange("RaidFrames:unitFrame_gridPh"); setRange("RaidFrames:unitFrame_grid"); setRange("RaidFrames:unitFrame_gridMana"); setRange("RaidFrames:unitFrame_gridWideMana"); setRange("RaidFrames:unitFrame_gridWide"); end local function setDefDesktop(desktop) if(desktop=="none") then RDX.OOBESetDefaultUserDesktop("default:desktop"); BRF.print("default:desktop has been copyed as the default desktop"); else RDX.OOBESetDefaultUserDesktop("RFDesktops:" .. desktop); BRF.print("RFDesktops:" .. desktop .. " has been copyed as the default desktop"); end end function getSpec() local t = {}; local tabPSTmp = 0; local tabIndex = 0; local tabNameTmp = ""; for i=1,GetNumTalentTabs() do local tabName, _, tabPS = GetTalentTabInfo(i); if tabPS > tabPSTmp then tabPSTmp = tabPS; tabIndex = i; tabNameTmp = tabName; end end if tabIndex==0 then tabIndex=1; end return tabIndex; end function removeQuickDesktops() --if RDXDB.GetPackage("RFDesktops") then for path,dir in pairs(RDXDB.GetPackage("desktops")) do if (RDXDK.IsQuickDesktop("desktops:" .. path)) then RDXDK.RemoveQuickDesktop("desktops:" .. path); end end --end end function removeOldQuickDesktops() if RDXDB.GetPackage("RFDesktops") then for path,dir in pairs(RDXDB.GetPackage("RFDesktops")) do if (RDXDK.IsQuickDesktop("RFDesktops:" .. path)) then RDXDK.RemoveQuickDesktop("RFDesktops:" .. path); end end end end local function closeAll() local windows = { "RaidFrames:window_groups_1","RaidFrames:window_groups_2","RaidFrames:window_groups_3","RaidFrames:window_groups_4" ,"RaidFrames:window_groups_5","RaidFrames:window_groups_6","RaidFrames:window_groups_7","RaidFrames:window_groups_8" ,"RaidFrames:window_sorted_healer","RaidFrames:window_sorted_melee","RaidFrames:window_sorted_party","RaidFrames:window_sorted_partyPets" ,"RaidFrames:window_sorted_pets","RaidFrames:window_sorted_ranged","RaidFrames:window_sorted_tank","RaidFrames:window_oddEven_even" ,"RaidFrames:window_oddEven_odd","RaidFrames:window_grid","RaidFrames:window_classes","RaidFrames:window_10man" }; for i in pairs(windows) do RDXDB.OpenObject(windows[i], "Close"); end end local function switchTemplate(template) if InCombatLockdown()then BRF.print("You must be out of combat to perform this action!"); return; end; local desktop=string.lower("desktops:" .. UnitName("player") .. "_" .. string.gsub(GetRealmName(),"[ ]","_") .. "_raid"); local changeDesktop = false; if(RDXDK.GetCurrentDesktopPath()==RDXDB.ResolvePath(desktop) or RDXDK.GetCurrentDesktopPath()==desktop) then changeDesktop=true; end RDXDB.SetSymLinkTarget(desktop,desktop .. "_" .. template); if changeDesktop then RDXDK.SecuredChangeDesktop(desktop); end BRF.print("The raid template has been changed to the |cFF00FF00" .. template .. "|r template."); end function BRFswitchTemplate(template) if InCombatLockdown()then BRF.print("You must be out of combat to perform this action!"); return; end; local desktop=string.lower("desktops:" .. UnitName("player") .. "_" .. string.gsub(GetRealmName(),"[ ]","_") .. "_raid"); local changeDesktop = false; if(RDXDK.GetCurrentDesktopPath()==RDXDB.ResolvePath(desktop) or RDXDK.GetCurrentDesktopPath()==desktop) then changeDesktop=true; end RDXDB.SetSymLinkTarget(desktop,desktop .. "_" .. template); if changeDesktop then RDXDK.SecuredChangeDesktop(desktop); end end local function resetTemplate(template) if InCombatLockdown()then BRF.print("You must be out of combat to perform this action!"); return; end; local desktop=string.lower("desktops:" .. UnitName("player") .. "_" .. string.gsub(GetRealmName(),"[ ]","_") .. "_raid"); local changeDesktop = false; if(RDXDK.GetCurrentDesktopPath()==RDXDB.ResolvePath(desktop) or RDXDK.GetCurrentDesktopPath()==desktop) then changeDesktop=true; end RDXDB.Copy("RFDefaults:desktop_" .. template,desktop .. "_" .. template); if changeDesktop then RDXDK.SecuredChangeDesktop(desktop); end BRF.print("The raid template: |cFF00FF00".. template .. "|r, has been reset."); end local function resetTemplateAsk(template) VFLUI.MessageBox("Reset Template?", "Do you wish to reset the |cFF00FF00" .. template .."|r template? This process is irreversible.", nil, "No", nil, "Yes", function() resetTemplate(template); end); end local function checkDropShadow(frame, checked) local var; if frame==1 or frame==2 then var=RF_OPTIONS.DS; end if frame==3 then var=RF_OPTIONS.DS_SR; end if frame==4 then var=RF_OPTIONS.DS_PR; end if frame==5 then var=RF_OPTIONS.DS_GR; end if checked==nil then checked=false; end if var==checked then return false; end return true; end local function toggleDropShadowFont(curFont, turnOn) if turnOn then curFont.sx = 1; curFont.sy = -1; curFont.sr = 0; curFont.sg = 0; curFont.sb = 0; curFont.sa = 1; else curFont.sx = 0; curFont.sy = 0; curFont.sr = nil; curFont.sg = nil; curFont.sb = nil; curFont.sa = nil; end end local function toggleDropShadowUnitframe(path, turnOn) local fs, handle = {}, RDXDB.AccessPath(RDXDB.ParsePath(path)); for o,x in pairs(handle.data) do if (x.font and type(x.font) == "table") then toggleDropShadowFont(x.font, turnOn); end end end local function changeBarColor(path, color) local fs, handle = {}, RDXDB.AccessPath(RDXDB.ParsePath(path)); x=handle.data; if (x.colorVar and type(x.colorVar)) then x.colorVar=color; end end local function toggleAnimation(path, turnOn) local fs, handle = {}, RDXDB.AccessPath(RDXDB.ParsePath(path)); x=handle.data; if turnOn then x.interpolate=turnOn else x.interpolate=nil; end end local function checkAnimation(path) local fs, handle = {}, RDXDB.AccessPath(RDXDB.ParsePath(path)); x=handle.data; if (x.interpolate and type(x.interpolate)) then return x.interpolate; end return -1; end local function toggleAnimations(turnOn) local bars = { "RaidFrames:feature_texHpbar", "RaidFrames:feature_texPrehealth", "RaidFrames:feature_texHpbarDgt", "RaidFrames:feature_texPrehealthDgt" ,"RaidFrames:feature_texHpbarSF", "RaidFrames:feature_texHpbarSF", "RaidFrames:feature_texHpbarPR","RaidFrames:feature_texPrehealthPR" ,"RaidFrames:feature_texHpbarGR","RaidFrames:feature_texPrehealthGR","RaidFrames:feature_texHpbarGRmana","RaidFrames:feature_texPrehealthGRmana" ,"RaidFrames:feature_texHpbarGRW","RaidFrames:feature_texPrehealthGRW","RaidFrames:feature_texHpbarGRWmana","RaidFrames:feature_texPrehealthGRWmana" }; if (checkAnimation("RaidFrames:feature_texHpbarDgt") ~= turnOn) then for i in pairs(bars) do toggleAnimation(bars[i],turnOn); end end end local function toggleWindowFrame(path, turnOn) local fs, handle = {}, RDXDB.AccessPath(RDXDB.ParsePath(path)); for o,x in pairs(handle.data) do if (x.feature and type(x.feature)) then if(string.find(x.feature,"Frame")) then if turnOn then x.feature="Frame: Lightweight"; else x.feature="Frame: None"; end break; end end end end local function cleanDesktop(path) local fs, handle = {}, RDXDB.AccessPath(RDXDB.ParsePath(path)); local delCount=0; local kepCount=0; for o,x in pairs(handle.data) do if string.sub(o,1,1)~="_" and not RDXDB.GetObjectData(o) then delCount=delCount+1; handle.data[o]=nil; else kepCount=kepCount+1; end end VFL.print(path .. " :: " .. kepCount .. " entries Kept, " .. delCount .. " entries Deleted."); end function cleanDesktops() for path,dir in pairs(RDXDB.GetPackage("desktops")) do cleanDesktop("desktops:" .. path); end end --/script cleanDesktop("desktops:xenioss_northrend_raid_groups"); local function toggleWindowFrames(turnOn) local windows = { "RaidFrames:window_groups_1","RaidFrames:window_groups_2","RaidFrames:window_groups_3","RaidFrames:window_groups_4" ,"RaidFrames:window_groups_5","RaidFrames:window_groups_6","RaidFrames:window_groups_7","RaidFrames:window_groups_8" ,"RaidFrames:window_sorted_healer","RaidFrames:window_sorted_melee","RaidFrames:window_sorted_party","RaidFrames:window_sorted_partyPets" ,"RaidFrames:window_sorted_pets","RaidFrames:window_sorted_ranged","RaidFrames:window_sorted_tank","RaidFrames:window_oddEven_even" ,"RaidFrames:window_oddEven_odd","RaidFrames:window_grid","RaidFrames:window_classes","RaidFrames:window_10man" }; for i in pairs(windows) do toggleWindowFrame(windows[i],turnOn); end end -- Conditional Alpha functions local function getAlphaVar(path) local fs, handle = {}, RDXDB.AccessPath(RDXDB.ParsePath(path)); for o,x in pairs(handle.data) do if (x.feature and type(x.feature)) then if(string.find(x.feature,"shader_ca")) then return x; end end end end local function getAlpha(path) return getAlphaVar(path).falseAlpha; end local function setAlpha(path,value) getAlphaVar(path).falseAlpha=value; end local function setAlphaGlobal(value) if tonumber(value) and (tonumber(value) >=0 and tonumber(value) <=1) then setAlpha("RaidFrames:unitFrame_mana_DGT_Ph_border",value); setAlpha("RaidFrames:unitFrame_mana_Ph_border",value); setAlpha("RaidFrames:unitFrame_hpCurMax_DGT_Ph_border",value); setAlpha("RaidFrames:unitFrame_hpCurMax_Ph_border",value); setAlpha("RaidFrames:unitFrame_mana_DGT_Ph",value); setAlpha("RaidFrames:unitFrame_mana_DGT",value); setAlpha("RaidFrames:unitFrame_mana_Ph",value); setAlpha("RaidFrames:unitFrame_mana",value); setAlpha("RaidFrames:unitFrame_hpCurMax_DGT_Ph",value); setAlpha("RaidFrames:unitFrame_hpCurMax_DGT",value); setAlpha("RaidFrames:unitFrame_hpCurMax_Ph",value); setAlpha("RaidFrames:unitFrame_hpCurMax",value); setAlpha("RaidFrames:unitFrame_sRaidFrames",value); setAlpha("RaidFrames:unitFrame_sRaidFramesMana",value); setAlpha("RaidFrames:unitFrame_sRaidFramesManaPh",value); setAlpha("RaidFrames:unitFrame_sRaidFramesPh",value); setAlpha("RaidFrames:unitFrame_perfectRaid",value); setAlpha("RaidFrames:unitFrame_perfectRaidMana",value); setAlpha("RaidFrames:unitFrame_perfectRaidManaPh",value); setAlpha("RaidFrames:unitFrame_perfectRaidPh",value); setAlpha("RaidFrames:unitFrame_gridManaPh",value); setAlpha("RaidFrames:unitFrame_gridPh",value); setAlpha("RaidFrames:unitFrame_grid",value); setAlpha("RaidFrames:unitFrame_gridMana",value); setAlpha("RaidFrames:unitFrame_gridWideMana",value); setAlpha("RaidFrames:unitFrame_gridWide",value); return true; else BRF.print("Error: Transparency must be a decimal number 0-1"); return false; end end function setBossDebuff(debuff) local fs, handle = {}, RDXDB.AccessPath(RDXDB.ParsePath("RaidFrames:feature_currentDebuff")); local data=handle.data; data.cd=string.lower(debuff); end function setHot(hot) local fs, handle = {}, RDXDB.AccessPath(RDXDB.ParsePath("RaidFrames:feature_druidHot")); local data=handle.data; data.cd=string.lower(hot); if UnitClass("player") == "Druid" then fs, handle = {}, RDXDB.AccessPath(RDXDB.ParsePath("RaidFrames:feature_currentHot")); data=handle.data; data.cd=string.lower(hot); end end function setShield() local fs, handle = {}, RDXDB.AccessPath(RDXDB.ParsePath("RaidFrames:feature_priestShield")); local data=handle.data; if UnitClass("player") == "Priest" then data.cd=string.lower("weakened soul"); else data.cd=string.lower("moocows"); end end function setTrack(track) local fs, handle = {}, RDXDB.AccessPath(RDXDB.ParsePath("RaidFrames:feature_priestHot")); local data=handle.data; data.cd=string.lower(track); if UnitClass("player") == "Priest" then fs, handle = {}, RDXDB.AccessPath(RDXDB.ParsePath("RaidFrames:feature_currentHot")); data=handle.data; data.cd=string.lower(track); end end function getGroups(path) local fs, handle = {}, RDXDB.AccessPath(RDXDB.ParsePath(path)); local data = handle.data; local lastn = table.getn(data); local ret={} for i=1, lastn do if data[i][1]=="groups" then for j=1,8 do ret[j]=data[i][j+1]; end return ret; end; end end function saveGroups(checkedGroups) for k=1,table.getn(sortedGroups) do local fs, handle = {}, RDXDB.AccessPath(RDXDB.ParsePath(sortedGroups[k])); local data = handle.data; local lastn = table.getn(data); for i=1, lastn do if data[i][1]=="groups" then for j=1,8 do data[i][j+1] = checkedGroups[j]; end local instance = RDXDB.GetObjectInstance(sortedGroups[k]); instance:SetFilter(data); end end end end local function toggleDropShadows(turnOn, frame) if frame==1 or frame==2 or frame==0 then toggleDropShadowUnitframe("RaidFrames:unitFrame_mana_DGT_Ph_border",turnOn); toggleDropShadowUnitframe("RaidFrames:unitFrame_mana_Ph_border",turnOn); toggleDropShadowUnitframe("RaidFrames:unitFrame_hpCurMax_DGT_Ph_border",turnOn); toggleDropShadowUnitframe("RaidFrames:unitFrame_hpCurMax_Ph_border",turnOn); toggleDropShadowUnitframe("RaidFrames:unitFrame_mana_DGT_Ph",turnOn); toggleDropShadowUnitframe("RaidFrames:unitFrame_mana_DGT",turnOn); toggleDropShadowUnitframe("RaidFrames:unitFrame_mana_Ph",turnOn); toggleDropShadowUnitframe("RaidFrames:unitFrame_mana",turnOn); toggleDropShadowUnitframe("RaidFrames:unitFrame_hpCurMax_DGT_Ph",turnOn); toggleDropShadowUnitframe("RaidFrames:unitFrame_hpCurMax_DGT",turnOn); toggleDropShadowUnitframe("RaidFrames:unitFrame_hpCurMax_Ph",turnOn); toggleDropShadowUnitframe("RaidFrames:unitFrame_hpCurMax",turnOn); end if frame==3 or frame==0 then toggleDropShadowUnitframe("RaidFrames:unitFrame_sRaidFrames",turnOn); toggleDropShadowUnitframe("RaidFrames:unitFrame_sRaidFramesMana",turnOn); toggleDropShadowUnitframe("RaidFrames:unitFrame_sRaidFramesManaPh",turnOn); toggleDropShadowUnitframe("RaidFrames:unitFrame_sRaidFramesPh",turnOn); end if frame==4 or frame==0 then toggleDropShadowUnitframe("RaidFrames:unitFrame_perfectRaid",turnOn); toggleDropShadowUnitframe("RaidFrames:unitFrame_perfectRaidMana",turnOn); toggleDropShadowUnitframe("RaidFrames:unitFrame_perfectRaidManaPh",turnOn); toggleDropShadowUnitframe("RaidFrames:unitFrame_perfectRaidPh",turnOn); end if frame==5 or frame==6 or frame==0 then toggleDropShadowUnitframe("RaidFrames:unitFrame_gridManaPh",turnOn); toggleDropShadowUnitframe("RaidFrames:unitFrame_gridPh",turnOn); toggleDropShadowUnitframe("RaidFrames:unitFrame_grid",turnOn); toggleDropShadowUnitframe("RaidFrames:unitFrame_gridMana",turnOn); toggleDropShadowUnitframe("RaidFrames:unitFrame_gridWideMana",turnOn); toggleDropShadowUnitframe("RaidFrames:unitFrame_gridWide",turnOn); toggleDropShadowUnitframe("RaidFrames:unitFrame_assist",turnOn); end end local function saveVars(varName, value) if RF_OPTIONS.FRAMESELECTED == 1 then if varName=="ma" then if value then RF_OPTIONS.MANABAR = true; else RF_OPTIONS.MANABAR = false; end end if varName=="dgt" then if value then RF_OPTIONS.CASTINGBAR = true; else RF_OPTIONS.CASTINGBAR = false; end end if varName=="ds" then if value then RF_OPTIONS.DS = true; else RF_OPTIONS.DS = false; end end if varName=="tb" then if value then RF_OPTIONS.TB = true; else RF_OPTIONS.TB = false; end end if varName=="hf" then RF_OPTIONS.TEXTFORMAT_DEF=value; RF_OPTIONS.TEXTFORMAT=value; end if varName=="bc" then RF_OPTIONS.BARCOLOR=value; end if varName=="bs" then RF_OPTIONS.BUFFSELECTED=value; end end if RF_OPTIONS.FRAMESELECTED == 2 then if varName=="ph" then if value then RF_OPTIONS.PREHEALTH = true; else RF_OPTIONS.PREHEALTH = false; end end if varName=="ma" then if value then RF_OPTIONS.MANABAR = true; else RF_OPTIONS.MANABAR = false; end end if varName=="dgt" then if value then RF_OPTIONS.CASTINGBAR = true; else RF_OPTIONS.CASTINGBAR = false; end end if varName=="ds" then if value then RF_OPTIONS.DS = true; else RF_OPTIONS.DS = false; end end if varName=="tb" then if value then RF_OPTIONS.TB = true; else RF_OPTIONS.TB = false; end end if varName=="hf" then RF_OPTIONS.TEXTFORMAT_DEF=value; RF_OPTIONS.TEXTFORMAT=value; end if varName=="bc" then RF_OPTIONS.BARCOLOR=value; end if varName=="bs" then RF_OPTIONS.BUFFSELECTED=value; end end --SR if RF_OPTIONS.FRAMESELECTED == 3 then if varName=="ph" then if value then RF_OPTIONS.PREHEALTH_SR = true; else RF_OPTIONS.PREHEALTH_SR = false; end end if varName=="ma" then if value then RF_OPTIONS.MANABAR_SR = true; else RF_OPTIONS.MANABAR_SR = false; end end if varName=="dgt" then if value then RF_OPTIONS.CASTINGBAR_SR = true; else RF_OPTIONS.CASTINGBAR_SR = false; end end if varName=="ds" then if value then RF_OPTIONS.DS_SR = true; else RF_OPTIONS.DS_SR = false; end end if varName=="tb" then if value then RF_OPTIONS.TB_SR = true; else RF_OPTIONS.TB_SR = false; end end if varName=="hf" then RF_OPTIONS.TEXTFORMAT_SR=value; RF_OPTIONS.TEXTFORMAT=value; end if varName=="bc" then RF_OPTIONS.BARCOLOR_SR=value; end if varName=="bs" then RF_OPTIONS.BUFFSELECTED_SR=value; end end --PR if RF_OPTIONS.FRAMESELECTED == 4 then if varName=="ph" then if value then RF_OPTIONS.PREHEALTH_PR = true; else RF_OPTIONS.PREHEALTH_PR = false; end end if varName=="ma" then if value then RF_OPTIONS.MANABAR_PR = true; else RF_OPTIONS.MANABAR_PR = false; end end if varName=="dgt" then if value then RF_OPTIONS.CASTINGBAR_PR = true; else RF_OPTIONS.CASTINGBAR_PR = false; end end if varName=="ds" then if value then RF_OPTIONS.DS_PR = true; else RF_OPTIONS.DS_PR = false; end end if varName=="tb" then if value then RF_OPTIONS.TB_PR = true; else RF_OPTIONS.TB_PR = false; end end if varName=="hf" then RF_OPTIONS.TEXTFORMAT_PR=value; RF_OPTIONS.TEXTFORMAT=value; end if varName=="bc" then RF_OPTIONS.BARCOLOR_PR=value; end if varName=="bs" then RF_OPTIONS.BUFFSELECTED_PR=value; end end --GR if RF_OPTIONS.FRAMESELECTED == 5 then if varName=="ph" then if value then RF_OPTIONS.PREHEALTH_GR = true; else RF_OPTIONS.PREHEALTH_GR = false; end end if varName=="ma" then if value then RF_OPTIONS.MANABAR_GR = true; else RF_OPTIONS.MANABAR_GR = false; end end if varName=="ds" then if value then RF_OPTIONS.DS_GR = true; else RF_OPTIONS.DS_GR = false; end end if varName=="tb" then if value then RF_OPTIONS.TB_GR = true; else RF_OPTIONS.TB_GR = false; end end if varName=="hf" then RF_OPTIONS.TEXTFORMAT_GR=value; RF_OPTIONS.TEXTFORMAT=value; end if varName=="bc" then RF_OPTIONS.BARCOLOR_GR=value; end if varName=="bs" then RF_OPTIONS.BUFFSELECTED_GR=value; end end if RF_OPTIONS.FRAMESELECTED == 6 then if varName=="ma" then if value then RF_OPTIONS.MANABAR_GR = true; else RF_OPTIONS.MANABAR_GR = false; end end if varName=="ds" then if value then RF_OPTIONS.DS_GR = true; else RF_OPTIONS.DS_GR = false; end end if varName=="tb" then if value then RF_OPTIONS.TB_GR = true; else RF_OPTIONS.TB_GR = false; end end if varName=="hf" then RF_OPTIONS.TEXTFORMAT_GR=value; RF_OPTIONS.TEXTFORMAT=value; end if varName=="bc" then RF_OPTIONS.BARCOLOR_GR=value; end if varName=="bs" then RF_OPTIONS.BUFFSELECTED_GR=value; end end if varName=="hot" then if value then RF_OPTIONS.HOT=true; else RF_OPTIONS.HOT=false; end end if varName=="hotbar" then if value then RF_OPTIONS.HOTBAR=true; else RF_OPTIONS.HOTBAR=false; end end if varName=="dh" then RF_OPTIONS.DRUIDHOT=value; end if varName=="pt" then RF_OPTIONS.PRIESTTRACK=value; end if varName=="an" then RF_OPTIONS.ANIMATE=value; end end local function setBarColor(color) if RF_OPTIONS.FRAMESELECTED==1 then changeBarColor("RaidFrames:feature_texHpbar", color); changeBarColor("RaidFrames:feature_texHpbarDgt", color); RDXDB.Copy("RaidFrames:feature_colorDback","RaidFrames:feature_colorSFback"); end if RF_OPTIONS.FRAMESELECTED==2 then changeBarColor("RaidFrames:feature_texHpbar", color); changeBarColor("RaidFrames:feature_texHpbarDgt", color); RDXDB.Copy("RaidFrames:feature_colorDback","RaidFrames:feature_colorSFback"); end if RF_OPTIONS.FRAMESELECTED==3 then changeBarColor("RaidFrames:feature_texHpbarSF", color); RDXDB.Copy("RaidFrames:feature_colorSRback","RaidFrames:feature_colorSFback"); end if RF_OPTIONS.FRAMESELECTED==4 then changeBarColor("RaidFrames:feature_texHpbarPR", color); RDXDB.Copy("RaidFrames:feature_colorPRback","RaidFrames:feature_colorSFback"); end if RF_OPTIONS.FRAMESELECTED==5 then changeBarColor("RaidFrames:feature_texHpbarGR", color); changeBarColor("RaidFrames:feature_texHpbarGRmana", color); RDXDB.Copy("RaidFrames:feature_colorGRback","RaidFrames:feature_colorSFback"); end if RF_OPTIONS.FRAMESELECTED==6 then changeBarColor("RaidFrames:feature_texHpbarGRW", color); changeBarColor("RaidFrames:feature_texHpbarGRWmana", color); RDXDB.Copy("RaidFrames:feature_colorGRback","RaidFrames:feature_colorSFback"); end RDX.SetFeatureFields("RaidFrames:unitFrame_assist", "ColorVariable: Conditional Color", "colorVar2", color); end; function setStyle(style) RF_OPTIONS.FRAMESELECTED = style; if style == 1 then RDXDB.Copy("RaidFrames:feature_hpCurMaxDgtPhBorder", "RaidFrames:feature_sortUnit"); RDXDB.Copy("RaidFrames:feature_hpCurMaxDgtPhBorder", "RaidFrames:feature_groupUnit"); RDXDB.Copy("RaidFrames:feature_hpCurMaxDgtPhBorder", "RaidFrames:feature_oddEvenUnit"); RDXDB.Copy("RaidFrames:feature_hpCurMaxDgtPhBorder", "RaidFrames:feature_10manUnit"); RDXDB.Copy("RFDispell:feature_UF", "RFDispell:feature_UF_current"); saveVars("bc",4); setBarColor("barColor"); RDXDB.Copy("RaidFrames:feature_colorCustomHP", "RaidFrames:feature_colorBar"); elseif style == 2 then RDXDB.Copy("RaidFrames:feature_hpCurMaxDgtPh", "RaidFrames:feature_sortUnit"); RDXDB.Copy("RaidFrames:feature_hpCurMaxDgtPh", "RaidFrames:feature_groupUnit"); RDXDB.Copy("RaidFrames:feature_hpCurMaxDgtPh", "RaidFrames:feature_oddEvenUnit"); RDXDB.Copy("RaidFrames:feature_hpCurMaxDgtPh", "RaidFrames:feature_10manUnit"); RDXDB.Copy("RFDispell:feature_UF", "RFDispell:feature_UF_current"); saveVars("bc",4); setBarColor("barColor"); RDXDB.Copy("RaidFrames:feature_colorCustomHP", "RaidFrames:feature_colorBar"); elseif style == 3 then RDXDB.Copy("RaidFrames:feature_sRaidFramesManaPh", "RaidFrames:feature_sortUnit"); RDXDB.Copy("RaidFrames:feature_sRaidFramesManaPh", "RaidFrames:feature_groupUnit"); RDXDB.Copy("RaidFrames:feature_sRaidFramesManaPh", "RaidFrames:feature_oddEvenUnit"); RDXDB.Copy("RaidFrames:feature_sRaidFramesManaPh", "RaidFrames:feature_10manUnit"); saveVars("bc",1); setBarColor("barColor"); RDXDB.Copy("RaidFrames:feature_colorGreenRed", "RaidFrames:feature_colorBar"); elseif style == 4 then RDXDB.Copy("RaidFrames:feature_perfectRaidPh", "RaidFrames:feature_sortUnit"); RDXDB.Copy("RaidFrames:feature_perfectRaidPh", "RaidFrames:feature_groupUnit"); RDXDB.Copy("RaidFrames:feature_perfectRaidPh", "RaidFrames:feature_oddEvenUnit"); RDXDB.Copy("RaidFrames:feature_perfectRaidPh", "RaidFrames:feature_10manUnit"); saveVars("bc",1); setBarColor("barColor"); RDXDB.Copy("RaidFrames:feature_colorGreenRed", "RaidFrames:feature_colorBar"); elseif style == 5 then RDXDB.Copy("RaidFrames:feature_gridPh", "RaidFrames:feature_sortUnit"); RDXDB.Copy("RaidFrames:feature_gridPh", "RaidFrames:feature_groupUnit"); RDXDB.Copy("RaidFrames:feature_gridPh", "RaidFrames:feature_oddEvenUnit"); RDXDB.Copy("RaidFrames:feature_gridPh", "RaidFrames:feature_10manUnit"); saveVars("bc",3); setBarColor("classColor"); else RDXDB.Copy("RaidFrames:feature_gridWide", "RaidFrames:feature_sortUnit"); RDXDB.Copy("RaidFrames:feature_gridWide", "RaidFrames:feature_groupUnit"); RDXDB.Copy("RaidFrames:feature_gridWide", "RaidFrames:feature_oddEvenUnit"); RDXDB.Copy("RaidFrames:feature_gridWide", "RaidFrames:feature_10manUnit"); saveVars("bc",3); setBarColor("classColor"); end RF_OPTIONS.FRAMESELECTED = style; RDXDK.SecuredChangeDesktop(RDXDK.GetCurrentDesktopPath()); end function BRFrestoreDefaults() RDXDB.Copy("RaidFrames:feature_hpCurMaxDgtPhBorder", "RaidFrames:feature_sortUnit"); RDXDB.Copy("RaidFrames:feature_hpCurMaxDgtPhBorder", "RaidFrames:feature_groupUnit"); RDXDB.Copy("RaidFrames:feature_hpCurMaxDgtPhBorder", "RaidFrames:feature_oddEvenUnit"); RDXDB.Copy("RaidFrames:feature_hpCurMaxDgtPhBorder", "RaidFrames:feature_10manUnit"); --RDXDB.Copy("RFDispell:feature_UF" .. mb, "RFDispell:feature_UF_current"); RDXDB.Copy("RaidFrames:sh_noBuff", "RaidFrames:sh_buff"); RDXDB.Copy("RaidFrames:sh_noDebuff", "RaidFrames:sh_debuff"); RF_OPTIONS.PREHEALTH = true; RF_OPTIONS.MANABAR = false; RF_OPTIONS.CASTINGBAR = true; RF_OPTIONS.TEXTFORMAT = 2; RF_OPTIONS.TEXTFORMAT_DEF = 2; RF_OPTIONS.BARCOLOR = 4; RF_OPTIONS.FRAMESELECTED = 1; RF_OPTIONS.BUFFSELECTED = 4; RF_OPTIONS.DS = true; RF_OPTIONS.TB = true; RF_OPTIONS.PREHEALTH_SR = true; RF_OPTIONS.MANABAR_SR = true; RF_OPTIONS.CASTINGBAR_SR = false; RF_OPTIONS.TEXTFORMAT_SR = 5; RF_OPTIONS.BARCOLOR_SR = 1; RF_OPTIONS.BUFFSELECTED_SR = 3; RF_OPTIONS.DS_SR = true; RF_OPTIONS.TB_SR = true; RF_OPTIONS.PREHEALTH_PR = true; RF_OPTIONS.MANABAR_PR = false; RF_OPTIONS.CASTINGBAR_PR = false; RF_OPTIONS.TEXTFORMAT_PR = 2; RF_OPTIONS.BARCOLOR_PR = 1; RF_OPTIONS.BUFFSELECTED_PR = 4; RF_OPTIONS.DS_PR = true; RF_OPTIONS.TB_PR = true; RF_OPTIONS.PREHEALTH_GR = true; RF_OPTIONS.MANABAR_GR = false; RF_OPTIONS.CASTINGBAR_GR = false; RF_OPTIONS.TEXTFORMAT_GR = 6; RF_OPTIONS.BARCOLOR_GR = 3; RF_OPTIONS.BUFFSELECTED_GR = 4; RF_OPTIONS.DS_GR = true; RF_OPTIONS.TB_GR = true; RF_OPTIONS.HOT = true; RF_OPTIONS.HOTBAR = true; RF_OPTIONS.DRUIDHOT = 1; RF_OPTIONS.PRIESTTRACK = 1; RF_OPTIONS.ANIMATE = 1; setBarColor("barColor"); setHot("rejuvenation"); setAlphaGlobal("0.5"); local firstRun=false; if RDXDB.CheckObject("RaidFrames:FirstRun", "Typeless") then BRF.print("First run of BrRaidFrames, Default settings have been restored."); RDXDB.DeleteObject("RaidFrames:FirstRun"); RDXDB.SetSymLinkTarget("Builtin:uf_multitrack","RaidFrames:unitFrame_assist"); RDXDK.LockDesktop(); firstRun=true; else RDXDB.Copy("RaidFrames:feature_colorCustomHP", "RaidFrames:feature_colorBar"); RDXDB.Copy("RFDefaults:feature_FullColor", "RaidFrames:feature_FullColor"); RDXDB.Copy("RFDefaults:feature_LowColor", "RaidFrames:feature_LowColor"); RDXDB.Copy("RFDefaults:feature_colorHighlight", "RaidFrames:feature_colorHighlight"); RDXDB.Copy("RFDefaults:feature_colorHighlight2", "RaidFrames:feature_colorHighlight2"); RDXDB.Copy("RFDefaults:feature_colorDback", "RaidFrames:feature_colorDback"); RDXDB.Copy("RFDefaults:feature_colorDback", "RaidFrames:feature_colorSFback"); RDXDB.Copy("RFDefaults:feature_colorSRback", "RaidFrames:feature_colorSRback"); RDXDB.Copy("RFDefaults:feature_colorGRback", "RaidFrames:feature_colorGRback"); RDXDB.Copy("RFDefaults:feature_colorPRback", "RaidFrames:feature_colorPRback"); RDXDB.Copy("RFDefaults:feature_colorHotBar", "RaidFrames:feature_colorHotBar"); local x = RDXDB.GetObjectData("RFDefaults:feature_texRDX"); local texOrigData=x.data; local txFeat=RDXDB.GetObjectData("RaidFrames:feature_texHpbar"); local txData=txFeat.data; txData.texture=texOrigData.texture; txFeat=RDXDB.GetObjectData("RaidFrames:feature_texHpbar"); txData=txFeat.data; txData.texture=texOrigData.texture; txFeat = RDXDB.GetObjectData("RaidFrames:feature_texHighlight"); txData=txFeat.data; txData.texture=texOrigData.texture; txFeat = RDXDB.GetObjectData("RaidFrames:feature_texHighlight2"); txData=txFeat.data; txData.texture=texOrigData.texture; txFeat = RDXDB.GetObjectData("RaidFrames:feature_texPrehealth"); txData=txFeat.data; txData.texture=texOrigData.texture; txFeat = RDXDB.GetObjectData("RaidFrames:feature_texHpbarDgt"); txData=txFeat.data; txData.texture=texOrigData.texture; txFeat = RDXDB.GetObjectData("RaidFrames:feature_texHighlightDgt"); txData=txFeat.data; txData.texture=texOrigData.texture; txFeat = RDXDB.GetObjectData("RaidFrames:feature_texHighlight2Dgt"); txData=txFeat.data; txData.texture=texOrigData.texture; txFeat = RDXDB.GetObjectData("RaidFrames:feature_texPrehealthDgt"); txData=txFeat.data; txData.texture=texOrigData.texture; --assists --txFeat = RDXDB.GetObjectData("RaidFrames:feature_texHpbarAssist"); --txData=txFeat.data; --txData.texture=texOrigData.texture; --txFeat = RDXDB.GetObjectData("RaidFrames:feature_texHighlightAssist"); --txData=txFeat.data; --txData.texture=texOrigData.texture; --txFeat = RDXDB.GetObjectData("RaidFrames:feature_texPrehealthAssist"); --txData=txFeat.data; --txData.texture=texOrigData.texture; --SRF x=RDXDB.GetObjectData("RFDefaults:feature_texSF"); texOrigData=x.data; txFeat = RDXDB.GetObjectData("RaidFrames:feature_texHpbarSF"); txData=txFeat.data; txData.texture=texOrigData.texture; txFeat = RDXDB.GetObjectData("RaidFrames:feature_texHighlightSF"); txData=txFeat.data; txData.texture=texOrigData.texture; txFeat = RDXDB.GetObjectData("RaidFrames:feature_texHighlight2SF"); txData=txFeat.data; txData.texture=texOrigData.texture; txFeat = RDXDB.GetObjectData("RaidFrames:feature_texPrehealthSF"); txData=txFeat.data; txData.texture=texOrigData.texture; --PR x=RDXDB.GetObjectData("RFDefaults:feature_texPR"); texOrigData=x.data; txFeat = RDXDB.GetObjectData("RaidFrames:feature_texHpbarPR"); txData=txFeat.data; txData.texture=texOrigData.texture; txFeat = RDXDB.GetObjectData("RaidFrames:feature_texHighlightPR"); txData=txFeat.data; txData.texture=texOrigData.texture; txFeat = RDXDB.GetObjectData("RaidFrames:feature_texHighlight2PR"); txData=txFeat.data; txData.texture=texOrigData.texture; txFeat = RDXDB.GetObjectData("RaidFrames:feature_texPrehealthPR"); txData=txFeat.data; txData.texture=texOrigData.texture; --GR x=RDXDB.GetObjectData("RFDefaults:feature_texGR"); texOrigData=x.data; txFeat = RDXDB.GetObjectData("RaidFrames:feature_texHpbarGR"); txData=txFeat.data; txData.texture=texOrigData.texture; txFeat = RDXDB.GetObjectData("RaidFrames:feature_texHpbarGRmana"); txData=txFeat.data; txData.texture=texOrigData.texture; txFeat = RDXDB.GetObjectData("RaidFrames:feature_texHighlightGR"); txData=txFeat.data; txData.texture=texOrigData.texture; txFeat = RDXDB.GetObjectData("RaidFrames:feature_texHighlight2GR"); txData=txFeat.data; txData.texture=texOrigData.texture; txFeat = RDXDB.GetObjectData("RaidFrames:feature_texPrehealthGR"); txData=txFeat.data; txData.texture=texOrigData.texture; txFeat = RDXDB.GetObjectData("RaidFrames:feature_texPrehealthGRmana"); txData=txFeat.data; txData.texture=texOrigData.texture; txFeat = RDXDB.GetObjectData("RaidFrames:feature_texHpbarGRW"); txData=txFeat.data; txData.texture=texOrigData.texture; txFeat = RDXDB.GetObjectData("RaidFrames:feature_texHpbarGRWmana"); txData=txFeat.data; txData.texture=texOrigData.texture; txFeat = RDXDB.GetObjectData("RaidFrames:feature_texHighlightGRW"); txData=txFeat.data; txData.texture=texOrigData.texture; txFeat = RDXDB.GetObjectData("RaidFrames:feature_texHighlight2GRW"); txData=txFeat.data; txData.texture=texOrigData.texture; txFeat = RDXDB.GetObjectData("RaidFrames:feature_texPrehealthGRW"); txData=txFeat.data; txData.texture=texOrigData.texture; txFeat = RDXDB.GetObjectData("RaidFrames:feature_texPrehealthGRWmana"); txData=txFeat.data; txData.texture=texOrigData.texture; --shadows toggleDropShadows(true,0); --animate toggleAnimations(false); BRF.print("Default settings have been restored to all frames."); VFL.EscapeTo(eschRF); RFSettings(); end if not firstRun then RDXDK.SecuredChangeDesktop(RDXDK.GetCurrentDesktopPath()); end collectgarbage('collect'); end; function editSortedGroups() if InCombatLockdown()then BRF.print("You must be out of combat to view this window!"); return; end; if sdlg then return; end sdlg = VFLUI.Window:new(fdlg or VFLHigh); sdlg:SetFrameStrata("FULLSCREEN_DIALOG"); VFLUI.Window.SetDefaultFraming(sdlg, 22); sdlg:SetTitleColor(0,0.6,0); sdlg:SetBackdrop(VFLUI.BlackDialogBackdrop); sdlg:SetPoint("CENTER", UIParent, "CENTER"); sdlg:SetWidth(160); sdlg:SetHeight(150); sdlg:SetText("Sorted Groups"); VFLUI.Window.StdMove(sdlg, sdlg:GetTitleBar()); sdlg:Show(); local checks = VFLUI.CheckGroup:new(sdlg); checks:SetPoint("TOPLEFT", sdlg:GetClientArea(), "TOPLEFT",5,2); checks:SetLayout(8, 2); checks:SetWidth(150); checks:SetHeight(100); local groups = getGroups("RaidFrames:set_ranged"); -- check dem boxes for i=1,8 do checks.checkBox[i]:SetText("Group " .. i); if groups[i] then checks.checkBox[i]:SetChecked(true); end end checks:Show(); eschRFS = function() sdlg:Destroy(); end VFL.AddEscapeHandler(eschRFS); local btnClose = VFLUI.CloseButton:new(sdlg); sdlg:AddButton(btnClose); btnClose:SetScript("OnClick", function() VFL.EscapeTo(eschRFS); end); local btnOK = VFLUI.OKButton:new(sdlg); btnOK:SetText("Apply"); btnOK:SetHeight(25); btnOK:SetPoint("BOTTOMRIGHT", sdlg:GetClientArea(), "BOTTOMRIGHT"); btnOK:SetPoint("BOTTOMLEFT", sdlg:GetClientArea(), "BOTTOMLEFT"); btnOK:Show(); btnOK:SetScript("OnClick", function() local checkValues={}; for i=1,8 do checkValues[i]=checks.checkBox[i]:GetChecked(); end saveGroups(checkValues); BRF.print("Sorted Groups set, Rebuilding filter..."); --collectgarbage('collect'); VFL.EscapeTo(eschRFS); end); sdlg.Destroy = VFL.hook(function(s) checks:Destroy(); checks = nil; btnOK:Destroy(); btnOK = nil; sdlg = nil; end, sdlg.Destroy); end function editRoles() if InCombatLockdown()then BRF.print("You must be out of combat to view this window!"); return; end; if edlg then return; end edlg = VFLUI.Window:new(VFLHigh); edlg:SetFrameStrata("DIALOG"); VFLUI.Window.SetDefaultFraming(edlg, 22); edlg:SetTitleColor(0.03,0.5,0.82); edlg:SetBackdrop(VFLUI.BlackDialogBackdrop); edlg:SetPoint("CENTER", UIParent, "CENTER"); edlg:SetWidth(160); edlg:SetHeight(280); edlg:SetText("Player Roles"); VFLUI.Window.StdMove(edlg, edlg:GetTitleBar()); edlg:Show(); local btn1 = VFLUI.Button:new(edlg); btn1:SetPoint("TOPLEFT", edlg:GetClientArea(), "TOPLEFT",5,-5); btn1:SetWidth(140); btn1:SetHeight(25); btn1:Show(); btn1:SetText("Shadow Priests"); btn1:SetScript("OnClick", function() RDXDB.OpenObject("RFNomsets:nomSet_shadowPriests", "Edit"); end); local btn2 = VFLUI.Button:new(edlg); btn2:SetPoint("TOPLEFT", btn1, "BOTTOMLEFT",0,-2); btn2:SetWidth(140); btn2:SetHeight(25); btn2:Show(); btn2:SetText("Retribution Paladins"); btn2:SetScript("OnClick", function() RDXDB.OpenObject("RFNomsets:nomSet_retPallys", "Edit"); end); local btn3 = VFLUI.Button:new(edlg); btn3:SetPoint("TOPLEFT", btn2, "BOTTOMLEFT",0,-2); btn3:SetWidth(140); btn3:SetHeight(25); btn3:Show(); btn3:SetText("Protection Paladins"); btn3:SetScript("OnClick", function() RDXDB.OpenObject("RFNomsets:nomSet_protPallys", "Edit"); end); local btn4 = VFLUI.Button:new(edlg); btn4:SetPoint("TOPLEFT", btn3, "BOTTOMLEFT",0,-2); btn4:SetWidth(140); btn4:SetHeight(25); btn4:Show(); btn4:SetText("Feral Druids"); btn4:SetScript("OnClick", function() RDXDB.OpenObject("RFNomsets:nomSet_bearDruids", "Edit"); end); local btn5 = VFLUI.Button:new(edlg); btn5:SetPoint("TOPLEFT", btn4, "BOTTOMLEFT",0,-2); btn5:SetWidth(140); btn5:SetHeight(25); btn5:Show(); btn5:SetText("Enhancement Shamen"); btn5:SetScript("OnClick", function() RDXDB.OpenObject("RFNomsets:nomSet_meleeShamen", "Edit"); end); local btn6 = VFLUI.Button:new(edlg); btn6:SetPoint("TOPLEFT", btn5, "BOTTOMLEFT",0,-2); btn6:SetWidth(140); btn6:SetHeight(25); btn6:Show(); btn6:SetText("Elemental Shamen"); btn6:SetScript("OnClick", function() RDXDB.OpenObject("RFNomsets:nomSet_elemShamen", "Edit"); end); local btn7 = VFLUI.Button:new(edlg); btn7:SetPoint("TOPLEFT", btn6, "BOTTOMLEFT",0,-2); btn7:SetWidth(140); btn7:SetHeight(25); btn7:Show(); btn7:SetText("DPS Warriors"); btn7:SetScript("OnClick", function() RDXDB.OpenObject("RFNomsets:nomSet_dpsWars", "Edit"); end); local btn8 = VFLUI.Button:new(edlg); btn8:SetPoint("TOPLEFT", btn7, "BOTTOMLEFT",0,-2); btn8:SetWidth(140); btn8:SetHeight(25); btn8:Show(); btn8:SetText("Tanking DeathKnights"); btn8:SetScript("OnClick", function() RDXDB.OpenObject("RFNomsets:nomSet_frostDKs", "Edit"); end); eschRFS = function() edlg:Destroy(); end VFL.AddEscapeHandler(eschRFS); local btnClose = VFLUI.CloseButton:new(edlg); edlg:AddButton(btnClose); btnClose:SetScript("OnClick", function() VFL.EscapeTo(eschRFS); end); local btnClose2 = VFLUI.OKButton:new(edlg); btnClose2:SetText("Close"); btnClose2:SetHeight(25); btnClose2:SetWidth(50); btnClose2:SetPoint("BOTTOMRIGHT", edlg:GetClientArea(), "BOTTOMRIGHT", -5, 5); btnClose2:Show(); btnClose2:SetScript("OnClick", function() VFL.EscapeTo(eschRFS); end); edlg.Destroy = VFL.hook(function(s) btn1:Destroy(); btn1 = nil; btn2:Destroy(); btn2 = nil; btn3:Destroy(); btn3 = nil; btn4:Destroy(); btn4 = nil; btn5:Destroy(); btn5 = nil; btn6:Destroy(); btn6 = nil; btn7:Destroy(); btn7 = nil; btn8:Destroy(); btn8 = nil; btnClose2:Destroy(); btnClose2=nil; edlg = nil; end, edlg.Destroy); end function RFSettings() if InCombatLockdown()then BRF.print("You must be out of combat to view this window!"); return; end; if fdlg then return; end fdlg = VFLUI.Window:new(VFLHigh); fdlg:SetFrameStrata("FULLSCREEN"); VFLUI.Window.SetDefaultFraming(fdlg, 22); fdlg:SetTitleColor(0.03,0.5,0.82); fdlg:SetBackdrop(VFLUI.BlackDialogBackdrop); fdlg:SetPoint("CENTER", UIParent, "CENTER"); fdlg:SetWidth(700); fdlg:SetHeight(335); fdlg:SetText("BRF: Frame Settings"); VFLUI.Window.StdMove(fdlg, fdlg:GetTitleBar()); fdlg:Show(); local SFgroup = VFLUI.GroupBox:new(fdlg:GetClientArea()); VFLUI.GroupBox.MakeTextCaption(SFgroup, "Select Frame"); SFgroup:SetPoint("TOPLEFT", fdlg:GetClientArea(), "TOPLEFT",0,-2); --SFgroup:SetPoint("TOPRIGHT", fdlg:GetClientArea(), "TOP"); SFgroup:SetWidth(170); SFgroup:SetHeight(120); SFgroup:Show(); local radio = VFLUI.RadioGroup:new(SFgroup:GetClientArea()); radio:SetPoint("TOPLEFT", SFgroup:GetClientArea(), "TOPLEFT",0,2); radio:SetLayout(6, 1); radio.buttons[1]:SetText("Default (w/ borders)"); radio.buttons[2]:SetText("Default (w/o borders)"); radio.buttons[3]:SetText("sRaidFrames"); radio.buttons[4]:SetText("Perfect Raid"); radio.buttons[5]:SetText("Grid"); radio.buttons[6]:SetText("Grid (Wide)"); radio:SetWidth(190); radio:Show(); local UFgroup = VFLUI.GroupBox:new(fdlg); VFLUI.GroupBox.MakeTextCaption(UFgroup, "UnitFrame Options"); UFgroup:SetPoint("TOPLEFT", SFgroup, "TOPRIGHT"); --UFgroup:SetPoint("RIGHT", fdlg:GetClientArea(), "RIGHT"); UFgroup:SetPoint("BOTTOMLEFT", SFgroup, "BOTTOMRIGHT"); UFgroup:Show(); UFgroup:SetWidth(170); UFgroup:SetHeight(120); --local lbl = VFLUI.MakeLabel(nil, fdlg, "UnitFrame Options:"); --lbl:SetPoint("TOPLEFT", fdlg:GetClientArea(), "TOPLEFT"); local checks = VFLUI.CheckGroup:new(SFgroup:GetClientArea()); checks:SetPoint("TOPLEFT", UFgroup:GetClientArea(), "TOPLEFT",0,7); checks:SetLayout(3, 1); checks.checkBox[1]:SetText("Display Predicted Health"); checks.checkBox[2]:SetText("Display Mana Bars"); checks.checkBox[3]:SetText("Display Mini Dispel Grid"); checks:SetWidth(190); checks:SetHeight(110); checks:Show(); --Color Box local COgroup = VFLUI.GroupBox:new(fdlg); VFLUI.GroupBox.MakeTextCaption(COgroup, "Color Options"); COgroup:SetPoint("TOPLEFT", SFgroup, "BOTTOMLEFT",0,-1); --COgroup:SetPoint("TOPRIGHT", SFgroup, "BOTTOMRIGHT"); COgroup:SetWidth(170); COgroup:SetHeight(155); COgroup:Show(); --Buff Box local Bgroup = VFLUI.GroupBox:new(fdlg); VFLUI.GroupBox.MakeTextCaption(Bgroup, "Buff/Debuff Options"); Bgroup:SetPoint("TOPLEFT", COgroup, "TOPRIGHT"); --Bgroup:SetPoint("RIGHT", fdlg:GetClientArea(), "RIGHT"); Bgroup:SetPoint("BOTTOMLEFT", COgroup, "BOTTOMRIGHT"); Bgroup:SetWidth(170); Bgroup:SetHeight(155); Bgroup:Show(); --Defaults button local btnDispel = VFLUI.OKButton:new(fdlg); btnDispel:SetText("Restore Defaults"); btnDispel:SetHeight(25); btnDispel:SetWidth(115); btnDispel:SetPoint("BOTTOMLEFT", fdlg:GetClientArea(), "BOTTOMLEFT"); btnDispel:Show(); btnDispel:SetScript("OnClick", function() BRFrestoreDefaults(); end); --Groups button local btnSorted = VFLUI.OKButton:new(fdlg); btnSorted:SetText("Sorted Groups"); btnSorted:SetHeight(25); btnSorted:SetWidth(100); btnSorted:SetPoint("LEFT", btnDispel , "RIGHT"); btnSorted:Show(); btnSorted:SetScript("OnClick", function() editSortedGroups(); end); --Text Box local TXgroup = VFLUI.GroupBox:new(fdlg); VFLUI.GroupBox.MakeTextCaption(TXgroup, "Text, Texture, & Other Options"); TXgroup:SetPoint("TOPLEFT", UFgroup, "TOPRIGHT",1,0); TXgroup:SetPoint("RIGHT", fdlg:GetClientArea(), "RIGHT"); TXgroup:SetPoint("BOTTOMLEFT", Bgroup, "BOTTOMRIGHT"); TXgroup:Show(); --Color Options local lblFhealthColor,lblLhealthColor,colorFH,colorLH; --Combo Select function local function colorComboSelChange(value) if(value=="Green -> Red") then lblFhealthColor:SetTextColor(0.5, 0.5, 0.5); lblLhealthColor:SetTextColor(0.5, 0.5, 0.5); colorFH:Disable(); colorLH:Disable(); end; if(value=="Static Green") then lblFhealthColor:SetTextColor(0.5, 0.5, 0.5); lblLhealthColor:SetTextColor(0.5, 0.5, 0.5); colorFH:Disable(); colorLH:Disable(); end; if(value=="Class Color") then lblFhealthColor:SetTextColor(0.5, 0.5, 0.5); lblLhealthColor:SetTextColor(0.5, 0.5, 0.5); colorFH:Disable(); colorLH:Disable(); end; if(value=="User Defined") then lblFhealthColor:SetTextColor(1, 1, 1); lblLhealthColor:SetTextColor(1, 1, 1); colorFH:Enable(); colorLH:Enable(); end; end; local ddBarColor = VFLUI.Dropdown:new(fdlg, fnBarColors, colorComboSelChange); ddBarColor:SetPoint("TOPRIGHT", COgroup, "TOPRIGHT", -6,-12); ddBarColor:SetPoint("TOPLEFT",COgroup,"TOPLEFT",4,-10); ddBarColor:Show(); lblFhealthColor = VFLUI.MakeLabel(nil, fdlg, "Full Health Color"); lblFhealthColor:SetPoint("TOPLEFT", ddBarColor, "BOTTOMLEFT",2,-2); lblFhealthColor:SetHeight(18); colorFH = VFLUI.ColorSwatch:new(fdlg); local FHfeat = RDXDB.GetObjectData("RaidFrames:feature_FullColor"); local FHdata = FHfeat.data; colorFH:SetPoint("TOPRIGHT", ddBarColor, "BOTTOMRIGHT", -2,-2); colorFH:SetColor(explodeRGBA(FHdata.color)); colorFH:Show(); dtex = colorFH:CreateTexture(); dtex:SetTexture(0.5, 0.5, 0.5, 0.5); dtex:SetPoint("TOPLEFT", colorFH, "TOPLEFT"); dtex:SetPoint("BOTTOMRIGHT", colorFH, "BOTTOMRIGHT"); dtex:Show(); colorFH:SetDisabledTexture(dtex); lblLhealthColor = VFLUI.MakeLabel(nil, fdlg, "Low Health Color"); lblLhealthColor:SetPoint("TOPLEFT", lblFhealthColor, "BOTTOMLEFT",0,-1); lblLhealthColor:SetHeight(18); colorLH = VFLUI.ColorSwatch:new(fdlg); local LHfeat = RDXDB.GetObjectData("RaidFrames:feature_LowColor"); local LHdata = LHfeat.data; colorLH:SetPoint("TOPLEFT", colorFH, "BOTTOMLEFT", 0,-3); colorLH:SetColor(explodeRGBA(LHdata.color)); colorLH:Show(); d2tex = colorLH:CreateTexture(); d2tex:SetTexture(0.5, 0.5, 0.5, 0.5); d2tex:SetPoint("TOPLEFT", colorLH, "TOPLEFT"); d2tex:SetPoint("BOTTOMRIGHT", colorLH, "BOTTOMRIGHT"); d2tex:Show(); colorLH:SetDisabledTexture(d2tex); lblBGhealthColor = VFLUI.MakeLabel(nil, fdlg, "Background Color"); lblBGhealthColor:SetPoint("TOPLEFT", lblLhealthColor, "BOTTOMLEFT",0,-1); lblBGhealthColor:SetHeight(18); colorBG = VFLUI.ColorSwatch:new(fdlg); local BGfeat = RDXDB.GetObjectData("RaidFrames:feature_colorSFback"); local BGdata = BGfeat.data; colorBG:SetPoint("TOPLEFT", colorLH, "BOTTOMLEFT", 0,-3); colorBG:SetColor(explodeRGBA(BGdata.color)); colorBG:Show(); local lblHighlightColor = VFLUI.MakeLabel(nil, fdlg, "Primary Highlight Color"); lblHighlightColor:SetPoint("TOPLEFT", lblBGhealthColor, "BOTTOMLEFT",0,-1); lblHighlightColor:SetHeight(18); local colorH = VFLUI.ColorSwatch:new(fdlg); local Hfeat = RDXDB.GetObjectData("RaidFrames:feature_colorHighlight"); local Hdata = Hfeat.data; colorH:SetPoint("TOPLEFT", colorBG, "BOTTOMLEFT", 0,-3); colorH:SetColor(explodeRGBA(Hdata.color)); colorH:Show(); local lblShighlightColor = VFLUI.MakeLabel(nil, fdlg, "Secondary Highlight Color"); lblShighlightColor:SetPoint("TOPLEFT", lblHighlightColor, "BOTTOMLEFT",0,-1); lblShighlightColor:SetHeight(18); local colorSH = VFLUI.ColorSwatch:new(fdlg); local SHfeat = RDXDB.GetObjectData("RaidFrames:feature_colorHighlight2"); local SHdata = SHfeat.data; colorSH:SetPoint("TOPLEFT", colorH, "BOTTOMLEFT", 0,-3); colorSH:SetColor(explodeRGBA(SHdata.color)); colorSH:Show(); local lblHotColor = VFLUI.MakeLabel(nil, fdlg, "Has Your HOT Color"); lblHotColor:SetPoint("TOPLEFT", lblShighlightColor, "BOTTOMLEFT",0,-1); lblHotColor:SetHeight(18); local colorHOT = VFLUI.ColorSwatch:new(fdlg); local HOTfeat = RDXDB.GetObjectData("RaidFrames:feature_colorHotBar"); local HOTdata = HOTfeat.data; colorHOT:SetPoint("TOPLEFT", colorSH, "BOTTOMLEFT", 0,-3); colorHOT:SetColor(explodeRGBA(HOTdata.color)); colorHOT:Show(); -- Buff Options local Bradio = VFLUI.RadioGroup:new(fdlg); Bradio:SetPoint("TOPLEFT", Bgroup, "TOPLEFT",2,-2); Bradio:Show(); Bradio:SetLayout(4, 1); Bradio.buttons[1]:SetText("Show Buffs Only"); Bradio.buttons[2]:SetText("Show Debuffs Only"); Bradio.buttons[3]:SetText("Show Buffs if no Debuffs"); Bradio.buttons[4]:SetText("Show no Buffs or Debuffs"); Bradio:SetWidth(190); Bradio:DialogOnLayout(); Bradio:SetHeight(155); --Text texture options local lblDruidHot = VFLUI.MakeLabel(nil, fdlg, "Druid Heal-Over-Time"); lblDruidHot:SetPoint("TOPLEFT", TXgroup, "TOPLEFT",6,-10); lblDruidHot:SetHeight(25); local ddDruidHot = VFLUI.Dropdown:new(fdlg, fnDruidHots); ddDruidHot:SetPoint("LEFT", lblDruidHot, "RIGHT", 55,-2); ddDruidHot:SetPoint("TOPRIGHT", TXgroup, "TOPRIGHT", -6,-12); ddDruidHot:SetSelection(druidHots[RF_OPTIONS.DRUIDHOT].text); ddDruidHot:Show(); local lblPriestTrack = VFLUI.MakeLabel(nil, fdlg, "Priest Tracking"); lblPriestTrack:SetPoint("TOPLEFT", lblDruidHot, "BOTTOMLEFT",0,-4); lblPriestTrack:SetHeight(25); local ddPriestTrack = VFLUI.Dropdown:new(fdlg, fnPriestTrack); ddPriestTrack:SetPoint("TOPLEFT", ddDruidHot, "BOTTOMLEFT", 0,-4); ddPriestTrack:SetPoint("TOPRIGHT", ddDruidHot, "BOTTOMRIGHT", 0,-4); ddPriestTrack:SetSelection(priestTack[RF_OPTIONS.PRIESTTRACK].text); ddPriestTrack:Show(); local lblHealthFormat = VFLUI.MakeLabel(nil, fdlg, "Health Text Format"); lblHealthFormat:SetPoint("TOPLEFT", lblPriestTrack, "BOTTOMLEFT",0,-4); lblHealthFormat:SetHeight(25); local ddHealthFormat = VFLUI.Dropdown:new(fdlg, fnFormatOptions); ddHealthFormat:SetPoint("TOPLEFT", ddPriestTrack, "BOTTOMLEFT", 0,-4); ddHealthFormat:SetPoint("TOPRIGHT", ddPriestTrack, "BOTTOMRIGHT", 0,-4); ddHealthFormat:SetSelection(formatOptions[RF_OPTIONS.TEXTFORMAT].text); ddHealthFormat:Show(); local lbltex = VFLUI.MakeLabel(nil, fdlg, "Health Bar Texture"); lbltex:SetPoint("TOPLEFT", lblHealthFormat, "BOTTOMLEFT",0,-4); lbltex:SetHeight(25); local x = RDXDB.GetObjectData("RaidFrames:feature_texHpbar"); local texData=x.data; local tsel = VFLUI.MakeTextureSelectButton(fdlg, texData.texture); tsel:SetPoint("TOPLEFT", ddHealthFormat, "BOTTOMLEFT", 0,-4); tsel:SetPoint("TOPRIGHT", ddHealthFormat, "BOTTOMRIGHT", 0,-4); tsel:Show(); local lblAlpha = VFLUI.MakeLabel(nil, fdlg, "Out-of-Range Tranparency"); lblAlpha:SetPoint("TOPLEFT", lbltex, "BOTTOMLEFT",0,-8); lblAlpha:SetHeight(25); lblAlpha:SetPoint("RIGHT", TXgroup, "RIGHT", -40, 0); local edit_alpha = VFLUI.Edit:new(fdlg); edit_alpha:SetWidth(34); edit_alpha:SetHeight(25); edit_alpha:SetPoint("LEFT", lblAlpha, "RIGHT", 0, 0); edit_alpha:SetText(getAlpha("RaidFrames:unitFrame_hpCurMax")); edit_alpha:Show(); local lblDS = VFLUI.MakeLabel(nil, fdlg, "Text Drop Shadows"); lblDS:SetPoint("TOPLEFT", lblAlpha, "BOTTOMLEFT",0,-6); lblDS:SetHeight(16); lblDS:SetPoint("RIGHT", TXgroup, "RIGHT",-26, 0); local chk_ds = VFLUI.Checkbox:new(fdlg); chk_ds:SetHeight(16); chk_ds:SetWidth(40); chk_ds:SetPoint("LEFT", lblDS, "RIGHT", 0, 0); chk_ds:SetText(""); chk_ds:Show(); local lblHot = VFLUI.MakeLabel(nil, fdlg, "Replace group number with HOT count"); lblHot:SetPoint("TOPLEFT", lblDS, "BOTTOMLEFT",0,-8); lblHot:SetHeight(16); lblHot:SetPoint("RIGHT", TXgroup, "RIGHT",-26, 0); local chk_hot = VFLUI.Checkbox:new(fdlg); chk_hot:SetHeight(16); chk_hot:SetWidth(40); chk_hot:SetPoint("LEFT", lblHot, "RIGHT", 0, 0); chk_hot:SetText(""); chk_hot:Show(); local lblHotBar = VFLUI.MakeLabel(nil, fdlg, "Display HOT timer bars"); lblHotBar:SetPoint("TOPLEFT", lblHot, "BOTTOMLEFT",0,-8); lblHotBar:SetHeight(16); lblHotBar:SetPoint("RIGHT", TXgroup, "RIGHT",-26, 0); local chk_hotbar = VFLUI.Checkbox:new(fdlg); chk_hotbar:SetHeight(16); chk_hotbar:SetWidth(40); chk_hotbar:SetPoint("LEFT", lblHotBar, "RIGHT", 0, 0); chk_hotbar:SetText(""); chk_hotbar:Show(); local lblTitleBar = VFLUI.MakeLabel(nil, fdlg, "Display window title bar"); lblTitleBar:SetPoint("TOPLEFT", lblHotBar, "BOTTOMLEFT",0,-8); lblTitleBar:SetHeight(16); lblTitleBar:SetPoint("RIGHT", TXgroup, "RIGHT",-26, 0); local chk_titlebar = VFLUI.Checkbox:new(fdlg); chk_titlebar:SetHeight(16); chk_titlebar:SetWidth(40); chk_titlebar:SetPoint("LEFT", lblTitleBar, "RIGHT", 0, 0); chk_titlebar:SetText(""); chk_titlebar:Show(); local lblanimate = VFLUI.MakeLabel(nil, fdlg, "Animate health changes"); lblanimate:SetPoint("TOPLEFT", lblTitleBar, "BOTTOMLEFT",0,-8); lblanimate:SetHeight(16); lblanimate:SetPoint("RIGHT", TXgroup, "RIGHT",-26, 0); local chk_animate = VFLUI.Checkbox:new(fdlg); chk_animate:SetHeight(16); chk_animate:SetWidth(40); chk_animate:SetPoint("LEFT", lblanimate, "RIGHT", 0, 0); chk_animate:SetText(""); chk_animate:Show(); --frame select clicks radio.buttons[1].button:SetScript("OnClick", function() checks.checkBox[3]:Show(); checks.checkBox[1]:Hide(); Bradio.buttons[1]:Show(); Bradio.buttons[3]:Show(); radio:SetValue(1); --checks.checkBox[1]:SetChecked(RF_OPTIONS.PREHEALTH); checks.checkBox[2]:SetChecked(RF_OPTIONS.MANABAR); checks.checkBox[3]:SetChecked(RF_OPTIONS.CASTINGBAR); ddBarColor:SetSelection(BarColors[RF_OPTIONS.BARCOLOR].text); chk_ds:SetChecked(RF_OPTIONS.DS); chk_titlebar:SetChecked(RF_OPTIONS.TB); Bradio:SetValue(RF_OPTIONS.BUFFSELECTED); ddHealthFormat:Show(); lblHealthFormat:Show(); ddHealthFormat:SetSelection(formatOptions[RF_OPTIONS.TEXTFORMAT_DEF].text); BGfeat = RDXDB.GetObjectData("RaidFrames:feature_colorDback"); BGdata = BGfeat.data; colorBG:SetColor(explodeRGBA(BGdata.color)); x = RDXDB.GetObjectData("RaidFrames:feature_texHpbar"); texData=x.data; tsel:Destroy(); tsel = VFLUI.MakeTextureSelectButton(fdlg, texData.texture); tsel:SetPoint("TOPLEFT", ddHealthFormat, "BOTTOMLEFT", 0,-4); tsel:SetPoint("TOPRIGHT", ddHealthFormat, "BOTTOMRIGHT", 0,-4); tsel:Show(); end); radio.buttons[2].button:SetScript("OnClick", function() checks.checkBox[3]:Show(); checks.checkBox[1]:Show(); Bradio.buttons[1]:Show(); Bradio.buttons[3]:Show(); radio:SetValue(2); checks.checkBox[1]:SetChecked(RF_OPTIONS.PREHEALTH); checks.checkBox[2]:SetChecked(RF_OPTIONS.MANABAR); checks.checkBox[3]:SetChecked(RF_OPTIONS.CASTINGBAR); ddBarColor:SetSelection(BarColors[RF_OPTIONS.BARCOLOR].text); chk_ds:SetChecked(RF_OPTIONS.DS); chk_titlebar:SetChecked(RF_OPTIONS.TB); Bradio:SetValue(RF_OPTIONS.BUFFSELECTED); ddHealthFormat:Show(); lblHealthFormat:Show(); ddHealthFormat:SetSelection(formatOptions[RF_OPTIONS.TEXTFORMAT_DEF].text); BGfeat = RDXDB.GetObjectData("RaidFrames:feature_colorDback"); BGdata = BGfeat.data; colorBG:SetColor(explodeRGBA(BGdata.color)); x = RDXDB.GetObjectData("RaidFrames:feature_texHpbar"); texData=x.data; tsel:Destroy(); tsel = VFLUI.MakeTextureSelectButton(fdlg, texData.texture); tsel:SetPoint("TOPLEFT", ddHealthFormat, "BOTTOMLEFT", 0,-4); tsel:SetPoint("TOPRIGHT", ddHealthFormat, "BOTTOMRIGHT", 0,-4); tsel:Show(); end); radio.buttons[3].button:SetScript("OnClick", function() checks.checkBox[3]:Hide(); checks.checkBox[1]:Show(); Bradio.buttons[1]:Show(); Bradio.buttons[3]:Show(); radio:SetValue(3); checks.checkBox[1]:SetChecked(RF_OPTIONS.PREHEALTH_SR); checks.checkBox[2]:SetChecked(RF_OPTIONS.MANABAR_SR); checks.checkBox[3]:SetChecked(RF_OPTIONS.CASTINGBAR_SR); ddBarColor:SetSelection(BarColors[RF_OPTIONS.BARCOLOR_SR].text); chk_ds:SetChecked(RF_OPTIONS.DS_SR); chk_titlebar:SetChecked(RF_OPTIONS.TB_SR); Bradio:SetValue(RF_OPTIONS.BUFFSELECTED_SR); ddHealthFormat:Show(); lblHealthFormat:Show(); ddHealthFormat:SetSelection(formatOptions[RF_OPTIONS.TEXTFORMAT_SR].text); BGfeat = RDXDB.GetObjectData("RaidFrames:feature_colorSRback"); BGdata = BGfeat.data; colorBG:SetColor(explodeRGBA(BGdata.color)); x = RDXDB.GetObjectData("RaidFrames:feature_texHpbarSF"); texData=x.data; tsel:Destroy(); tsel = VFLUI.MakeTextureSelectButton(fdlg, texData.texture); tsel:SetPoint("TOPLEFT", ddHealthFormat, "BOTTOMLEFT", 0,-4); tsel:SetPoint("TOPRIGHT", ddHealthFormat, "BOTTOMRIGHT", 0,-4); tsel:Show(); end); radio.buttons[4].button:SetScript("OnClick", function() checks.checkBox[3]:Hide(); checks.checkBox[1]:Show(); Bradio.buttons[1]:Show(); Bradio.buttons[3]:Show(); radio:SetValue(4); checks.checkBox[1]:SetChecked(RF_OPTIONS.PREHEALTH_PR); checks.checkBox[2]:SetChecked(RF_OPTIONS.MANABAR_PR); checks.checkBox[3]:SetChecked(RF_OPTIONS.CASTINGBAR_PR); ddBarColor:SetSelection(BarColors[RF_OPTIONS.BARCOLOR_PR].text); chk_ds:SetChecked(RF_OPTIONS.DS_PR); chk_titlebar:SetChecked(RF_OPTIONS.TB_PR); Bradio:SetValue(RF_OPTIONS.BUFFSELECTED_PR); ddHealthFormat:Show(); lblHealthFormat:Show(); ddHealthFormat:SetSelection(formatOptions[RF_OPTIONS.TEXTFORMAT_PR].text); BGfeat = RDXDB.GetObjectData("RaidFrames:feature_colorPRback"); BGdata = BGfeat.data; colorBG:SetColor(explodeRGBA(BGdata.color)); x = RDXDB.GetObjectData("RaidFrames:feature_texHpbarPR"); texData=x.data; tsel:Destroy(); tsel = VFLUI.MakeTextureSelectButton(fdlg, texData.texture); tsel:SetPoint("TOPLEFT", ddHealthFormat, "BOTTOMLEFT", 0,-4); tsel:SetPoint("TOPRIGHT", ddHealthFormat, "BOTTOMRIGHT", 0,-4); tsel:Show(); end); radio.buttons[5].button:SetScript("OnClick", function() checks.checkBox[3]:Hide(); checks.checkBox[1]:Show(); Bradio.buttons[1]:Hide(); Bradio.buttons[3]:Hide(); --lblHealthFormat:SetTextColor(0.5, 0.5, 0.5); --ddHealthFormat:Disable(); radio:SetValue(5); checks.checkBox[1]:SetChecked(RF_OPTIONS.PREHEALTH_GR); checks.checkBox[2]:SetChecked(RF_OPTIONS.MANABAR_GR); checks.checkBox[3]:SetChecked(RF_OPTIONS.CASTINGBAR_GR); ddBarColor:SetSelection(BarColors[RF_OPTIONS.BARCOLOR_GR].text); chk_ds:SetChecked(RF_OPTIONS.DS_GR); chk_titlebar:SetChecked(RF_OPTIONS.TB_GR); Bradio:SetValue(RF_OPTIONS.BUFFSELECTED_GR); ddHealthFormat:Hide(); lblHealthFormat:Hide(); --ddHealthFormat:SetSelection(formatOptions[RF_OPTIONS.TEXTFORMAT_GR].text); BGfeat = RDXDB.GetObjectData("RaidFrames:feature_colorGRback"); BGdata = BGfeat.data; colorBG:SetColor(explodeRGBA(BGdata.color)); x = RDXDB.GetObjectData("RaidFrames:feature_texHpbarGR"); texData=x.data; tsel:Destroy(); tsel = VFLUI.MakeTextureSelectButton(fdlg, texData.texture); tsel:SetPoint("TOPLEFT", ddHealthFormat, "BOTTOMLEFT", 0,-4); tsel:SetPoint("TOPRIGHT", ddHealthFormat, "BOTTOMRIGHT", 0,-4); tsel:Show(); end); radio.buttons[6].button:SetScript("OnClick", function() checks.checkBox[3]:Hide(); checks.checkBox[1]:Hide(); Bradio.buttons[1]:Hide(); Bradio.buttons[3]:Hide(); --lblHealthFormat:SetTextColor(0.5, 0.5, 0.5); --ddHealthFormat:Disable(); radio:SetValue(6); checks.checkBox[1]:SetChecked(RF_OPTIONS.PREHEALTH_GR); checks.checkBox[2]:SetChecked(RF_OPTIONS.MANABAR_GR); checks.checkBox[3]:SetChecked(RF_OPTIONS.CASTINGBAR_GR); ddHealthFormat:Hide(); lblHealthFormat:Hide(); ddBarColor:SetSelection(BarColors[RF_OPTIONS.BARCOLOR_GR].text); chk_ds:SetChecked(RF_OPTIONS.DS_GR); chk_titlebar:SetChecked(RF_OPTIONS.TB_GR); Bradio:SetValue(RF_OPTIONS.BUFFSELECTED_GR); --ddHealthFormat:SetSelection(formatOptions[RF_OPTIONS.TEXTFORMAT_GR].text); BGfeat = RDXDB.GetObjectData("RaidFrames:feature_colorGRback"); BGdata = BGfeat.data; colorBG:SetColor(explodeRGBA(BGdata.color)); x = RDXDB.GetObjectData("RaidFrames:feature_texHpbarGRW"); texData=x.data; tsel:Destroy(); tsel = VFLUI.MakeTextureSelectButton(fdlg, texData.texture); tsel:SetPoint("TOPLEFT", ddHealthFormat, "BOTTOMLEFT", 0,-4); tsel:SetPoint("TOPRIGHT", ddHealthFormat, "BOTTOMRIGHT", 0,-4); tsel:Show(); end); --init shit radio:SetValue(RF_OPTIONS.FRAMESELECTED); chk_hot:SetChecked(RF_OPTIONS.HOT); chk_hotbar:SetChecked(RF_OPTIONS.HOTBAR); chk_animate:SetChecked(RF_OPTIONS.ANIMATE); if RF_OPTIONS.FRAMESELECTED == 1 then checks.checkBox[1]:Hide(); --checks.checkBox[1]:SetChecked(RF_OPTIONS.PREHEALTH); checks.checkBox[2]:SetChecked(RF_OPTIONS.MANABAR); checks.checkBox[3]:SetChecked(RF_OPTIONS.CASTINGBAR); ddBarColor:SetSelection(BarColors[RF_OPTIONS.BARCOLOR].text); Bradio:SetValue(RF_OPTIONS.BUFFSELECTED); ddHealthFormat:SetSelection(formatOptions[RF_OPTIONS.TEXTFORMAT_DEF].text); BGfeat = RDXDB.GetObjectData("RaidFrames:feature_colorDback"); BGdata = BGfeat.data; colorBG:SetColor(explodeRGBA(BGdata.color)); x = RDXDB.GetObjectData("RaidFrames:feature_texHpbar"); texData=x.data; tsel:Destroy(); tsel = VFLUI.MakeTextureSelectButton(fdlg, texData.texture); tsel:SetPoint("TOPLEFT", ddHealthFormat, "BOTTOMLEFT", 0,-4); tsel:SetPoint("TOPRIGHT", ddHealthFormat, "BOTTOMRIGHT", 0,-4); tsel:Show(); chk_ds:SetChecked(RF_OPTIONS.DS); chk_titlebar:SetChecked(RF_OPTIONS.TB); end if RF_OPTIONS.FRAMESELECTED == 2 then checks.checkBox[1]:SetChecked(RF_OPTIONS.PREHEALTH); checks.checkBox[2]:SetChecked(RF_OPTIONS.MANABAR); checks.checkBox[3]:SetChecked(RF_OPTIONS.CASTINGBAR); ddBarColor:SetSelection(BarColors[RF_OPTIONS.BARCOLOR].text); Bradio:SetValue(RF_OPTIONS.BUFFSELECTED); ddHealthFormat:SetSelection(formatOptions[RF_OPTIONS.TEXTFORMAT_DEF].text); BGfeat = RDXDB.GetObjectData("RaidFrames:feature_colorDback"); BGdata = BGfeat.data; colorBG:SetColor(explodeRGBA(BGdata.color)); x = RDXDB.GetObjectData("RaidFrames:feature_texHpbar"); texData=x.data; tsel:Destroy(); tsel = VFLUI.MakeTextureSelectButton(fdlg, texData.texture); tsel:SetPoint("TOPLEFT", ddHealthFormat, "BOTTOMLEFT", 0,-4); tsel:SetPoint("TOPRIGHT", ddHealthFormat, "BOTTOMRIGHT", 0,-4); tsel:Show(); chk_ds:SetChecked(RF_OPTIONS.DS); chk_titlebar:SetChecked(RF_OPTIONS.TB); end if RF_OPTIONS.FRAMESELECTED == 3 then checks.checkBox[3]:Hide(); Bradio.buttons[1]:Show(); Bradio.buttons[3]:Show(); checks.checkBox[1]:SetChecked(RF_OPTIONS.PREHEALTH_SR); checks.checkBox[2]:SetChecked(RF_OPTIONS.MANABAR_SR); checks.checkBox[3]:SetChecked(RF_OPTIONS.CASTINGBAR_SR); ddBarColor:SetSelection(BarColors[RF_OPTIONS.BARCOLOR_SR].text); Bradio:SetValue(RF_OPTIONS.BUFFSELECTED_SR); ddHealthFormat:SetSelection(formatOptions[RF_OPTIONS.TEXTFORMAT_SR].text); BGfeat = RDXDB.GetObjectData("RaidFrames:feature_colorSRback"); BGdata = BGfeat.data; colorBG:SetColor(explodeRGBA(BGdata.color)); x = RDXDB.GetObjectData("RaidFrames:feature_texHpbarSF"); texData=x.data; tsel:Destroy(); tsel = VFLUI.MakeTextureSelectButton(fdlg, texData.texture); tsel:SetPoint("TOPLEFT", ddHealthFormat, "BOTTOMLEFT", 0,-4); tsel:SetPoint("TOPRIGHT", ddHealthFormat, "BOTTOMRIGHT", 0,-4); tsel:Show(); chk_ds:SetChecked(RF_OPTIONS.DS_SR); chk_titlebar:SetChecked(RF_OPTIONS.TB_SR); end if RF_OPTIONS.FRAMESELECTED == 4 then checks.checkBox[3]:Hide(); Bradio.buttons[1]:Show(); Bradio.buttons[3]:Show(); checks.checkBox[1]:SetChecked(RF_OPTIONS.PREHEALTH_PR); checks.checkBox[2]:SetChecked(RF_OPTIONS.MANABAR_PR); checks.checkBox[3]:SetChecked(RF_OPTIONS.CASTINGBAR_PR); ddBarColor:SetSelection(BarColors[RF_OPTIONS.BARCOLOR_PR].text); Bradio:SetValue(RF_OPTIONS.BUFFSELECTED_PR); ddHealthFormat:SetSelection(formatOptions[RF_OPTIONS.TEXTFORMAT_PR].text); BGfeat = RDXDB.GetObjectData("RaidFrames:feature_colorPRback"); BGdata = BGfeat.data; colorBG:SetColor(explodeRGBA(BGdata.color)); x = RDXDB.GetObjectData("RaidFrames:feature_texHpbarPR"); texData=x.data; tsel:Destroy(); tsel = VFLUI.MakeTextureSelectButton(fdlg, texData.texture); tsel:SetPoint("TOPLEFT", ddHealthFormat, "BOTTOMLEFT", 0,-4); tsel:SetPoint("TOPRIGHT", ddHealthFormat, "BOTTOMRIGHT", 0,-4); tsel:Show(); chk_ds:SetChecked(RF_OPTIONS.DS_PR); chk_titlebar:SetChecked(RF_OPTIONS.TB_PR); end if RF_OPTIONS.FRAMESELECTED == 5 then checks.checkBox[3]:Hide(); Bradio.buttons[1]:Hide(); Bradio.buttons[3]:Hide(); --lblHealthFormat:SetTextColor(0.5, 0.5, 0.5); --ddHealthFormat:Disable(); checks.checkBox[1]:SetChecked(RF_OPTIONS.PREHEALTH_GR); checks.checkBox[2]:SetChecked(RF_OPTIONS.MANABAR_GR); checks.checkBox[3]:SetChecked(RF_OPTIONS.CASTINGBAR_GR); ddBarColor:SetSelection(BarColors[RF_OPTIONS.BARCOLOR_GR].text); Bradio:SetValue(RF_OPTIONS.BUFFSELECTED_GR); ddHealthFormat:Hide(); lblHealthFormat:Hide(); --ddHealthFormat:SetSelection(formatOptions[RF_OPTIONS.TEXTFORMAT_GR].text); BGfeat = RDXDB.GetObjectData("RaidFrames:feature_colorGRback"); BGdata = BGfeat.data; colorBG:SetColor(explodeRGBA(BGdata.color)); x = RDXDB.GetObjectData("RaidFrames:feature_texHpbarGR"); texData=x.data; tsel:Destroy(); tsel = VFLUI.MakeTextureSelectButton(fdlg, texData.texture); tsel:SetPoint("TOPLEFT", ddHealthFormat, "BOTTOMLEFT", 0,-4); tsel:SetPoint("TOPRIGHT", ddHealthFormat, "BOTTOMRIGHT", 0,-4); tsel:Show(); chk_ds:SetChecked(RF_OPTIONS.DS_GR); chk_titlebar:SetChecked(RF_OPTIONS.TB_GR); end if RF_OPTIONS.FRAMESELECTED == 6 then checks.checkBox[1]:Hide(); checks.checkBox[3]:Hide(); Bradio.buttons[1]:Hide(); Bradio.buttons[3]:Hide(); --lblHealthFormat:SetTextColor(0.5, 0.5, 0.5); --ddHealthFormat:Disable(); checks.checkBox[1]:SetChecked(RF_OPTIONS.PREHEALTH_GR); checks.checkBox[2]:SetChecked(RF_OPTIONS.MANABAR_GR); checks.checkBox[3]:SetChecked(RF_OPTIONS.CASTINGBAR_GR); ddBarColor:SetSelection(BarColors[RF_OPTIONS.BARCOLOR_GR].text); Bradio:SetValue(RF_OPTIONS.BUFFSELECTED_GR); ddHealthFormat:Hide(); lblHealthFormat:Hide(); --ddHealthFormat:SetSelection(formatOptions[RF_OPTIONS.TEXTFORMAT_GR].text); BGfeat = RDXDB.GetObjectData("RaidFrames:feature_colorGRback"); BGdata = BGfeat.data; colorBG:SetColor(explodeRGBA(BGdata.color)); x = RDXDB.GetObjectData("RaidFrames:feature_texHpbarGRW"); texData=x.data; tsel:Destroy(); tsel = VFLUI.MakeTextureSelectButton(fdlg, texData.texture); tsel:SetPoint("TOPLEFT", ddHealthFormat, "BOTTOMLEFT", 0,-4); tsel:SetPoint("TOPRIGHT", ddHealthFormat, "BOTTOMRIGHT", 0,-4); tsel:Show(); chk_ds:SetChecked(RF_OPTIONS.DS_GR); chk_titlebar:SetChecked(RF_OPTIONS.TB_GR); end --Apply & Close Button eschRF = function() fdlg:Destroy(); end VFL.AddEscapeHandler(eschRF); local btnClose = VFLUI.CloseButton:new(fdlg); fdlg:AddButton(btnClose); btnClose:SetScript("OnClick", function() VFL.EscapeTo(eschRF); end); local btnOK = VFLUI.OKButton:new(fdlg); btnOK:SetText("Apply"); btnOK:SetHeight(25); btnOK:SetWidth(75); btnOK:SetPoint("BOTTOMRIGHT", fdlg:GetClientArea(), "BOTTOMRIGHT"); btnOK:Show(); btnOK:SetScript("OnClick", function() RF_OPTIONS.FRAMESELECTED=radio:GetValue(); local mb = ""; local cb = ""; local ph = ""; if not setAlphaGlobal(edit_alpha:GetText()) then return; end saveVars("ph",checks.checkBox[1]:GetChecked()); saveVars("ma",checks.checkBox[2]:GetChecked()); saveVars("dgt",checks.checkBox[3]:GetChecked()); if(checkDropShadow(RF_OPTIONS.FRAMESELECTED,chk_ds:GetChecked())) then saveVars("ds",chk_ds:GetChecked()); toggleDropShadows(chk_ds:GetChecked(),RF_OPTIONS.FRAMESELECTED); end saveVars("tb",chk_titlebar:GetChecked()); toggleWindowFrames(chk_titlebar:GetChecked()); saveVars("an",chk_animate:GetChecked()); toggleAnimations(chk_animate:GetChecked()); saveVars("hot",chk_hot:GetChecked()); saveVars("hotbar",chk_hotbar:GetChecked()); if chk_hotbar:GetChecked() then RDXDB.Copy("RaidFrames:sh_HFtrue", "RaidFrames:sh_HFcurr"); else RDXDB.Copy("RaidFrames:sh_HFfalse", "RaidFrames:sh_HFcurr"); end if checks.checkBox[1]:GetChecked() then ph="Ph"; end if checks.checkBox[2]:GetChecked() then mb="Mana"; end if checks.checkBox[3]:GetChecked() then cb="Dgt"; end if radio:GetValue() == 1 then RDXDB.Copy("RaidFrames:feature_hpCurMax" .. mb .. cb .. "PhBorder", "RaidFrames:feature_sortUnit"); RDXDB.Copy("RaidFrames:feature_hpCurMax" .. mb .. cb .. "PhBorder", "RaidFrames:feature_groupUnit"); RDXDB.Copy("RaidFrames:feature_hpCurMax" .. mb .. cb .. "PhBorder", "RaidFrames:feature_oddEvenUnit"); RDXDB.Copy("RaidFrames:feature_hpCurMax" .. mb .. cb .. "PhBorder", "RaidFrames:feature_10manUnit"); RDXDB.Copy("RFDispell:feature_UF" .. mb, "RFDispell:feature_UF_current"); elseif radio:GetValue() == 2 then RDXDB.Copy("RaidFrames:feature_hpCurMax" .. mb .. cb .. ph, "RaidFrames:feature_sortUnit"); RDXDB.Copy("RaidFrames:feature_hpCurMax" .. mb .. cb .. ph, "RaidFrames:feature_groupUnit"); RDXDB.Copy("RaidFrames:feature_hpCurMax" .. mb .. cb .. ph, "RaidFrames:feature_oddEvenUnit"); RDXDB.Copy("RaidFrames:feature_hpCurMax" .. mb .. cb .. ph, "RaidFrames:feature_10manUnit"); RDXDB.Copy("RFDispell:feature_UF" .. mb, "RFDispell:feature_UF_current"); elseif radio:GetValue() == 3 then RDXDB.Copy("RaidFrames:feature_sRaidFrames" .. mb .. ph, "RaidFrames:feature_sortUnit"); RDXDB.Copy("RaidFrames:feature_sRaidFrames" .. mb .. ph, "RaidFrames:feature_groupUnit"); RDXDB.Copy("RaidFrames:feature_sRaidFrames" .. mb .. ph, "RaidFrames:feature_oddEvenUnit"); RDXDB.Copy("RaidFrames:feature_sRaidFrames" .. mb .. ph, "RaidFrames:feature_10manUnit"); elseif radio:GetValue() == 4 then RDXDB.Copy("RaidFrames:feature_perfectRaid" .. mb .. ph, "RaidFrames:feature_sortUnit"); RDXDB.Copy("RaidFrames:feature_perfectRaid" .. mb .. ph, "RaidFrames:feature_groupUnit"); RDXDB.Copy("RaidFrames:feature_perfectRaid" .. mb .. ph, "RaidFrames:feature_oddEvenUnit"); RDXDB.Copy("RaidFrames:feature_perfectRaid" .. mb .. ph, "RaidFrames:feature_10manUnit"); elseif radio:GetValue() == 5 then RDXDB.Copy("RaidFrames:feature_grid" .. mb .. ph, "RaidFrames:feature_sortUnit"); RDXDB.Copy("RaidFrames:feature_grid" .. mb .. ph, "RaidFrames:feature_groupUnit"); RDXDB.Copy("RaidFrames:feature_grid" .. mb .. ph, "RaidFrames:feature_oddEvenUnit"); RDXDB.Copy("RaidFrames:feature_grid" .. mb .. ph, "RaidFrames:feature_10manUnit"); else RDXDB.Copy("RaidFrames:feature_gridWide" .. mb, "RaidFrames:feature_sortUnit"); RDXDB.Copy("RaidFrames:feature_gridWide" .. mb, "RaidFrames:feature_groupUnit"); RDXDB.Copy("RaidFrames:feature_gridWide" .. mb, "RaidFrames:feature_oddEvenUnit"); RDXDB.Copy("RaidFrames:feature_gridWide" .. mb, "RaidFrames:feature_10manUnit"); end if Bradio:GetValue() == 1 then RDXDB.Copy("RaidFrames:sh_Bbuff", "RaidFrames:sh_buff"); RDXDB.Copy("RaidFrames:sh_Bdebuff", "RaidFrames:sh_debuff"); elseif Bradio:GetValue() == 2 then RDXDB.Copy("RaidFrames:sh_Dbuff", "RaidFrames:sh_buff"); RDXDB.Copy("RaidFrames:sh_Ddebuff", "RaidFrames:sh_debuff"); elseif Bradio:GetValue() == 3 then RDXDB.Copy("RaidFrames:sh_BdBuff", "RaidFrames:sh_buff"); RDXDB.Copy("RaidFrames:sh_BdDebuff", "RaidFrames:sh_debuff"); else RDXDB.Copy("RaidFrames:sh_noBuff", "RaidFrames:sh_buff"); RDXDB.Copy("RaidFrames:sh_noDebuff", "RaidFrames:sh_debuff"); end saveVars("bs",Bradio:GetValue()); if(ddHealthFormat:GetSelection()=="CurrentHp(+predictedHp) / MaxHp") then saveVars("hf",1); end if(ddHealthFormat:GetSelection()=="+predicted -MissingHp") then saveVars("hf",2); end if(ddHealthFormat:GetSelection()=="-MissingHp(+predicted) / MaxHp") then saveVars("hf",3); end if(ddHealthFormat:GetSelection()=="+predicted CurrentHp") then saveVars("hf",4); end if(ddHealthFormat:GetSelection()=="+predicted% Current%") then saveVars("hf",5); end if(ddHealthFormat:GetSelection()=="No Text") then saveVars("hf",6); end Hdata.color=colorH:GetColor(); SHdata.color=colorSH:GetColor(); BGdata.color=colorBG:GetColor(); HOTdata.color=colorHOT:GetColor(); if(ddBarColor:GetSelection()=="Green -> Red") then saveVars("bc",1); setBarColor("barColor"); RDXDB.Copy("RaidFrames:feature_colorGreenRed", "RaidFrames:feature_colorBar"); end; if(ddBarColor:GetSelection()=="Static Green") then saveVars("bc",2); setBarColor("barColor"); RDXDB.Copy("RaidFrames:feature_colorGreen", "RaidFrames:feature_colorBar"); end; if(ddBarColor:GetSelection()=="Class Color") then saveVars("bc",3); setBarColor("classColor"); end; if(ddBarColor:GetSelection()=="User Defined") then saveVars("bc",4); FHdata.color=colorFH:GetColor(); LHdata.color=colorLH:GetColor(); setBarColor("barColor"); RDXDB.Copy("RaidFrames:feature_colorCustomHP", "RaidFrames:feature_colorBar"); end; if(ddDruidHot:GetSelection()=="Rejuvenation") then saveVars("dh",1); setHot("rejuvenation"); end if(ddDruidHot:GetSelection()=="Regrowth") then saveVars("dh",2); setHot("regrowth"); end if(ddDruidHot:GetSelection()=="Lifebloom") then saveVars("dh",3); setHot("lifebloom"); end if(ddPriestTrack:GetSelection()=="HOTs") then saveVars("pt",1); setTrack("renew"); end if(ddPriestTrack:GetSelection()=="Grace") then saveVars("pt",2); setTrack("grace"); end local txFeat=""; local txData=""; if RF_OPTIONS.FRAMESELECTED==1 or RF_OPTIONS.FRAMESELECTED==2 then txFeat = RDXDB.GetObjectData("RaidFrames:feature_texHpbar"); txData=txFeat.data; txData.texture=tsel:GetSelectedTexture(); txFeat = RDXDB.GetObjectData("RaidFrames:feature_texHighlight"); txData=txFeat.data; txData.texture=tsel:GetSelectedTexture(); txFeat = RDXDB.GetObjectData("RaidFrames:feature_texHighlight2"); txData=txFeat.data; txData.texture=tsel:GetSelectedTexture(); txFeat = RDXDB.GetObjectData("RaidFrames:feature_texPrehealth"); txData=txFeat.data; txData.texture=tsel:GetSelectedTexture(); txFeat = RDXDB.GetObjectData("RaidFrames:feature_texHpbarDgt"); txData=txFeat.data; txData.texture=tsel:GetSelectedTexture(); txFeat = RDXDB.GetObjectData("RaidFrames:feature_texHighlightDgt"); txData=txFeat.data; txData.texture=tsel:GetSelectedTexture(); txFeat = RDXDB.GetObjectData("RaidFrames:feature_texHighlight2Dgt"); txData=txFeat.data; txData.texture=tsel:GetSelectedTexture(); txFeat = RDXDB.GetObjectData("RaidFrames:feature_texPrehealthDgt"); txData=txFeat.data; txData.texture=tsel:GetSelectedTexture(); --assists --txFeat = RDXDB.GetObjectData("RaidFrames:feature_texHpbarAssist"); --txData=txFeat.data; --txData.texture=tsel:GetSelectedTexture(); --txFeat = RDXDB.GetObjectData("RaidFrames:feature_texHighlightAssist"); --txData=txFeat.data; --txData.texture=tsel:GetSelectedTexture(); --txFeat = RDXDB.GetObjectData("RaidFrames:feature_texPrehealthAssist"); --txData=txFeat.data; --txData.texture=tsel:GetSelectedTexture(); end --SRF if RF_OPTIONS.FRAMESELECTED==3 then txFeat = RDXDB.GetObjectData("RaidFrames:feature_texHpbarSF"); txData=txFeat.data; txData.texture=tsel:GetSelectedTexture(); txFeat = RDXDB.GetObjectData("RaidFrames:feature_texHighlightSF"); txData=txFeat.data; txData.texture=tsel:GetSelectedTexture(); txFeat = RDXDB.GetObjectData("RaidFrames:feature_texHighlight2SF"); txData=txFeat.data; txData.texture=tsel:GetSelectedTexture(); txFeat = RDXDB.GetObjectData("RaidFrames:feature_texPrehealthSF"); txData=txFeat.data; txData.texture=tsel:GetSelectedTexture(); end --PR if RF_OPTIONS.FRAMESELECTED==4 then txFeat = RDXDB.GetObjectData("RaidFrames:feature_texHpbarPR"); txData=txFeat.data; txData.texture=tsel:GetSelectedTexture(); txFeat = RDXDB.GetObjectData("RaidFrames:feature_texHighlightPR"); txData=txFeat.data; txData.texture=tsel:GetSelectedTexture(); txFeat = RDXDB.GetObjectData("RaidFrames:feature_texHighlight2PR"); txData=txFeat.data; txData.texture=tsel:GetSelectedTexture(); txFeat = RDXDB.GetObjectData("RaidFrames:feature_texPrehealthPR"); txData=txFeat.data; txData.texture=tsel:GetSelectedTexture(); end --GR if RF_OPTIONS.FRAMESELECTED==5 then txFeat = RDXDB.GetObjectData("RaidFrames:feature_texHpbarGR"); txData=txFeat.data; txData.texture=tsel:GetSelectedTexture(); txFeat = RDXDB.GetObjectData("RaidFrames:feature_texHpbarGRmana"); txData=txFeat.data; txData.texture=tsel:GetSelectedTexture(); txFeat = RDXDB.GetObjectData("RaidFrames:feature_texHighlightGR"); txData=txFeat.data; txData.texture=tsel:GetSelectedTexture(); txFeat = RDXDB.GetObjectData("RaidFrames:feature_texHighlight2GR"); txData=txFeat.data; txData.texture=tsel:GetSelectedTexture(); txFeat = RDXDB.GetObjectData("RaidFrames:feature_texPrehealthGR"); txData=txFeat.data; txData.texture=tsel:GetSelectedTexture(); txFeat = RDXDB.GetObjectData("RaidFrames:feature_texPrehealthGRmana"); txData=txFeat.data; txData.texture=tsel:GetSelectedTexture(); end if RF_OPTIONS.FRAMESELECTED==6 then txFeat = RDXDB.GetObjectData("RaidFrames:feature_texHpbarGRW"); txData=txFeat.data; txData.texture=tsel:GetSelectedTexture(); txFeat = RDXDB.GetObjectData("RaidFrames:feature_texHpbarGRWmana"); txData=txFeat.data; txData.texture=tsel:GetSelectedTexture(); txFeat = RDXDB.GetObjectData("RaidFrames:feature_texHighlightGRW"); txData=txFeat.data; txData.texture=tsel:GetSelectedTexture(); txFeat = RDXDB.GetObjectData("RaidFrames:feature_texHighlight2GRW"); txData=txFeat.data; txData.texture=tsel:GetSelectedTexture(); txFeat = RDXDB.GetObjectData("RaidFrames:feature_texPrehealthGRW"); txData=txFeat.data; txData.texture=tsel:GetSelectedTexture(); txFeat = RDXDB.GetObjectData("RaidFrames:feature_texPrehealthGRWmana"); txData=txFeat.data; txData.texture=tsel:GetSelectedTexture(); end BRF.print("Settings Changed, Frames Updated."); RDXDK.SecuredChangeDesktop(RDXDK.GetCurrentDesktopPath()); collectgarbage('collect'); end); fdlg.Destroy = VFL.hook(function(s) radio:Destroy(); radio = nil; Bradio:Destroy(); Bradio = nil; btnOK:Destroy(); btnOK = nil; btnDispel:Destroy(); btnDispel = nil; btnSorted:Destroy(); btnSorted = nil; checks:Destroy(); checks = nil; ddBarColor:Destroy(); ddBarColor = nil; ddHealthFormat:Destroy(); ddHealthFormat = nil; ddDruidHot:Destroy(); ddDruidHot = nil; ddPriestTrack:Destroy(); ddPriestTrack = nil; colorFH:Destroy(); colorFH = nil; colorLH:Destroy(); colorLH = nil; colorBG:Destroy(); colorBG = nil; chk_ds:Destroy(); chk_ds = nil; chk_hot:Destroy(); chk_hot = nil; chk_hotbar:Destroy(); chk_hotbar = nil; chk_titlebar:Destroy(); chk_titlebar = nil; chk_animate:Destroy(); chk_animate = nil; tsel:Destroy(); tsel = nil; colorH:Destroy(); colorH = nil; colorSH:Destroy(); colorSH = nil; colorHOT:Destroy(); colorHOT = nil; SFgroup:Destroy(); SFgroup =nil; UFgroup:Destroy(); UFgroup =nil; COgroup:Destroy(); COgroup =nil; Bgroup:Destroy(); Bgroup =nil; TXgroup:Destroy(); TXgroup =nil; edit_alpha:Destroy(); Destroy = nil; fdlg = nil; end, fdlg.Destroy); end; BRFmenu = RDX.Menu:new(); --RDX.RegisterMainMenuEntry("Brethren RaidFrames", true, function(tree,frame) BRFmenu:Open(tree, frame); end); local BRFmenuFront=function(entry) entry.text = "Brethren RaidFrames"; entry.color = {r=0.03, g=0.5, b=0.82}; entry.isSubmenu = true; entry.OnClick = function() BRFmenu:Open(VFL.poptree, this); end; end; RDXPM.ThirdPartyMenu:RegisterMenuFunction(BRFmenuFront); local desktop=string.lower("desktops:" .. UnitName("player") .. "_" .. string.gsub(GetRealmName(),"[ ]","_") .. "_raid"); local BRFselTempContent=function(tree, frame) local selected=""; if desktop .. "_sorted" == RDXDB.ResolvePath(desktop) then selected="Sorted"; end if desktop .. "_groups" == RDXDB.ResolvePath(desktop) then selected="Groups"; end if desktop .. "_grid" == RDXDB.ResolvePath(desktop) then selected="Grid"; end if desktop .. "_single" == RDXDB.ResolvePath(desktop) then selected="Single"; end local mnu= {}; local desktop=string.lower("desktops:" .. UnitName("player") .. "_" .. string.gsub(GetRealmName(),"[ ]","_") .. "_raid"); if desktop .. "_sorted" == RDXDB.ResolvePath(desktop) then table.insert(mnu, { text = "Sorted |cFF00FF00[SELECTED]|r", OnClick = function() switchTemplate("sorted"); tree:Release(); end }); else table.insert(mnu, { text = "Sorted", OnClick = function() switchTemplate("sorted"); tree:Release(); end }); end if desktop .. "_groups" == RDXDB.ResolvePath(desktop) then table.insert(mnu, { text = "Groups |cFF00FF00[SELECTED]|r", OnClick = function() switchTemplate("groups"); tree:Release(); end }); else table.insert(mnu, { text = "Groups", OnClick = function() switchTemplate("groups"); tree:Release(); end }); end if desktop .. "_grid" == RDXDB.ResolvePath(desktop) then table.insert(mnu, { text = "Grid |cFF00FF00[SELECTED]|r", OnClick = function() switchTemplate("grid"); tree:Release(); end }); else table.insert(mnu, { text = "Grid", OnClick = function() switchTemplate("grid"); tree:Release(); end }); end if desktop .. "_single" == RDXDB.ResolvePath(desktop) then table.insert(mnu, { text = "Single Column |cFF00FF00[SELECTED]|r", OnClick = function() switchTemplate("single"); tree:Release(); end }); else table.insert(mnu, { text = "Single Column", OnClick = function() switchTemplate("single"); tree:Release(); end }); end tree:Expand(frame, mnu); end local BRFselTemp=function(entry) local selected=""; local desktop=string.lower("desktops:" .. UnitName("player") .. "_" .. string.gsub(GetRealmName(),"[ ]","_") .. "_raid"); if desktop .. "_sorted" == RDXDB.ResolvePath(desktop) then selected="Sorted"; end if desktop .. "_groups" == RDXDB.ResolvePath(desktop) then selected="Groups"; end if desktop .. "_grid" == RDXDB.ResolvePath(desktop) then selected="Grid"; end if desktop .. "_single" == RDXDB.ResolvePath(desktop) then selected="Single"; end entry.text = "Select Raid Template (|cFF00FF00" .. selected .. "|r)"; --entry.color = {r=0.2, g=0.9, b=0.9}; entry.color = {r=0.03, g=0.5, b=0.82}; entry.isSubmenu = true; entry.OnClick = function() BRFselTempContent(VFL.poptree, this); end; end BRFmenu:RegisterMenuFunction(BRFselTemp); local BRFresTempContent=function(tree, frame) local mnu= {}; table.insert(mnu, { text = "Sorted", OnClick = function() resetTemplateAsk("sorted"); tree:Release(); end }); table.insert(mnu, { text = "Groups", OnClick = function() resetTemplateAsk("groups"); tree:Release(); end }); table.insert(mnu, { text = "Grid", OnClick = function() resetTemplateAsk("grid"); tree:Release(); end }); table.insert(mnu, { text = "Single Column", OnClick = function() resetTemplateAsk("single"); tree:Release(); end }); tree:Expand(frame, mnu); end local BRFresTemp=function(entry) local selected=""; entry.text = "Reset Raid Templates"; --entry.color = {r=0.2, g=0.9, b=0.9}; entry.color = {r=0.03, g=0.5, b=0.82}; entry.isSubmenu = true; entry.OnClick = function() BRFresTempContent(VFL.poptree, this); end; end BRFmenu:RegisterMenuFunction(BRFresTemp); local BRFmtSelContent = function(tree, frame) local mtString=""; if RDXDB.ResolvePath("Builtin:win_assist") == "RaidFrames:window_assist" then mtString="With Targets"; end if RDXDB.ResolvePath("Builtin:win_assist") == "RaidFrames:window_assist_tankOnly" then mtString="Tanks Only"; end local mnu= {}; if RDXDB.ResolvePath("Builtin:win_assist") == "RaidFrames:window_assist" then table.insert(mnu, { text = "With Targets |cFF00FF00[SELECTED]|r", OnClick = function() if (RDXDB.GetObjectInstance("Builtin:win_assist", true)) then RDXDB.OpenObject("Builtin:win_assist", "Close"); end RDXDB.SetSymLinkTarget("Builtin:win_assist","RaidFrames:window_assist"); RDXDB.OpenObject("Builtin:win_assist"); BRF.print("|cFF00FF00RaidFrames:window_assist|r is now the default MT window."); tree:Release(); end }); else table.insert(mnu, { text = "With Targets", OnClick = function() if (RDXDB.GetObjectInstance("Builtin:win_assist", true)) then RDXDB.OpenObject("Builtin:win_assist", "Close"); end RDXDB.SetSymLinkTarget("Builtin:win_assist","RaidFrames:window_assist"); RDXDB.OpenObject("Builtin:win_assist"); BRF.print("|cFF00FF00RaidFrames:window_assist|r is now the default MT window."); tree:Release(); end }); end if RDXDB.ResolvePath("Builtin:win_assist") == "RaidFrames:window_assists_tankOnly" then table.insert(mnu, { text = "Tanks Only |cFF00FF00[SELECTED]|r", OnClick = function() if (RDXDB.GetObjectInstance("Builtin:win_assist", true)) then RDXDB.OpenObject("Builtin:win_assist", "Close"); end RDXDB.SetSymLinkTarget("Builtin:win_assist","RaidFrames:window_assists_tankOnly"); RDXDB.OpenObject("Builtin:win_assist"); BRF.print("|cFF00FF00RaidFrames:window_assists_tankOnly|r is now the default MT window."); tree:Release(); end }); else table.insert(mnu, { text = "Tanks Only", OnClick = function() if (RDXDB.GetObjectInstance("Builtin:win_assist", true)) then RDXDB.OpenObject("Builtin:win_assist", "Close"); end RDXDB.SetSymLinkTarget("Builtin:win_assist","RaidFrames:window_assists_tankOnly"); RDXDB.OpenObject("Builtin:win_assist"); BRF.print("|cFF00FF00RaidFrames:window_assists_tankOnly|r is now the default MT window."); tree:Release(); end }); end tree:Expand(frame, mnu); end; local BRFmtSel=function(entry) local mtString=""; if RDXDB.ResolvePath("Builtin:win_assist") == "RaidFrames:window_assist" then mtString="With Targets"; end if RDXDB.ResolvePath("Builtin:win_assist") == "RaidFrames:window_assists_tankOnly" then mtString="Tanks Only"; end entry.text = "Select MT Window (|cFF00FF00" .. mtString .. "|r)"; --entry.color = {r=0.2, g=0.9, b=0.9}; entry.color = {r=0.03, g=0.5, b=0.82}; entry.isSubmenu = true; entry.OnClick = function() BRFmtSelContent(VFL.poptree, this); end; end BRFmenu:RegisterMenuFunction(BRFmtSel); BRFmenu:RegisterMenuEntry("Edit Bindings...", nil, function(tree, frame) tree:Release(); RDXDB.OpenObject("default:bindings", "Edit"); end); BRFmenu:RegisterMenuEntry("Edit Player Roles...", nil, function(tree, frame) tree:Release(); editRoles(); end); BRFmenu:RegisterMenuEntry("Change Settings...", nil, function(tree, frame) tree:Release(); RFSettings(); end);