this:SetBackdropBorderColor(SW_COLOR_ACT["r"],SW_COLOR_ACT["g"],SW_COLOR_ACT["b"],1); this.swoBarX = 5; this.swoBarY = -26; this.swBarSettings = {}; --table.insert(SW_Registerd_BF_Titles, this:GetName().."_Title"); if getglobal("SW_BarSettingsFrameV2"):IsVisible() then getglobal("SW_BarSettingsFrameV2"):Hide() end if SW_Settings["OPT_ShowSyncB"] ~= nil then getglobal("SW_BarFrame1_Title_Sync"):Show(); else getglobal("SW_BarFrame1_Title_Sync"):Hide(); end if SW_Settings["OPT_ShowConsoleB"] ~= nil then getglobal("SW_BarFrame1_Title_Console"):Show(); else getglobal("SW_BarFrame1_Title_Console"):Hide(); end this.oldShow = this.Show; this.oldHide = this.Hide; this.TxtToMove = getglobal(this:GetParent():GetName().."_Text"); this.TextureArrows = getglobal(this:GetName().."_Texture"); this.Show = function(self) self.TxtToMove:SetPoint("TOPLEFT", self, "TOPRIGHT", 1, -3); self.oldShow(self); end this.Hide = function(self) self.TxtToMove:SetPoint("TOPLEFT", self, "TOPLEFT", 0, -3); self.oldHide(self); end this.UpdateColor = function(self, color) if color then self.TextureArrows:SetVertexColor(unpack(color)); else self.TextureArrows:SetVertexColor(0,1,0,1); end end this:UpdateColor(); if SW_Settings["SYNCLastChan"] ~= nil then GameTooltip:SetOwner(this, "ANCHOR_LEFT"); GameTooltip:SetText(SW_GS_EditBoxes["SW_SetSyncChanTxtFrame"][2].."\r\n"..SW_Settings["SYNCLastChan"],nil,nil,nil,nil,1); end GameTooltip:Hide(); SW_Settings["SHOWMAIN"] = nil; this:GetParent():GetParent():Hide(); SW_RoundButtonRegister(this, {1,0,0,0.9}, "X"); table.insert(SW_Registered_BF_TitleButtons, this:GetName()); sF = getglobal("SW_BarSettingsFrameV2"); if sF ~= nil then if sF:IsVisible() then sF:Hide(); else getglobal("SW_BarSettings_Visuals").caller = this:GetParent():GetParent():GetName(); getglobal("SW_BarSettings_Data").caller = this:GetParent():GetParent():GetName(); getglobal("SW_BarSettings_Pets").caller = this:GetParent():GetParent():GetName(); sF:Show(); end end SW_RoundButtonRegister(this, {1,0,0,0.9}, SW_B_SETTINGS); table.insert(SW_Registered_BF_TitleButtons, this:GetName()); SW_ToggleReport(this:GetParent():GetParent():GetName()); SW_RoundButtonRegister(this, {1,0,0,0.9}, SW_B_REPORT); table.insert(SW_Registered_BF_TitleButtons, this:GetName()); SW_ToggleConsole(); SW_RoundButtonRegister(this, {1,0,0,0.9}, SW_B_CONSOLE); table.insert(SW_Registered_BF_TitleButtons, this:GetName()); SW_ToggleSync(); SW_RoundButtonRegister(this, {1,0,0,0.9}, SW_B_SYNC); table.insert(SW_Registered_BF_TitleButtons, this:GetName()); SW_SetOptTxt(this); SW_SelOpt(this); SW_RoundButtonRegister(this, {1,0,0,1}, "1",nil,7); this.optID =1; table.insert(SW_Registered_BF_TitleButtons, this:GetName()); SW_SetOptTxt(this); SW_SelOpt(this); SW_RoundButtonRegister(this, {1,0,0,1}, "2",nil,7); this.optID =2; table.insert(SW_Registered_BF_TitleButtons, this:GetName()); SW_SetOptTxt(this); SW_SelOpt(this); SW_RoundButtonRegister(this, {1,0,0,1}, "3",nil,7); this.optID =3; table.insert(SW_Registered_BF_TitleButtons, this:GetName()); SW_SetOptTxt(this); SW_SelOpt(this); SW_RoundButtonRegister(this, {1,0,0,1}, "4",nil,7); this.optID =4; table.insert(SW_Registered_BF_TitleButtons, this:GetName()); SW_SetOptTxt(this); SW_SelOpt(this); SW_RoundButtonRegister(this, {1,0,0,1}, "5",nil,7); this.optID =5; table.insert(SW_Registered_BF_TitleButtons, this:GetName()); SW_SetOptTxt(this); SW_SelOpt(this); SW_RoundButtonRegister(this, {1,0,0,1}, "6",nil,7); this.optID =6; table.insert(SW_Registered_BF_TitleButtons, this:GetName()); SW_SetOptTxt(this); SW_SelOpt(this); SW_RoundButtonRegister(this, {1,0,0,1}, "7",nil,7); this.optID =7; table.insert(SW_Registered_BF_TitleButtons, this:GetName()); SW_SetOptTxt(this); SW_SelOpt(this); SW_RoundButtonRegister(this, {1,0,0,1}, "8",nil,7); this.optID =8; table.insert(SW_Registered_BF_TitleButtons, this:GetName()); SW_SetOptTxt(this); SW_SelOpt(this); SW_RoundButtonRegister(this, {1,0,0,1}, "9",nil,7); this.optID =9; table.insert(SW_Registered_BF_TitleButtons, this:GetName()); SW_SetOptTxt(this); SW_SelOpt(this); SW_RoundButtonRegister(this, {1,0,0,1}, "10",nil,7); this.optID =10; table.insert(SW_Registered_BF_TitleButtons, this:GetName()); this:SetBackdropBorderColor(SW_COLOR_ACT["r"],SW_COLOR_ACT["g"],SW_COLOR_ACT["b"],1); local str = SW_TE_Functions[getglobal("SW_TextWindowExportSlider"):GetValue()][1](this.repMeta, this.repData); local outBox = getglobal("SW_TextWindow_EditBox"); outBox:SetText(str); outBox:HighlightText(); this:GetParent():GetParent():Hide(); SW_RoundButtonRegister(this, {1,0,0,0.9}, "X"); table.insert(SW_Registered_BF_TitleButtons, this:GetName()); getglobal(this:GetName().."Low"):SetText("1"); getglobal(this:GetName().."High"):SetText(getn(SW_TE_Functions)); this:SetMinMaxValues(1, getn(SW_TE_Functions)); this:SetValueStep(1); this:SetValue(1); getglobal(this:GetName().."Text"):SetText(SW_TE_Functions[this:GetValue()][2]); local str = SW_TE_Functions[this:GetValue()][1](this:GetParent().repMeta, this:GetParent().repData); local outBox = getglobal("SW_TextWindow_EditBox"); outBox:SetText(str); outBox:HighlightText(); this:SetBackdropBorderColor(SW_COLOR_ACT["r"],SW_COLOR_ACT["g"],SW_COLOR_ACT["b"],1); this.chkPerRow = 3; if getglobal("SW_RepTo_Whisper"):GetChecked() == 1 or getglobal("SW_RepTo_Channel"):GetChecked() == 1 then getglobal(this:GetName().."_VarText"):Show(); else getglobal(this:GetName().."_VarText"):Hide(); end this:GetParent():GetParent():Hide(); SW_RoundButtonRegister(this, {1,0,0,0.9}, "X"); table.insert(SW_Registered_BF_TitleButtons, this:GetName()); this.swoX = 5; this.swoY = -25; SW_ChkRegister(this, "", true, "RepTarget"); this.SW_TargetChat = "SAY"; SW_ChkClick(this); getglobal(this:GetParent():GetName().."_VarText"):Hide(); SW_ChkRegister(this, "", false, "RepTarget"); this.SW_TargetChat = "PARTY"; SW_ChkClick(this); getglobal(this:GetParent():GetName().."_VarText"):Hide(); SW_ChkRegister(this, "", false, "RepTarget"); this.SW_TargetChat = "RAID"; SW_ChkClick(this); getglobal(this:GetParent():GetName().."_VarText"):Hide(); SW_ChkRegister(this, "", false, "RepTarget"); this.SW_TargetChat = "GUILD"; SW_ChkClick(this); getglobal(this:GetParent():GetName().."_VarText"):Hide(); SW_ChkRegister(this, "", false, "RepTarget"); this.SW_TargetChat = "CHANNEL"; SW_ChkClick(this); getglobal(this:GetParent():GetName().."_VarText"):Show(); SW_ChkRegister(this, "", false, "RepTarget"); this.SW_TargetChat = "WHISPER"; SW_ChkClick(this); getglobal(this:GetParent():GetName().."_VarText"):Show(); SW_ChkRegister(this, "", false, "RepTarget"); this.SW_TargetChat = "OFFICER"; SW_ChkClick(this); getglobal(this:GetParent():GetName().."_VarText"):Hide(); SW_ChkRegister(this, "", false, "RepTarget"); this.SW_TargetChat = "CLIP"; SW_ChkClick(this); getglobal(this:GetParent():GetName().."_VarText"):Hide(); getglobal(this:GetName().."Low"):SetText("1"); getglobal(this:GetName().."High"):SetText("40"); this:SetMinMaxValues(1, 40); this:SetValueStep(1); this:SetValue(SW_Settings["ReportAmount"]); getglobal(this:GetName().."Text"):SetText("#:"..this:GetValue()); getglobal(this:GetName().."Text"):SetText("#:"..this:GetValue()); SW_Settings["ReportAmount"] = this:GetValue(); this.swoX = 10; this.swoY = -10; SW_ChkRegister(this, "RE_Multiline", true); this:SetBackdropBorderColor(SW_COLOR_ACT["r"],SW_COLOR_ACT["g"],SW_COLOR_ACT["b"],1); this.chkPerRow = 3; function this:UpdateARPVis() if UnitInRaid("player") then if IsRaidLeader() or IsRaidOfficer() then getglobal("SW_BarSyncFrame_SyncARPY"):Show(); getglobal("SW_BarSyncFrame_SyncARPN"):Show(); else getglobal("SW_BarSyncFrame_SyncARPY"):Hide(); getglobal("SW_BarSyncFrame_SyncARPN"):Hide(); end else getglobal("SW_BarSyncFrame_SyncARPY"):Hide(); getglobal("SW_BarSyncFrame_SyncARPN"):Hide(); end end this:UpdateARPVis(); this:GetParent():GetParent():Hide(); SW_RoundButtonRegister(this, {1,0,0,0.9}, "X"); table.insert(SW_Registered_BF_TitleButtons, this:GetName()); this.SWUpdateFunc = SW_UpdateSyncChanText; this.SWUpdateInfo = nil; this.maxLetters = 30; if SW_Settings["SYNCLastChan"] == nil or SW_SyncChanID == 0 then this.CurrentVal = NONE; else if SW_SyncCheckInChan(SW_Settings["SYNCLastChan"]) then this.CurrentVal = SW_Settings["SYNCLastChan"]; else this.CurrentVal = NONE; end end this:ChangeText(); this.swoX = 95; this.swoY = -85; SW_ChkRegister(this, "", true, "SyncBCTarget"); this.SW_TargetChat = "GUILD"; SW_ChkClick(this); SW_ChkRegister(this, "", false, "SyncBCTarget"); this.SW_TargetChat = "PARTY"; SW_ChkClick(this); SW_ChkRegister(this, "", false, "SyncBCTarget"); this.SW_TargetChat = "RAID"; SW_ChkClick(this); this:SetBackdropBorderColor(SW_COLOR_ACT["r"],SW_COLOR_ACT["g"],SW_COLOR_ACT["b"],1); this.chkPerRow = 2; if ButtonHole and ButtonHole.application.IsOn() then SW_GeneralSettingsIconSlider:Hide(); SW_GeneralSettingsIconRadiusSlider:Hide(); else SW_GeneralSettingsIconSlider:Show(); SW_GeneralSettingsIconRadiusSlider:Show(); end if SW_BarSettingsFrameV2:IsVisible() then SW_BarSettingsFrameV2:Hide(); end this:GetParent():GetParent():Hide(); SW_RoundButtonRegister(this, {1,0,0,0.9}, "X"); table.insert(SW_Registered_BF_TitleButtons, this:GetName()); this.swoX = 5; this.swoY = -25; SW_ChkRegister(this, "INF_ShowOnlyFriends", true); this.TargetColor = SW_Settings["Colors"]["Damage"]; this.What = "DIRECT"; this:SetColor(this.TargetColor); this.TargetColor = SW_Settings["Colors"]["Heal"]; this.What = "DIRECT"; this:SetColor(this.TargetColor); this.TargetColor = SW_Settings["Colors"]["TitleBars"]; this.What = "DIRECT"; this.CallOnUpdate = SW_UpdateTitleColor; this:SetColor(this.TargetColor); this.TargetColor = SW_Settings["Colors"]["TitleBarsFont"]; this.What = "DIRECT"; this.CallOnUpdate = SW_UpdateTitleTextColor; this:SetColor(this.TargetColor); this.TargetColor = SW_Settings["Colors"]["Backdrops"]; this.What = "DIRECT"; this.CallOnUpdate = SW_UpdateFrameBackdrops; this:SetColor(this.TargetColor); this.TargetColor = SW_Settings["Colors"]["MainWinBack"]; this.What = "DIRECT"; this.CallOnUpdate = SW_UpdateMainWinBack; this:SetColor(this.TargetColor); SW_DummyColor = {1,1,1, SW_Settings["Colors"]["MAGE"][4]}; this.TargetColor = SW_DummyColor; this.What = "DIRECT"; this.CallOnUpdate = SW_UpdateClassColorAlpha; this:SetColor(this.TargetColor); getglobal(this:GetName().."High"):SetText(SW_OPT_COUNT); getglobal(this:GetName().."Low"):SetText("0"); this:SetMinMaxValues(0, SW_OPT_COUNT); this:SetValueStep(1); this:SetValue(SW_Settings["QuickOptCount"]); getglobal(this:GetName().."Text"):SetText("# "..this:GetValue()); SW_Settings["QuickOptCount"] = this:GetValue(); getglobal(this:GetName().."Text"):SetText("# "..this:GetValue()); SW_UpdateOptVis(true); getglobal(this:GetName().."High"):SetText(); getglobal(this:GetName().."Low"):SetText(); this:SetMinMaxValues(0, 360); this:SetValueStep(1); if SW_Settings["SW_IconPos"] ~= nil then this:SetValue(SW_Settings["SW_IconPos"]); else this:SetValue(20); SW_Settings["SW_IconPos"] = 20; end getglobal(this:GetName().."Text"):SetText("SW Icon "..this:GetValue().."\194\176"); if SW_Settings["SW_IconPosR"] == nil then SW_Settings["SW_IconPosR"] =80; end SW_Settings["SW_IconPos"] = this:GetValue(); getglobal(this:GetName().."Text"):SetText("SW Icon "..this:GetValue().."\194\176"); SW_UpdateIconPos(); getglobal(this:GetName().."High"):SetText(); getglobal(this:GetName().."Low"):SetText(); this:SetMinMaxValues(40, 150); this:SetValueStep(1); if SW_Settings["SW_IconPosR"] ~= nil then this:SetValue(SW_Settings["SW_IconPosR"]); else this:SetValue(80); SW_Settings["SW_IconPosR"] = 80; end getglobal(this:GetName().."Text"):SetText("SW Icon "..this:GetValue().."r"); SW_Settings["SW_IconPosR"] = this:GetValue(); getglobal(this:GetName().."Text"):SetText("SW Icon "..this:GetValue().."r"); SW_UpdateIconPos(); this:SetBackdropBorderColor(SW_COLOR_ACT["r"],SW_COLOR_ACT["g"],SW_COLOR_ACT["b"],1); if SW_GeneralSettings:IsVisible() then SW_GeneralSettings:Hide(); end this:GetParent():GetParent():Hide(); SW_RoundButtonRegister(this, {1,0,0,0.9}, "X"); table.insert(SW_Registered_BF_TitleButtons, this:GetName()); getglobal(this:GetName().."Low"):SetText("1"); getglobal(this:GetName().."High"):SetText(getn(SW_InfoTypes)); this:SetMinMaxValues(1, getn(SW_InfoTypes)); this:SetValueStep(1); local barSettings = SW_GetBarSettings(this:GetParent().caller); this:SetValue(barSettings["IN"]); getglobal(this:GetName().."Text"):SetText("Info:"..SW_InfoTypes[this:GetValue()]["t"]); local oP = this:GetParent(); local type = SW_InfoTypes[this:GetValue()]; local barSettings = SW_GetBarSettings(oP.caller); getglobal(this:GetName().."Text"):SetText("Info:"..type["t"]); barSettings["IN"] = this:GetValue(); getglobal("SW_InfoLbl"):SetText(type["d"]); if type["varType"] == nil then getglobal(oP:GetName().."_VarText"):Hide(); getglobal(oP:GetName().."_Filters"):Show(); else getglobal(oP:GetName().."_Filters"):Hide(); if type["varType"] == "TEXT" then getglobal(oP:GetName().."_Filters"):Hide(); getglobal(oP:GetName().."_VarText"):Show(); elseif type["varType"] == "SELF" then getglobal(oP:GetName().."_Filters"):Hide(); getglobal(oP:GetName().."_VarText"):Hide(); elseif type["varType"] == "NONE" then getglobal(oP:GetName().."_Filters"):Hide(); getglobal(oP:GetName().."_VarText"):Hide(); elseif type["varType"] == "PETONLY" then getglobal(oP:GetName().."_Filters"):Hide(); getglobal(oP:GetName().."_VarText"):Hide(); end end SW_UpdateColor(oP.caller); local barSettings = SW_GetBarSettings(this:GetParent().caller); if barSettings["SF"] == nil then SW_SelectFilter("SW_Filter_None"); else SW_SelectFilter(barSettings["SF"]); end getglobal(this:GetName().."Low"):SetText("1"); getglobal(this:GetName().."High"):SetText(10); this:SetMinMaxValues(1, 10); this:SetValueStep(1); local barSettings = SW_GetBarSettings(this:GetParent():GetParent().caller); if barSettings["CF"] == nil then barSettings["CF"] = 1; end this:SetValue(barSettings["CF"]); local barSettings = SW_GetBarSettings(this:GetParent():GetParent().caller); barSettings["CF"] = this:GetValue(); local dispText = ""; if barSettings["CF"] == 1 then dispText = NONE; else dispText = SW_ClassNames[ SW_ClassFilters[ barSettings["CF"] ] ]; if dispText == "" then dispText = SW_ClassFilters[ barSettings["CF"] ]; end end getglobal(this:GetName().."Text"):SetText(dispText); local barSettings = SW_GetBarSettings(this:GetParent():GetParent().caller); this.SWUpdateFunc = SW_UpdateTextSetting; this.SWUpdateInfo = {this:GetParent():GetParent().caller, "TV"}; if barSettings["TV"] == nil then this.CurrentVal = ""; else this.CurrentVal = barSettings["TV"]; end this:ChangeText(); SW_TabRegister(this, "SW_BarSettings_Data", true); SW_InitSlider(this, 1, 5, "COLC"); SW_InitSlider(this, 4, 32, "BH"); this.TargetColor = this:GetParent().caller; this.What = "BC"; this:SetColor(this.TargetColor, this.What); this.TargetColor = this:GetParent().caller; this.What = "BFC"; this:SetColor(this.TargetColor, this.What); SW_InitSlider(this, 1, 10, "BT"); SW_InitSlider(this, 6, 14, "BFS"); local barSettings = SW_GetBarSettings(this:GetParent().caller); this.SWUpdateFunc = SW_UpdateTextSetting; this.SWUpdateInfo = {this:GetParent().caller, "OTF"}; if barSettings["OTF"] == nil then this.CurrentVal = SW_Settings["BarFrames"][this:GetParent().caller]["Selected"]; else this.CurrentVal = barSettings["OTF"]; end this:ChangeText(); local barSettings = SW_GetBarSettings(this:GetParent().caller); this.SWUpdateFunc = SW_UpdateTextSetting; this.SWUpdateInfo = {this:GetParent().caller, "OT"}; this.maxLetters = 2; if barSettings["OT"] == nil then this.CurrentVal = SW_Settings["BarFrames"][this:GetParent().caller]["Selected"]; else this.CurrentVal = barSettings["OT"]; end this:ChangeText(); this.TargetColor = this:GetParent().caller; this.What = "OC"; this:SetColor(this.TargetColor, this.What); SW_TabRegister(this, "SW_BarSettings_Visuals"); local barSettings = SW_GetBarSettings(this.caller); local showPF = SW_InfoTypes[ barSettings["IN"] ]["showPF"]; if showPF then getglobal("SW_Pets_Nothing"):Hide(); getglobal("SW_Pets_Settings"):Show(); if barSettings["PF"] == nil then barSettings["PF"] = "SW_PF_Inactive"; end SW_ChkClick(getglobal(barSettings["PF"]), barSettings, true); else getglobal("SW_Pets_Nothing"):Show(); getglobal("SW_Pets_Settings"):Hide(); end this.chkPerRow = 1; this.swoX = 5; this.swoY = 0; SW_ChkRegister(this, "", true, "PF"); this.petFil = {Inactive = true}; local barSettings = SW_GetBarSettings(this:GetParent():GetParent().caller); SW_ChkClick(this, barSettings); SW_ChkRegister(this, "", false, "PF"); this.petFil = {Active = true, latePets = true}; local barSettings = SW_GetBarSettings(this:GetParent():GetParent().caller); SW_ChkClick(this, barSettings); SW_ChkRegister(this, "", false, "PF"); this.petFil = {Current = true, latePets = true}; local barSettings = SW_GetBarSettings(this:GetParent():GetParent().caller); SW_ChkClick(this, barSettings); SW_ChkRegister(this, "", false, "PF"); this.petFil = {VPP = true, latePets = true}; local barSettings = SW_GetBarSettings(this:GetParent():GetParent().caller); SW_ChkClick(this, barSettings); SW_ChkRegister(this, "", false, "PF"); this.petFil = {VPR = true, latePets = true}; local barSettings = SW_GetBarSettings(this:GetParent():GetParent().caller); SW_ChkClick(this, barSettings); SW_ChkRegister(this, "", false, "PF"); this.petFil = {MM = true}; local barSettings = SW_GetBarSettings(this:GetParent():GetParent().caller); SW_ChkClick(this, barSettings); SW_ChkRegister(this, "", false, "PF"); this.petFil = {MR = true}; local barSettings = SW_GetBarSettings(this:GetParent():GetParent().caller); SW_ChkClick(this, barSettings); SW_ChkRegister(this, "", false, "PF"); this.petFil = {MB = true}; local barSettings = SW_GetBarSettings(this:GetParent():GetParent().caller); SW_ChkClick(this, barSettings); SW_ChkRegister(this, "", false, "PF"); this.petFil = {Ignore = true, latePets = true}; local barSettings = SW_GetBarSettings(this:GetParent():GetParent().caller); SW_ChkClick(this, barSettings); SW_TabRegister(this, "SW_BarSettings_Pets");