---------------------------------------------------------------------------------- -------------- Templates for the config Menu -------------- ---------------------------------------------------------------------------------- this:SetMaxLetters(200) this:ClearFocus() GameTooltip:SetOwner(this, "ANCHOR_RIGHT") GameTooltip:SetText(this.aide, nil, nil, nil, nil, 1) GameTooltip:Hide() if this.aide then GameTooltip:SetOwner(this, "ANCHOR_RIGHT") GameTooltip:SetText(this.aide, nil, nil, nil, nil, 1) GameTooltip:Show() end GameTooltip:Hide() GameTooltip:SetOwner(this, "ANCHOR_RIGHT") GameTooltip:SetText(this.aide, nil, nil, nil, nil, 1) GameTooltip:Hide() if DPSMate.DB.loaded then UIDropDownMenu_Initialize(this, this.func) end if (this.aide) then GameTooltip:SetOwner(this, "ANCHOR_RIGHT") GameTooltip:SetText(this.aide, nil, nil, nil, nil, 1) end GameTooltip:Hide() getglobal(this:GetName().."_Editbox"):SetText(string.format("%.1f", this:GetValue())) if this.func and DPSMate.DB.loaded then this.func() end this:SetMaxLetters(200) this:SetScale(0.6) this:ClearFocus() local num = tonumber(this:GetText()) if num then this:GetParent():SetValue(num) end this:ClearFocus() local num = tonumber(this:GetText()) if num then this:GetParent():SetValue(num) end ---------------------------------------------------------------------------------- -------------- DPSMate MiniMap Icon -------------- ---------------------------------------------------------------------------------- ---------------------------------------------------------------------------------- -------------- DPSMate PopUP -------------- ---------------------------------------------------------------------------------- this:StartMoving() this:StopMovingOrSizing() DPSMate_PopUp_Text:SetText(DPSMate.L["popup"]) DPSMate_PopUp_TotalText:SetText(DPSMate.L["total"]) DPSMate_PopUp_CurrentText:SetText(DPSMate.L["current"]) DPSMate_PopUp_CancelText:SetText(DPSMate.L["cancel"]) this:SetClampedToScreen() this:StartMoving() this:StopMovingOrSizing() if IsPartyLeader() or IsRaidOfficer() or IsRaidLeader() then DPSMate_Vote_Abort:Show() else DPSMate_Vote_Abort:Hide() end DPSMate_Vote_Text:SetText(DPSMate.L["popup"]) DPSMate_Vote_AcceptText:SetText(DPSMate.L["vreset"]) DPSMate_Vote_CancelText:SetText(DPSMate.L["vdreset"]) this:SetClampedToScreen() this:StartMoving() this:StopMovingOrSizing() DPSMate_Logout_Text:SetText(DPSMate.L["memory"]) DPSMate_Logout_AcceptText:SetText(DPSMate.L["accept"]) DPSMate_Logout_CancelText:SetText(DPSMate.L["decline"]) this:SetClampedToScreen() ---------------------------------------------------------------------------------- -------------- DPSMate Report -------------- ---------------------------------------------------------------------------------- this:StartMoving() this:StopMovingOrSizing() DPSMate_Report_Text:SetText(DPSMate.L["report"].." - "..DPSMate.L["name"]) GameTooltip:SetOwner(this, "ANCHOR_RIGHT") GameTooltip:SetText(DPSMate.L["channeltooltip"], nil, nil, nil, nil, 1) GameTooltip:Hide() UIDropDownMenu_SetWidth(100) UIDropDownMenu_Initialize(this, DPSMate.Options.ChannelDropDown) getglobal(this:GetName().."_Text"):SetText(DPSMate.L["channel"]) UIDropDownMenu_Initialize(this, DPSMate.Options.ChannelDropDown) this.aide = DPSMate.L["reportdelaytooltip"] getglobal(this:GetName().."_Title"):SetText(DPSMate.L["delay"]) DPSMateSettings["reportdelay"] = not DPSMateSettings["reportdelay"] GameTooltip:SetOwner(this, "ANCHOR_RIGHT") GameTooltip:SetText(DPSMate.L["slidertooltip"], nil, nil, nil, nil, 1) GameTooltip:Hide() getglobal(this:GetName().."Text"):SetText(DPSMate.L["slider"]..": "..this:GetValue()) this:SetMinMaxValues(1,25) this:SetValue(6) this:SetValueStep(1) getglobal(this:GetName().."Text"):SetText(DPSMate.L["slider"]..": 6") getglobal(this:GetName().."Low"):SetText("1") getglobal(this:GetName().."High"):SetText("25") this:SetMaxLetters(32) getglobal(this:GetName().."_Text"):SetText(DPSMate.L["editboxtitle"]) this:ClearFocus() GameTooltip:SetOwner(this, "ANCHOR_RIGHT") GameTooltip:SetText(DPSMate.L["editboxtooltip"], nil, nil, nil, nil, 1) GameTooltip:Hide() this:StartMoving() this:StopMovingOrSizing() ---------------------------------------------------------------------------------- -------------- DPSMate Config Menu -------------- ---------------------------------------------------------------------------------- this:StartMoving() this:StopMovingOrSizing() this.num = 6 this.aide = DPSMate.L["createwindowtooltip"] getglobal(this:GetName().."Text"):SetText(DPSMate.L["createwindow"]) this.aide = DPSMate.L["availwindowsTooltip"] this.func = DPSMate.Options.WindowDropDown this.title = DPSMate.L["availwindows"] UIDropDownMenu_SetWidth(148) getglobal(this:GetName().."_Text"):SetText(this.title) this.aide = DPSMate.L["configfromTooltip"] this.func = DPSMate.Options.WindowDropDown this.title = DPSMate.L["configfrom"] UIDropDownMenu_SetWidth(148) getglobal(this:GetName().."_Text"):SetText(this.title) this.aide = DPSMate.L["configtoTooltip"] this.func = DPSMate.Options.WindowDropDown this.title = DPSMate.L["configto"] UIDropDownMenu_SetWidth(148) getglobal(this:GetName().."_Text"):SetText(this.title) this.aide = DPSMate.L["locktooltip"] getglobal(this:GetName().."_Title"):SetText(DPSMate.L["lock"]) if DPSMateSettings["lock"] then DPSMateSettings["lock"] = false DPSMate.Options:Unlock() else DPSMateSettings["lock"] = true DPSMate.Options:Lock() end this.aide = DPSMate.L["testmodetooltip"] getglobal(this:GetName().."_Title"):SetText(DPSMate.L["testmode"]) DPSMate.Options:ActivateTestMode() this.aide = DPSMate.L["barfontTooltip"] this.func = DPSMate.Options.BarFontDropDown this.title = DPSMate.L["barfont"] UIDropDownMenu_SetWidth(120) getglobal(this:GetName().."_Text"):SetText(this.title) this.aide = DPSMate.L["barfontsizeTooltip"] this.func = function() DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["barfontsize"] = this:GetValue() getglobal("DPSMate_"..DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["name"].."_ScrollFrame_Child_Total_Name"):SetFont(DPSMate.Options.fonts[DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["barfont"]], DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["barfontsize"], DPSMate.Options.fontflags[DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["barfontflag"]]) getglobal("DPSMate_"..DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["name"].."_ScrollFrame_Child_Total_Value"):SetFont(DPSMate.Options.fonts[DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["barfont"]], DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["barfontsize"], DPSMate.Options.fontflags[DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["barfontflag"]]) for i=1, 40 do getglobal("DPSMate_"..DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["name"].."_ScrollFrame_Child_StatusBar"..i.."_Name"):SetFont(DPSMate.Options.fonts[DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["barfont"]], DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["barfontsize"], DPSMate.Options.fontflags[DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["barfontflag"]]) getglobal("DPSMate_"..DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["name"].."_ScrollFrame_Child_StatusBar"..i.."_Value"):SetFont(DPSMate.Options.fonts[DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["barfont"]], DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["barfontsize"], DPSMate.Options.fontflags[DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["barfontflag"]]) end end this:SetMinMaxValues(1,32) this:SetValueStep(1) getglobal(this:GetName().."Text"):SetText(DPSMate.L["barfontsize"]) getglobal(this:GetName().."Low"):SetText("1") getglobal(this:GetName().."High"):SetText("32") this.aide = DPSMate.L["barfontflagsTooltip"] this.func = DPSMate.Options.BarFontFlagsDropDown this.title = DPSMate.L["barfontflags"] UIDropDownMenu_SetWidth(120) getglobal(this:GetName().."_Text"):SetText(this.title) this.aide = DPSMate.L["bartextureTooltip"] this.func = DPSMate.Options.BarTextureDropDown this.title = DPSMate.L["bartexture"] UIDropDownMenu_SetWidth(120) getglobal(this:GetName().."_Text"):SetText(this.title) this.aide = DPSMate.L["barspacingTooltip"] this.func = function() DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["barspacing"] = this:GetValue() for i=1, 40 do local bar = getglobal("DPSMate_"..DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["name"].."_ScrollFrame_Child_StatusBar"..i) bar:ClearAllPoints() bar:SetPoint("TOPLEFT", getglobal("DPSMate_"..DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["name"].."_ScrollFrame_Child"), "TOPLEFT") bar:SetPoint("TOPRIGHT", getglobal("DPSMate_"..DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["name"].."_ScrollFrame_Child"), "TOPRIGHT") if i>1 then bar:SetPoint("TOPLEFT", getglobal("DPSMate_"..DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["name"].."_ScrollFrame_Child_StatusBar"..(i-1)), "BOTTOMLEFT", 0, -1*DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["barspacing"]) else if DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["showtotals"] then bar:SetPoint("TOPLEFT", getglobal("DPSMate_"..DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["name"].."_ScrollFrame_Child_Total"), "BOTTOMLEFT", 0, -1*DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["barspacing"]) else bar:SetPoint("TOPLEFT", getglobal("DPSMate_"..DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["name"].."_ScrollFrame_Child_Total"), "BOTTOMLEFT", 0, -1) end end end end this:SetMinMaxValues(1,10) this:SetValueStep(1) getglobal(this:GetName().."Text"):SetText(DPSMate.L["barspacing"]) getglobal(this:GetName().."Low"):SetText("1") getglobal(this:GetName().."High"):SetText("10") this.aide = DPSMate.L["barheightTooltip"] this.func = function() DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["barheight"] = this:GetValue() if DPSMateSettings["showtotals"] then getglobal("DPSMate_"..DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["name"].."_ScrollFrame_Child_Total"):SetHeight(DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["barheight"]) end for i=1, 40 do local bar = getglobal("DPSMate_"..DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["name"].."_ScrollFrame_Child_StatusBar"..i) bar:SetHeight(DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["barheight"]) local icon = getglobal("DPSMate_"..DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["name"].."_ScrollFrame_Child_StatusBar"..i.."_Icon") icon:SetWidth(DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["barheight"]) icon:SetHeight(DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["barheight"]) if DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["classicons"] then local name = getglobal("DPSMate_"..DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["name"].."_ScrollFrame_Child_StatusBar"..i.."_Name") name:ClearAllPoints() name:SetPoint("LEFT", bar, "LEFT", DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["barheight"], 0) end end DPSMate:SetStatusBarValue() end this:SetMinMaxValues(10,25) this:SetValueStep(1) getglobal(this:GetName().."Text"):SetText(DPSMate.L["barheight"]) getglobal(this:GetName().."Low"):SetText("10") getglobal(this:GetName().."High"):SetText("25") this.aide = DPSMate.L["classiconstooltip"] getglobal(this:GetName().."_Title"):SetText(DPSMate.L["classicons"]) if DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["classicons"] then DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["classicons"] = false for i=1, 40 do local bar = getglobal("DPSMate_"..DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["name"].."_ScrollFrame_Child_StatusBar"..i) bar.name = getglobal("DPSMate_"..DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["name"].."_ScrollFrame_Child_StatusBar"..i.."_Name") bar.icon = getglobal("DPSMate_"..DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["name"].."_ScrollFrame_Child_StatusBar"..i.."_Icon") bar.name:ClearAllPoints() bar.name:SetPoint("TOPLEFT", bar, "TOPLEFT") bar.name:SetPoint("BOTTOMRIGHT", bar, "BOTTOMRIGHT") bar.icon:Hide() end else DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["classicons"] = true for i=1, 40 do local bar = getglobal("DPSMate_"..DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["name"].."_ScrollFrame_Child_StatusBar"..i) bar.name = getglobal("DPSMate_"..DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["name"].."_ScrollFrame_Child_StatusBar"..i.."_Name") bar.icon = getglobal("DPSMate_"..DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["name"].."_ScrollFrame_Child_StatusBar"..i.."_Icon") bar.name:ClearAllPoints() bar.name:SetPoint("TOPLEFT", bar, "TOPLEFT", DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["barheight"], 0) bar.name:SetPoint("BOTTOMRIGHT", bar, "BOTTOMRIGHT") bar.icon:Show() end end this.aide = DPSMate.L["rankstooltip"] getglobal(this:GetName().."_Title"):SetText(DPSMate.L["ranks"]) DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["ranks"] = not DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["ranks"] DPSMate:SetStatusBarValue() this.aide = DPSMate.L["disablebarbgtooltip"] getglobal(this:GetName().."_Title"):SetText(DPSMate.L["disablebarbg"]) if DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["barbg"] then DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["barbg"] = false for i=1, 40 do getglobal("DPSMate_"..DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["name"].."_ScrollFrame_Child_StatusBar"..i.."_BG"):SetAlpha(0.5) end else DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["barbg"] = true for i=1, 40 do getglobal("DPSMate_"..DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["name"].."_ScrollFrame_Child_StatusBar"..i.."_BG"):SetAlpha(0) end end this.aide = DPSMate.L["totalbaropacitytooltip"] this.func = function() DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["totopacity"] = this:GetValue() getglobal("DPSMate_"..DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["name"].."_ScrollFrame_Child_Total_BG"):SetAlpha(this:GetValue()) getglobal("DPSMate_"..DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["name"].."_ScrollFrame_Child_Total"):SetStatusBarColor(1,1,1,this:GetValue()) end this:SetMinMaxValues(0,1) this:SetValueStep(0.1) getglobal(this:GetName().."Text"):SetText(DPSMate.L["totalbaropacity"]) getglobal(this:GetName().."Low"):SetText("0") getglobal(this:GetName().."High"):SetText("1") getglobal(this:GetName().."_BGColor_SwatchBg").r = DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["titlebarbgcolor"][1] getglobal(this:GetName().."_BGColor_SwatchBg").g = DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["titlebarbgcolor"][2] getglobal(this:GetName().."_BGColor_SwatchBg").b = DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["titlebarbgcolor"][3] this.aide = DPSMate.L["enabletitlebartooltip"] getglobal(this:GetName().."_Title"):SetText(DPSMate.L["enable"]) if DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["titlebar"] then DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["titlebar"] = false getglobal("DPSMate_"..DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["name"].."_Head"):Hide() else DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["titlebar"] = true getglobal("DPSMate_"..DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["name"].."_Head"):Show() end this.aide = DPSMate.L["barfontTooltip"] this.func = DPSMate.Options.TitleBarFontDropDown this.title = DPSMate.L["barfont"] UIDropDownMenu_SetWidth(120) getglobal(this:GetName().."_Text"):SetText(this.title) this.aide = DPSMate.L["barfontsizeTooltip"] this.func = function() DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["titlebarfontsize"] = this:GetValue() getglobal("DPSMate_"..DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["name"].."_Head_Font"):SetFont(DPSMate.Options.fonts[DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["titlebarfont"]], DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["titlebarfontsize"], DPSMate.Options.fontflags[DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["titlebarfontflag"]]) end this:SetMinMaxValues(1,32) this:SetValueStep(1) getglobal(this:GetName().."Text"):SetText(DPSMate.L["barfontsize"]) getglobal(this:GetName().."Low"):SetText("1") getglobal(this:GetName().."High"):SetText("32") this.aide = DPSMate.L["barfontflagsTooltip"] this.func = DPSMate.Options.TitleBarFontFlagsDropDown this.title = DPSMate.L["barfontflags"] UIDropDownMenu_SetWidth(120) getglobal(this:GetName().."_Text"):SetText(this.title) this.aide = DPSMate.L["bartextureTooltip"] this.func = DPSMate.Options.TitleBarTextureDropDown this.title = DPSMate.L["bartexture"] UIDropDownMenu_SetWidth(120) getglobal(this:GetName().."_Text"):SetText(this.title) this.aide = DPSMate.L["barheightTooltip"] this.func = function() DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["titlebarheight"] = this:GetValue() getglobal("DPSMate_"..DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["name"].."_Head"):SetHeight(DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["titlebarheight"]) end this:SetMinMaxValues(10,32) this:SetValueStep(1) getglobal(this:GetName().."Text"):SetText(DPSMate.L["barheight"]) getglobal(this:GetName().."Low"):SetText("10") getglobal(this:GetName().."High"):SetText("32") this.aide = DPSMate.L["bgOpacityTooltip"] this.func = function() DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["titlebaropacity"] = this:GetValue() getglobal("DPSMate_"..DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["name"].."_Head_Background"):SetAlpha(DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["titlebaropacity"]) end this:SetMinMaxValues(0,1) this:SetValueStep(0.1) getglobal(this:GetName().."Text"):SetText(DPSMate.L["bgOpacity"]) getglobal(this:GetName().."Low"):SetText("0") getglobal(this:GetName().."High"):SetText("1") this.aide = DPSMate.L["buttonshowtooltip"] getglobal(this:GetName().."_Title"):SetText(DPSMate.L["report"]) DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["titlebarreport"] = not DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["titlebarreport"] DPSMate.Options:ToggleTitleBarButtonState() this.aide = DPSMate.L["buttonshowtooltip"] getglobal(this:GetName().."_Title"):SetText(DPSMate.L["mode"]) DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["titlebarsegments"] = not DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["titlebarsegments"] DPSMate.Options:ToggleTitleBarButtonState() this.aide = DPSMate.L["buttonshowtooltip"] getglobal(this:GetName().."_Title"):SetText(DPSMate.L["reset"]) DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["titlebarreset"] = not DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["titlebarreset"] DPSMate.Options:ToggleTitleBarButtonState() this.aide = DPSMate.L["buttonshowtooltip"] getglobal(this:GetName().."_Title"):SetText(DPSMate.L["config"]) DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["titlebarconfig"] = not DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["titlebarconfig"] DPSMate.Options:ToggleTitleBarButtonState() this.aide = DPSMate.L["buttonshowtooltip"] getglobal(this:GetName().."_Title"):SetText(DPSMate.L["sync"]) DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["titlebarsync"] = not DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["titlebarsync"] DPSMate.Options:ToggleTitleBarButtonState() this.aide = DPSMate.L["buttonshowtooltip"] getglobal(this:GetName().."_Title"):SetText(DPSMate.L["enabledisable"]) DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["titlebarenable"] = not DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["titlebarenable"] DPSMate.Options:ToggleTitleBarButtonState() this.aide = DPSMate.L["buttonshowtooltip"] getglobal(this:GetName().."_Title"):SetText(DPSMate.L["filter"]) DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["titlebarfilter"] = not DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["titlebarfilter"] DPSMate.Options:ToggleTitleBarButtonState() this.aide = DPSMate.L["buttonshowtooltip"] getglobal(this:GetName().."_Title"):SetText(DPSMate.L["cbtdisplay"]) if DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["cbtdisplay"] then DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["cbtdisplay"] = false DPSMate:SetStatusBarValue() else DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["cbtdisplay"] = true getglobal("DPSMate_"..DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["name"].."_Head_Font"):SetText(DPSMate.Options.Options[1]["args"][DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["CurMode"]].name) end getglobal(this:GetName().."_BGColor_SwatchBg").r = DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["contentbgcolor"][1] getglobal(this:GetName().."_BGColor_SwatchBg").g = DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["contentbgcolor"][2] getglobal(this:GetName().."_BGColor_SwatchBg").b = DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["contentbgcolor"][3] this.aide = DPSMate.L["bgtexTooltip"] this.func = DPSMate.Options.ContentBGTextureDropDown this.title = DPSMate.L["bgtex"] UIDropDownMenu_SetWidth(120) getglobal(this:GetName().."_Text"):SetText(this.title) this.aide = DPSMate.L["scaleTooltip"] this.func = function() DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["scale"] = this:GetValue() getglobal("DPSMate_"..DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["name"]):SetScale(DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["scale"]) end this:SetMinMaxValues(0.5,3) this:SetValueStep(0.1) getglobal(this:GetName().."Text"):SetText(DPSMate.L["scale"]) getglobal(this:GetName().."Low"):SetText("0.5") getglobal(this:GetName().."High"):SetText("3") this.aide = DPSMate.L["opacityTooltip"] this.func = function() DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["opacity"] = this:GetValue() getglobal("DPSMate_"..DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["name"]):SetAlpha(DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["opacity"]) end this:SetMinMaxValues(0.0,1.0) this:SetValueStep(0.1) getglobal(this:GetName().."Text"):SetText(DPSMate.L["opacity"]) getglobal(this:GetName().."Low"):SetText("0.0") getglobal(this:GetName().."High"):SetText("1.0") this.aide = DPSMate.L["bgOpacityTooltip"] this.func = function() DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["bgopacity"] = this:GetValue() getglobal("DPSMate_"..DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["name"].."_ScrollFrame_Background"):SetAlpha(DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["bgopacity"]) end this:SetMinMaxValues(0.0,1.0) this:SetValueStep(0.1) getglobal(this:GetName().."Text"):SetText(DPSMate.L["bgOpacity"]) getglobal(this:GetName().."Low"):SetText("0.0") getglobal(this:GetName().."High"):SetText("1.0") this.aide = DPSMate.L["borderOpacityTooltip"] this.func = function() DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["borderopacity"] = this:GetValue() getglobal("DPSMate_"..DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["name"].."_Border"):SetAlpha(DPSMateSettings["windows"][DPSMate_ConfigMenu_Menu.Key]["borderopacity"]) end this:SetMinMaxValues(0.0,1.0) this:SetValueStep(0.1) getglobal(this:GetName().."Text"):SetText(DPSMate.L["borderOpacity"]) getglobal(this:GetName().."Low"):SetText("0.0") getglobal(this:GetName().."High"):SetText("1.0") this.aide = DPSMate.L["numberformatTooltip"] this.func = DPSMate.Options.NumberFormatDropDown this.title = DPSMate.L["numberformat"] UIDropDownMenu_SetWidth(120) getglobal(this:GetName().."_Text"):SetText(this.title) this.aide = DPSMate.L["bordertextureTooltip"] this.func = DPSMate.Options.BorderTextureDropDown this.title = DPSMate.L["bordertexture"] UIDropDownMenu_SetWidth(120) getglobal(this:GetName().."_Text"):SetText(this.title) this.aide = DPSMate.L["borderstrataTooltip"] this.func = DPSMate.Options.BorderStrataDropDown this.title = DPSMate.L["borderstrata"] UIDropDownMenu_SetWidth(120) getglobal(this:GetName().."_Text"):SetText(this.title) this.aide = DPSMate.L["enterworldinstanceTooltip"] this.func = DPSMate.Options.DataResetsDropDown this.title = DPSMate.L["enterworldinstance"] UIDropDownMenu_SetWidth(120) getglobal(this:GetName().."_Text"):SetText(this.title) this.aide = DPSMate.L["joinpartyTooltip"] this.func = DPSMate.Options.DataResetsDropDown this.title = DPSMate.L["joinparty"] UIDropDownMenu_SetWidth(120) getglobal(this:GetName().."_Text"):SetText(this.title) this.aide = DPSMate.L["partymemberchangedTooltip"] this.func = DPSMate.Options.DataResetsDropDown this.title = DPSMate.L["partymemberchanged"] UIDropDownMenu_SetWidth(120) getglobal(this:GetName().."_Text"):SetText(this.title) this.aide = DPSMate.L["leavingpartyTooltip"] this.func = DPSMate.Options.DataResetsDropDown this.title = DPSMate.L["leavingparty"] UIDropDownMenu_SetWidth(120) getglobal(this:GetName().."_Text"):SetText(this.title) this.aide = DPSMate.L["syncrequesttooltip"] this.func = DPSMate.Options.DataResetsDropDown this.title = DPSMate.L["syncrequest"] UIDropDownMenu_SetWidth(120) getglobal(this:GetName().."_Text"):SetText(this.title) this.aide = DPSMate.L["dataresetslogouttooltip"] this.func = DPSMate.Options.DataResetsDropDown this.title = DPSMate.L["dataresetslogout"] UIDropDownMenu_SetWidth(120) getglobal(this:GetName().."_Text"):SetText(this.title) this.aide = DPSMate.L["minimaptooltip"] getglobal(this:GetName().."_Title"):SetText(DPSMate.L["minimap"]) if DPSMateSettings["showminimapbutton"] then DPSMateSettings["showminimapbutton"] = false DPSMate_MiniMap:Hide() else DPSMateSettings["showminimapbutton"] = true DPSMate_MiniMap:Show() end this.aide = DPSMate.L["showtotaltooltip"] getglobal(this:GetName().."_Title"):SetText(DPSMate.L["showtotal"]) if DPSMateSettings["showtotals"] then DPSMateSettings["showtotals"] = false for _, val in pairs(DPSMateSettings["windows"]) do getglobal("DPSMate_"..val["name"].."_ScrollFrame_Child_Total"):SetHeight(0.000001) getglobal("DPSMate_"..val["name"].."_ScrollFrame_Child_StatusBar1"):SetPoint("TOPLEFT", getglobal("DPSMate_"..val["name"].."_ScrollFrame_Child_Total"), "BOTTOMLEFT", 0, -1) end else DPSMateSettings["showtotals"] = true for _, val in pairs(DPSMateSettings["windows"]) do getglobal("DPSMate_"..val["name"].."_ScrollFrame_Child_Total"):SetHeight(val["barheight"]) getglobal("DPSMate_"..val["name"].."_ScrollFrame_Child_StatusBar1"):SetPoint("TOPLEFT", getglobal("DPSMate_"..val["name"].."_ScrollFrame_Child_Total"), "BOTTOMLEFT", 0, -1*val["barspacing"]) end end DPSMate:SetStatusBarValue() this.aide = DPSMate.L["solotooltip"] getglobal(this:GetName().."_Title"):SetText(DPSMate.L["solo"]) if DPSMateSettings["hidewhensolo"] then DPSMateSettings["hidewhensolo"] = false for _, val in pairs(DPSMateSettings["windows"]) do getglobal("DPSMate_"..val["name"]):Show() end else DPSMateSettings["hidewhensolo"] = true for _, val in pairs(DPSMateSettings["windows"]) do getglobal("DPSMate_"..val["name"]):Hide() end end DPSMate.Options:HideInPvP() DPSMate.Options:HideWhenSolo() this.aide = DPSMate.L["combattooltip"] getglobal(this:GetName().."_Title"):SetText(DPSMate.L["combat"]) if DPSMateSettings["hideincombat"] then DPSMateSettings["hideincombat"] = false for _, val in pairs(DPSMateSettings["windows"]) do getglobal("DPSMate_"..val["name"]):Show() end else DPSMateSettings["hideincombat"] = true if UnitAffectingCombat("player") then for _, val in pairs(DPSMateSettings["windows"]) do getglobal("DPSMate_"..val["name"]):Hide() end end end DPSMate.Options:HideInPvP() DPSMate.Options:HideWhenSolo() this.aide = DPSMate.L["loginhidetooltip"] getglobal(this:GetName().."_Title"):SetText(DPSMate.L["loginhide"]) DPSMateSettings["hideonlogin"] = not DPSMateSettings["hideonlogin"] this.aide = DPSMate.L["bossfightstooltip"] getglobal(this:GetName().."_Title"):SetText(DPSMate.L["bossfights"]) DPSMateSettings["onlybossfights"] = not DPSMateSettings["onlybossfights"] this.aide = DPSMate.L["pvptooltip"] getglobal(this:GetName().."_Title"):SetText(DPSMate.L["pvp"]) if DPSMateSettings["hideinpvp"] then DPSMateSettings["hideinpvp"] = false for _, val in pairs(DPSMateSettings["windows"]) do getglobal("DPSMate_"..val["name"]):Show() end else DPSMateSettings["hideinpvp"] = true end DPSMate.Options:HideWhenSolo() DPSMate.Options:HideInPvP() this.aide = DPSMate.L["disabletooltip"] getglobal(this:GetName().."_Title"):SetText(DPSMate.L["disable"]) if DPSMateSettings["disablewhilehidden"] then DPSMateSettings["disablewhilehidden"] = false DPSMate:Enable() else DPSMateSettings["disablewhilehidden"] = true end this.aide = DPSMate.L["mergepetstooltip"] getglobal(this:GetName().."_Title"):SetText(DPSMate.L["mergepets"]) if DPSMateSettings["mergepets"] then DPSMateSettings["mergepets"] = false DPSMate:Enable() else DPSMateSettings["mergepets"] = true end this.aide = DPSMate.L["segmentsTooltip"] this.func = function() DPSMateSettings["datasegments"] = this:GetValue() if DPSMate:TableLength(DPSMateHistory)>DPSMateSettings["datasegments"] then for i=(DPSMateSettings["datasegments"]+1), DPSMate:TableLength(DPSMateHistory) do for p=1, DPSMate:TableLength(DPSMateSettings["windows"]) do DPSMateSettings["windows"][p]["options"][2]["segment"..i] = false end table.remove(DPSMateHistory, i) end end if DPSMate:TableLength(DPSMateCombatTime["segments"])>DPSMateSettings["datasegments"] then for i=DPSMateSettings["datasegments"]+1, DPSMate:TableLength(DPSMateCombatTime["segments"]) do for p=1, DPSMate:TableLength(DPSMateSettings["windows"]) do DPSMateSettings["windows"][p]["options"][2]["segment"..i] = false end table.remove(DPSMateCombatTime["segments"], i) end end for p=1, DPSMate:TableLength(DPSMateSettings["windows"]) do local hasTrue = false for _,val in pairs(DPSMateSettings["windows"][p]["options"][2]) do if val==true then hasTrue = true break end end if not hasTrue then for cat,_ in pairs(DPSMateSettings["windows"][p]["options"][2]) do DPSMateSettings["windows"][p]["options"][2][cat] = false end DPSMateSettings["windows"][p]["options"][2]["total"] = true end end DPSMate.Options:InitializeSegments() DPSMate:SetStatusBarValue() end this:SetMinMaxValues(1,20) this:SetValueStep(1) getglobal(this:GetName().."Text"):SetText(DPSMate.L["segments"]) getglobal(this:GetName().."Low"):SetText("1") getglobal(this:GetName().."High"):SetText("20") this.aide = DPSMate.L["targetscaleTooltip"] local frames = {"", "_Absorbs", "_AbsorbsTaken", "_Auras", "_Casts", "_CCBreaker", "_CureDisease", "_CureDiseaseReceived", "_CurePoison", "_CurePoisonReceived", "_DamageTaken", "_DamageTakenTotal", "_DamageTotal", "_Deaths", "_Decurses", "_DecursesReceived", "_Dispels", "_DispelsReceived", "_EDD", "_EDT", "_EHealing", "_EHealingTaken", "_Fails", "_FF", "_FFT", "_Healing", "_HealingTaken", "_Interrupts", "_LiftMagic", "_LiftMagicReceived", "_OHealingTaken", "_Overhealing", "_Procs", "_Threat", "_AbsorbsTakenTotal", "_AbsorbsTotal", "_AurasTotal", "_CastsTotal", "_CCBreakerTotal", "_CureDisease_Total", "_CurePoison_Total", "_Deaths_Total", "_Decurses_Total", "_Dispels_Total", "_EDDTotal", "_EDTTotal", "_EHealingTakenTotal", "_EHealingTotal", "_FailsTotal", "_FFTotal", "_FFTTotal", "_HABTotal", "_HealingTakenTotal", "_HealingTotal", "_Interrupts_Total", "_LiftMagic_Total", "_OverhealingTakenTotal", "_OverhealingTotal", "_ProcsTotal", "_ThreatTotal"} this.func = function() DPSMateSettings["targetscale"] = this:GetValue() for _, name in frames do if getglobal("DPSMate_Details"..name) then getglobal("DPSMate_Details"..name):SetScale(DPSMateSettings["targetscale"]/UIParent:GetScale()) end end end this:SetMinMaxValues(0.3,2.0) this:SetValueStep(0.01) getglobal(this:GetName().."Text"):SetText(DPSMate.L["targetscale"]) getglobal(this:GetName().."Low"):SetText("0.3") getglobal(this:GetName().."High"):SetText("2.0") this.aide = DPSMate.L["updateintervalTooltip"] this.func = function() DPSMateSettings["mainupdatetime"] = this:GetValue() end this:SetMinMaxValues(0.016,2.0) this:SetValueStep(0.016) getglobal(this:GetName().."Text"):SetText(DPSMate.L["updateinterval"]) getglobal(this:GetName().."Low"):SetText("0.016") getglobal(this:GetName().."High"):SetText("2.0") this.aide = DPSMate.L["autowipeTooltip"] this.func = function() DPSMateSettings["autowipesessions"] = this:GetValue() end this:SetMinMaxValues(0,30) this:SetValueStep(1) getglobal(this:GetName().."Text"):SetText(DPSMate.L["autowipe"]) getglobal(this:GetName().."Low"):SetText("0") getglobal(this:GetName().."High"):SetText("30") this.aide = DPSMate.L["showtooltipsTooltip"] getglobal(this:GetName().."_Title"):SetText(DPSMate.L["showtooltips"]) DPSMateSettings["showtooltips"] = not DPSMateSettings["showtooltips"] this.aide = DPSMate.L["informativetooltipsTooltip"] getglobal(this:GetName().."_Title"):SetText(DPSMate.L["informativetooltips"]) DPSMateSettings["informativetooltips"] = not DPSMateSettings["informativetooltips"] this.aide = DPSMate.L["subviewrowsTooltip"] this.func = function() DPSMateSettings["subviewrows"] = this:GetValue() end this:SetMinMaxValues(1,10) this:SetValueStep(1) getglobal(this:GetName().."Text"):SetText(DPSMate.L["subviewrows"]) getglobal(this:GetName().."Low"):SetText("1") getglobal(this:GetName().."High"):SetText("10") this.aide = DPSMate.L["TooltipPositionDropDownTooltip"] this.func = DPSMate.Options.TooltipPositionDropDown this.title = DPSMate.L["TooltipPositionDropDown"] UIDropDownMenu_SetWidth(120) getglobal(this:GetName().."_Text"):SetText(this.title) getglobal(this:GetName().."_Title"):SetText(DPSMate.L["shownmodes"]) DPSMate.Options:UpdateConfigModes(this, 0, true) DPSMate.Options:UpdateConfigModes(this, arg1, true) getglobal(this:GetName().."_Title"):SetText(DPSMate.L["hiddenmodes"]) DPSMate.Options:UpdateConfigModes(this, 0, false) DPSMate.Options:UpdateConfigModes(this, arg1, false) this.aide = DPSMate.L["enablebroadcasting"] getglobal(this:GetName().."_Title"):SetText(DPSMate.L["enable"]) DPSMateSettings["broadcasting"] = not DPSMateSettings["broadcasting"] this.aide = DPSMate.L["useraidwarningTooltip"] getglobal(this:GetName().."_Title"):SetText(DPSMate.L["useraidwarning"]) DPSMateSettings["bcrw"] = not DPSMateSettings["bcrw"] this.aide = DPSMate.L["relevantcdsTooltip"] getglobal(this:GetName().."_Title"):SetText(DPSMate.L["relevantcds"]) DPSMateSettings["bccd"] = not DPSMateSettings["bccd"] this.aide = DPSMate.L["ressTooltip"] getglobal(this:GetName().."_Title"):SetText(DPSMate.L["ress"]) DPSMateSettings["bcress"] = not DPSMateSettings["bcress"] this.aide = DPSMate.L["killingblowsTooltip"] getglobal(this:GetName().."_Title"):SetText(DPSMate.L["killingblows"]) DPSMateSettings["bckb"] = not DPSMateSettings["bckb"] this.aide = DPSMate.L["failsTooltip"] getglobal(this:GetName().."_Title"):SetText(DPSMate.L["fails"]) DPSMateSettings["bcfail"] = not DPSMateSettings["bcfail"] getglobal(this:GetName().."_Title"):SetText(DPSMate.L["whatisdpsmate"]) getglobal(this:GetName().."_Text"):SetText(DPSMate.L["whatisdpsmateText"]) getglobal(this:GetName().."_Title"):SetText(DPSMate.L["whocreateddpsmate"]) getglobal(this:GetName().."_Text"):SetText(DPSMate.L["whocreateddpsmateText"]) getglobal(this:GetName().."_Title"):SetText(DPSMate.L["thanksto"]) getglobal(this:GetName().."_Text"):SetHeight(90) getglobal(this:GetName().."_Text"):ClearAllPoints() getglobal(this:GetName().."_Text"):SetPoint("TOPLEFT", this, "TOPLEFT", 5, -5) getglobal(this:GetName().."_Text"):SetText(DPSMate.L["thankstoText"])