diff --git a/MythicPlusDrop/Libs/AceConfig-3.0/AceConfigCmd-3.0/AceConfigCmd-3.0.lua b/MythicPlusDrop/Libs/AceConfig-3.0/AceConfigCmd-3.0/AceConfigCmd-3.0.lua
index 5113875..6dd6438 100644
--- a/MythicPlusDrop/Libs/AceConfig-3.0/AceConfigCmd-3.0/AceConfigCmd-3.0.lua
+++ b/MythicPlusDrop/Libs/AceConfig-3.0/AceConfigCmd-3.0/AceConfigCmd-3.0.lua
@@ -1,7 +1,7 @@
--- AceConfigCmd-3.0 handles access to an options table through the "command line" interface via the ChatFrames.
-- @class file
-- @name AceConfigCmd-3.0
--- @release $Id: AceConfigCmd-3.0.lua 1202 2019-05-15 23:11:22Z nevcairiel $
+-- @release $Id: AceConfigCmd-3.0.lua 1284 2022-09-25 09:15:30Z nevcairiel $
--[[
AceConfigCmd-3.0
@@ -37,17 +37,10 @@ local error, assert = error, assert
-- WoW APIs
local _G = _G
--- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
--- List them here for Mikk's FindGlobals script
--- GLOBALS: LibStub, SELECTED_CHAT_FRAME, DEFAULT_CHAT_FRAME
-
-
local L = setmetatable({}, { -- TODO: replace with proper locale
__index = function(self,k) return k end
})
-
-
local function print(msg)
(SELECTED_CHAT_FRAME or DEFAULT_CHAT_FRAME):AddMessage(msg)
end
@@ -401,7 +394,7 @@ local function handle(info, inputpos, tab, depth, retfalse)
return
end
- local str = strsub(info.input,inputpos);
+ local strInput = strsub(info.input,inputpos);
if tab.type=="execute" then
------------ execute --------------------------------------------
@@ -414,21 +407,21 @@ local function handle(info, inputpos, tab, depth, retfalse)
local res = true
if tab.pattern then
- if not(type(tab.pattern)=="string") then err(info, inputpos, "'pattern' - expected a string") end
- if not strmatch(str, tab.pattern) then
- usererr(info, inputpos, "'"..str.."' - " .. L["invalid input"])
+ if type(tab.pattern)~="string" then err(info, inputpos, "'pattern' - expected a string") end
+ if not strmatch(strInput, tab.pattern) then
+ usererr(info, inputpos, "'"..strInput.."' - " .. L["invalid input"])
return
end
end
- do_final(info, inputpos, tab, "set", str)
+ do_final(info, inputpos, tab, "set", strInput)
elseif tab.type=="toggle" then
------------ toggle --------------------------------------------
local b
- local str = strtrim(strlower(str))
+ local str = strtrim(strlower(strInput))
if str=="" then
b = callmethod(info, inputpos, tab, "get")
@@ -465,9 +458,9 @@ local function handle(info, inputpos, tab, depth, retfalse)
elseif tab.type=="range" then
------------ range --------------------------------------------
- local val = tonumber(str)
+ local val = tonumber(strInput)
if not val then
- usererr(info, inputpos, "'"..str.."' - "..L["expected number"])
+ usererr(info, inputpos, "'"..strInput.."' - "..L["expected number"])
return
end
if type(info.step)=="number" then
@@ -487,7 +480,7 @@ local function handle(info, inputpos, tab, depth, retfalse)
elseif tab.type=="select" then
------------ select ------------------------------------
- local str = strtrim(strlower(str))
+ local str = strtrim(strlower(strInput))
local values = tab.values
if type(values) == "function" or type(values) == "string" then
@@ -528,7 +521,7 @@ local function handle(info, inputpos, tab, depth, retfalse)
elseif tab.type=="multiselect" then
------------ multiselect -------------------------------------------
- local str = strtrim(strlower(str))
+ local str = strtrim(strlower(strInput))
local values = tab.values
if type(values) == "function" or type(values) == "string" then
@@ -565,7 +558,7 @@ local function handle(info, inputpos, tab, depth, retfalse)
--check that the opt is valid
local ok
- for k,v in pairs(values) do
+ for k in pairs(values) do
if strlower(k)==opt then
opt = k -- overwrite with key (in case of case mismatches)
ok = true
@@ -634,7 +627,7 @@ local function handle(info, inputpos, tab, depth, retfalse)
elseif tab.type=="color" then
------------ color --------------------------------------------
- local str = strtrim(strlower(str))
+ local str = strtrim(strlower(strInput))
if str == "" then
--TODO: Show current value
return
@@ -706,7 +699,7 @@ local function handle(info, inputpos, tab, depth, retfalse)
elseif tab.type=="keybinding" then
------------ keybinding --------------------------------------------
- local str = strtrim(strlower(str))
+ local str = strtrim(strlower(strInput))
if str == "" then
--TODO: Show current value
return
diff --git a/MythicPlusDrop/Libs/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua b/MythicPlusDrop/Libs/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua
index a14e07d..4649c73 100644
--- a/MythicPlusDrop/Libs/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua
+++ b/MythicPlusDrop/Libs/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua
@@ -1,13 +1,13 @@
--- AceConfigDialog-3.0 generates AceGUI-3.0 based windows based on option tables.
-- @class file
-- @name AceConfigDialog-3.0
--- @release $Id: AceConfigDialog-3.0.lua 1232 2020-04-14 22:21:22Z nevcairiel $
+-- @release $Id: AceConfigDialog-3.0.lua 1292 2022-09-29 08:00:11Z nevcairiel $
local LibStub = LibStub
local gui = LibStub("AceGUI-3.0")
local reg = LibStub("AceConfigRegistry-3.0")
-local MAJOR, MINOR = "AceConfigDialog-3.0", 79
+local MAJOR, MINOR = "AceConfigDialog-3.0", 85
local AceConfigDialog, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
if not AceConfigDialog then return end
@@ -22,19 +22,13 @@ AceConfigDialog.frame.closing = AceConfigDialog.frame.closing or {}
AceConfigDialog.frame.closeAllOverride = AceConfigDialog.frame.closeAllOverride or {}
-- Lua APIs
-local tinsert, tsort, tremove = table.insert, table.sort, table.remove
+local tinsert, tsort, tremove, wipe = table.insert, table.sort, table.remove, table.wipe
local strmatch, format = string.match, string.format
local error = error
-local pairs, next, select, type, unpack, wipe, ipairs = pairs, next, select, type, unpack, wipe, ipairs
+local pairs, next, select, type, unpack, ipairs = pairs, next, select, type, unpack, ipairs
local tostring, tonumber = tostring, tonumber
local math_min, math_max, math_floor = math.min, math.max, math.floor
--- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
--- List them here for Mikk's FindGlobals script
--- GLOBALS: NORMAL_FONT_COLOR, ACCEPT, CANCEL
--- GLOBALS: PlaySound, GameFontHighlight, GameFontHighlightSmall, GameFontHighlightLarge
--- GLOBALS: CloseSpecialWindows, InterfaceOptions_AddCategory, geterrorhandler
-
local emptyTbl = {}
--[[
@@ -194,9 +188,8 @@ local function GetOptionsMemberValue(membername, option, options, path, appName,
--We have a function to call
local info = new()
--traverse the options table, picking up the handler and filling the info with the path
- local handler
local group = options
- handler = group.handler or handler
+ local handler = group.handler
for i = 1, #path do
group = GetSubOption(group, path[i])
@@ -535,8 +528,7 @@ local function OptionOnMouseLeave(widget, event)
end
local function GetFuncName(option)
- local type = option.type
- if type == "execute" then
+ if option.type == "execute" then
return "func"
else
return "set"
@@ -544,13 +536,15 @@ local function GetFuncName(option)
end
do
local frame = AceConfigDialog.popup
- if not frame then
+ if not frame or oldminor < 81 then
frame = CreateFrame("Frame", nil, UIParent)
AceConfigDialog.popup = frame
frame:Hide()
frame:SetPoint("CENTER", UIParent, "CENTER")
frame:SetSize(320, 72)
+ frame:EnableMouse(true) -- Do not allow click-through on the frame
frame:SetFrameStrata("TOOLTIP")
+ frame:SetFrameLevel(100) -- Lots of room to draw under it
frame:SetScript("OnKeyDown", function(self, key)
if key == "ESCAPE" then
self:SetPropagateKeyboardInput(false)
@@ -564,26 +558,17 @@ do
end
end)
- if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then
- frame:SetBackdrop({
- bgFile = [[Interface\DialogFrame\UI-DialogBox-Background-Dark]],
- edgeFile = [[Interface\DialogFrame\UI-DialogBox-Border]],
- tile = true,
- tileSize = 32,
- edgeSize = 32,
- insets = { left = 11, right = 11, top = 11, bottom = 11 },
- })
- else
- local border = CreateFrame("Frame", nil, frame, "DialogBorderDarkTemplate")
- border:SetAllPoints(frame)
- end
+ local border = CreateFrame("Frame", nil, frame, "DialogBorderOpaqueTemplate")
+ border:SetAllPoints(frame)
+ frame:SetFixedFrameStrata(true)
+ frame:SetFixedFrameLevel(true)
local text = frame:CreateFontString(nil, "ARTWORK", "GameFontHighlight")
text:SetSize(290, 0)
text:SetPoint("TOP", 0, -16)
frame.text = text
- local function newButton(text)
+ local function newButton(newText)
local button = CreateFrame("Button", nil, frame)
button:SetSize(128, 21)
button:SetNormalFontObject(GameFontNormal)
@@ -594,7 +579,7 @@ do
button:GetPushedTexture():SetTexCoord(0.0, 1.0, 0.0, 0.71875)
button:SetHighlightTexture(130762) -- "Interface\\Buttons\\UI-DialogBox-Button-Highlight"
button:GetHighlightTexture():SetTexCoord(0.0, 1.0, 0.0, 0.71875)
- button:SetText(text)
+ button:SetText(newText)
return button
end
@@ -681,7 +666,7 @@ local function ActivateControl(widget, event, ...)
if group[funcname] ~= nil then
func = group[funcname]
end
- handler = group.handler or handler
+ handler = group.handler
confirm = group.confirm
validate = group.validate
for i = 1, #path do
@@ -745,7 +730,6 @@ local function ActivateControl(widget, event, ...)
end
end
- local rootframe = user.rootframe
if not validated or type(validated) == "string" then
if not validated then
if usage then
@@ -760,8 +744,8 @@ local function ActivateControl(widget, event, ...)
end
-- show validate message
- if rootframe.SetStatusText then
- rootframe:SetStatusText(validated)
+ if user.rootframe.SetStatusText then
+ user.rootframe:SetStatusText(validated)
else
validationErrorPopup(validated)
end
@@ -798,14 +782,14 @@ local function ActivateControl(widget, event, ...)
if type(confirm) == "boolean" then
if confirm then
if not confirmText then
- local name, desc = option.name, option.desc
- if type(name) == "function" then
- name = name(info)
+ local option_name, desc = option.name, option.desc
+ if type(option_name) == "function" then
+ option_name = option_name(info)
end
if type(desc) == "function" then
desc = desc(info)
end
- confirmText = name
+ confirmText = option_name
if desc then
confirmText = confirmText.." - "..desc
end
@@ -1147,8 +1131,6 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin
--Control to feed
local control
- local name = GetOptionsMemberValue("name", v, options, path, appName)
-
if v.type == "execute" then
local imageCoords = GetOptionsMemberValue("imageCoords",v, options, path, appName)
@@ -1251,7 +1233,7 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin
end
tsort(sorting, sortTblAsStrings)
end
- for k, value in ipairs(sorting) do
+ for _, value in ipairs(sorting) do
local text = values[value]
local radio = gui:Create("CheckBox")
radio:SetLabel(text)
@@ -1333,8 +1315,8 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin
control:SetWidth(width_multiplier)
end
--check:SetTriState(v.tristate)
- for i = 1, #valuesort do
- local key = valuesort[i]
+ for s = 1, #valuesort do
+ local key = valuesort[s]
local value = GetOptionsMemberValue("get",v, options, path, appName, key)
control:SetItemValue(key,value)
end
@@ -1346,8 +1328,8 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin
control:PauseLayout()
local width = GetOptionsMemberValue("width",v,options,path,appName)
- for i = 1, #valuesort do
- local value = valuesort[i]
+ for s = 1, #valuesort do
+ local value = valuesort[s]
local text = values[value]
local check = gui:Create("CheckBox")
check:SetLabel(text)
@@ -1364,7 +1346,7 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin
elseif width == "half" then
check:SetWidth(width_multiplier / 2)
elseif (type(width) == "number") then
- control:SetWidth(width_multiplier * width)
+ check:SetWidth(width_multiplier * width)
elseif width == "full" then
check.width = "fill"
else
@@ -1434,8 +1416,8 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin
end
control:SetImageSize(width, height)
end
- local width = GetOptionsMemberValue("width",v,options,path,appName)
- control.width = not width and "fill"
+ local controlWidth = GetOptionsMemberValue("width",v,options,path,appName)
+ control.width = not controlWidth and "fill"
end
--Common Init
@@ -1690,29 +1672,29 @@ function AceConfigDialog:FeedGroup(appName,options,container,rootframe,path, isR
elseif grouptype == "select" then
- local select = gui:Create("DropdownGroup")
- select:SetTitle(name)
- InjectInfo(select, options, group, path, rootframe, appName)
- select:SetCallback("OnGroupSelected", GroupSelected)
+ local selectGroup = gui:Create("DropdownGroup")
+ selectGroup:SetTitle(name)
+ InjectInfo(selectGroup, options, group, path, rootframe, appName)
+ selectGroup:SetCallback("OnGroupSelected", GroupSelected)
local status = AceConfigDialog:GetStatusTable(appName, path)
if not status.groups then
status.groups = {}
end
- select:SetStatusTable(status.groups)
+ selectGroup:SetStatusTable(status.groups)
local grouplist, orderlist = BuildSelect(group, options, path, appName)
- select:SetGroupList(grouplist, orderlist)
- select:SetUserData("grouplist", grouplist)
- select:SetUserData("orderlist", orderlist)
+ selectGroup:SetGroupList(grouplist, orderlist)
+ selectGroup:SetUserData("grouplist", grouplist)
+ selectGroup:SetUserData("orderlist", orderlist)
local firstgroup = orderlist[1]
if firstgroup then
- select:SetGroup((GroupExists(appName, options, path,status.groups.selected) and status.groups.selected) or firstgroup)
+ selectGroup:SetGroup((GroupExists(appName, options, path,status.groups.selected) and status.groups.selected) or firstgroup)
end
- select.width = "fill"
- select.height = "fill"
+ selectGroup.width = "fill"
+ selectGroup.height = "fill"
- container:AddChild(select)
+ container:AddChild(selectGroup)
--assume tree group by default
--if parenttype is tree then this group is already a node on that tree
@@ -1940,13 +1922,13 @@ end
-- convert pre-39 BlizOptions structure to the new format
if oldminor and oldminor < 39 and AceConfigDialog.BlizOptions then
local old = AceConfigDialog.BlizOptions
- local new = {}
+ local newOpt = {}
for key, widget in pairs(old) do
local appName = widget:GetUserData("appName")
- if not new[appName] then new[appName] = {} end
- new[appName][key] = widget
+ if not newOpt[appName] then newOpt[appName] = {} end
+ newOpt[appName][key] = widget
end
- AceConfigDialog.BlizOptions = new
+ AceConfigDialog.BlizOptions = newOpt
else
AceConfigDialog.BlizOptions = AceConfigDialog.BlizOptions or {}
end
@@ -1979,6 +1961,7 @@ end
-- @param parent The parent to use in the interface options tree.
-- @param ... The path in the options table to feed into the interface options panel.
-- @return The reference to the frame registered into the Interface Options.
+-- @return The category ID to pass to Settings.OpenToCategory (or InterfaceOptionsFrame_OpenToCategory)
function AceConfigDialog:AddToBlizOptions(appName, name, parent, ...)
local BlizOptions = AceConfigDialog.BlizOptions
@@ -1994,7 +1977,6 @@ function AceConfigDialog:AddToBlizOptions(appName, name, parent, ...)
if not BlizOptions[appName][key] then
local group = gui:Create("BlizOptionsGroup")
BlizOptions[appName][key] = group
- group:SetName(name or appName, parent)
group:SetTitle(name or appName)
group:SetUserData("appName", appName)
@@ -2007,8 +1989,30 @@ function AceConfigDialog:AddToBlizOptions(appName, name, parent, ...)
end
group:SetCallback("OnShow", FeedToBlizPanel)
group:SetCallback("OnHide", ClearBlizPanel)
- InterfaceOptions_AddCategory(group.frame)
- return group.frame
+ if Settings and Settings.RegisterCanvasLayoutCategory then
+ local categoryName = name or appName
+ if parent then
+ local category = Settings.GetCategory(parent)
+ if not category then
+ error(("The parent category '%s' was not found"):format(parent), 2)
+ end
+ local subcategory = Settings.RegisterCanvasLayoutSubcategory(category, group.frame, categoryName)
+
+ -- force the generated ID to be used for subcategories, as these can have very simple names like "Profiles"
+ group:SetName(subcategory.ID, parent)
+ else
+ local category = Settings.RegisterCanvasLayoutCategory(group.frame, categoryName)
+ -- using appName here would be cleaner, but would not be 100% compatible
+ -- but for top-level categories it should be fine, as these are typically addon names
+ category.ID = categoryName
+ group:SetName(categoryName, parent)
+ Settings.RegisterAddOnCategory(category)
+ end
+ else
+ group:SetName(name or appName, parent)
+ InterfaceOptions_AddCategory(group.frame)
+ end
+ return group.frame, group.frame.name
else
error(("%s has already been added to the Blizzard Options Window with the given path"):format(appName), 2)
end
diff --git a/MythicPlusDrop/Libs/AceConsole-3.0/AceConsole-3.0.lua b/MythicPlusDrop/Libs/AceConsole-3.0/AceConsole-3.0.lua
index 678fa95..2361a3b 100644
--- a/MythicPlusDrop/Libs/AceConsole-3.0/AceConsole-3.0.lua
+++ b/MythicPlusDrop/Libs/AceConsole-3.0/AceConsole-3.0.lua
@@ -9,7 +9,7 @@
-- make into AceConsole.
-- @class file
-- @name AceConsole-3.0
--- @release $Id: AceConsole-3.0.lua 1202 2019-05-15 23:11:22Z nevcairiel $
+-- @release $Id: AceConsole-3.0.lua 1284 2022-09-25 09:15:30Z nevcairiel $
local MAJOR,MINOR = "AceConsole-3.0", 7
local AceConsole, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
@@ -29,10 +29,6 @@ local max = math.max
-- WoW APIs
local _G = _G
--- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
--- List them here for Mikk's FindGlobals script
--- GLOBALS: DEFAULT_CHAT_FRAME, SlashCmdList, hash_SlashCmdList
-
local tmp={}
local function Print(self,frame,...)
local n=0
@@ -174,7 +170,7 @@ function AceConsole:GetArgs(str, numargs, startpos)
while true do
-- find delimiter or hyperlink
- local ch,_
+ local _
pos,_,ch = strfind(str, delim_or_pipe, pos)
if not pos then break end
diff --git a/MythicPlusDrop/Libs/AceDB-3.0/AceDB-3.0.lua b/MythicPlusDrop/Libs/AceDB-3.0/AceDB-3.0.lua
index 440330f..804cf2b 100644
--- a/MythicPlusDrop/Libs/AceDB-3.0/AceDB-3.0.lua
+++ b/MythicPlusDrop/Libs/AceDB-3.0/AceDB-3.0.lua
@@ -40,7 +40,7 @@
-- end
-- @class file
-- @name AceDB-3.0.lua
--- @release $Id: AceDB-3.0.lua 1217 2019-07-11 03:06:18Z funkydude $
+-- @release $Id: AceDB-3.0.lua 1284 2022-09-25 09:15:30Z nevcairiel $
local ACEDB_MAJOR, ACEDB_MINOR = "AceDB-3.0", 27
local AceDB = LibStub:NewLibrary(ACEDB_MAJOR, ACEDB_MINOR)
@@ -53,10 +53,6 @@ local setmetatable, rawset, rawget = setmetatable, rawset, rawget
-- WoW APIs
local _G = _G
--- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
--- List them here for Mikk's FindGlobals script
--- GLOBALS: LibStub
-
AceDB.db_registry = AceDB.db_registry or {}
AceDB.frame = AceDB.frame or CreateFrame("Frame")
@@ -98,11 +94,11 @@ local function copyDefaults(dest, src)
-- This is a metatable used for table defaults
local mt = {
-- This handles the lookup and creation of new subtables
- __index = function(t,k)
- if k == nil then return nil end
+ __index = function(t,k2)
+ if k2 == nil then return nil end
local tbl = {}
copyDefaults(tbl, v)
- rawset(t, k, tbl)
+ rawset(t, k2, tbl)
return tbl
end,
}
@@ -115,7 +111,7 @@ local function copyDefaults(dest, src)
end
else
-- Values are not tables, so this is just a simple return
- local mt = {__index = function(t,k) return k~=nil and v or nil end}
+ local mt = {__index = function(t,k2) return k2~=nil and v or nil end}
setmetatable(dest, mt)
end
elseif type(v) == "table" then
diff --git a/MythicPlusDrop/Libs/AceDBOptions-3.0/AceDBOptions-3.0.lua b/MythicPlusDrop/Libs/AceDBOptions-3.0/AceDBOptions-3.0.lua
new file mode 100644
index 0000000..9029c66
--- /dev/null
+++ b/MythicPlusDrop/Libs/AceDBOptions-3.0/AceDBOptions-3.0.lua
@@ -0,0 +1,456 @@
+--- AceDBOptions-3.0 provides a universal AceConfig options screen for managing AceDB-3.0 profiles.
+-- @class file
+-- @name AceDBOptions-3.0
+-- @release $Id: AceDBOptions-3.0.lua 1284 2022-09-25 09:15:30Z nevcairiel $
+local ACEDBO_MAJOR, ACEDBO_MINOR = "AceDBOptions-3.0", 15
+local AceDBOptions = LibStub:NewLibrary(ACEDBO_MAJOR, ACEDBO_MINOR)
+
+if not AceDBOptions then return end -- No upgrade needed
+
+-- Lua APIs
+local pairs, next = pairs, next
+
+-- WoW APIs
+local UnitClass = UnitClass
+
+AceDBOptions.optionTables = AceDBOptions.optionTables or {}
+AceDBOptions.handlers = AceDBOptions.handlers or {}
+
+--[[
+ Localization of AceDBOptions-3.0
+]]
+
+local L = {
+ choose = "Existing Profiles",
+ choose_desc = "You can either create a new profile by entering a name in the editbox, or choose one of the already existing profiles.",
+ choose_sub = "Select one of your currently available profiles.",
+ copy = "Copy From",
+ copy_desc = "Copy the settings from one existing profile into the currently active profile.",
+ current = "Current Profile:",
+ default = "Default",
+ delete = "Delete a Profile",
+ delete_confirm = "Are you sure you want to delete the selected profile?",
+ delete_desc = "Delete existing and unused profiles from the database to save space, and cleanup the SavedVariables file.",
+ delete_sub = "Deletes a profile from the database.",
+ intro = "You can change the active database profile, so you can have different settings for every character.",
+ new = "New",
+ new_sub = "Create a new empty profile.",
+ profiles = "Profiles",
+ profiles_sub = "Manage Profiles",
+ reset = "Reset Profile",
+ reset_desc = "Reset the current profile back to its default values, in case your configuration is broken, or you simply want to start over.",
+ reset_sub = "Reset the current profile to the default",
+}
+
+local LOCALE = GetLocale()
+if LOCALE == "deDE" then
+ L["choose"] = "Vorhandene Profile"
+ L["choose_desc"] = "Du kannst ein neues Profil erstellen, indem du einen neuen Namen in der Eingabebox 'Neu' eingibst, oder wähle eines der vorhandenen Profile aus."
+ L["choose_sub"] = "Wählt ein bereits vorhandenes Profil aus."
+ L["copy"] = "Kopieren von..."
+ L["copy_desc"] = "Kopiere die Einstellungen von einem vorhandenen Profil in das aktive Profil."
+ L["current"] = "Aktuelles Profil:"
+ L["default"] = "Standard"
+ L["delete"] = "Profil löschen"
+ L["delete_confirm"] = "Willst du das ausgewählte Profil wirklich löschen?"
+ L["delete_desc"] = "Lösche vorhandene oder unbenutzte Profile aus der Datenbank, um Platz zu sparen und die SavedVariables-Datei 'sauber' zu halten."
+ L["delete_sub"] = "Löscht ein Profil aus der Datenbank."
+ L["intro"] = "Hier kannst du das aktive Datenbankprofil ändern, damit du verschiedene Einstellungen für jeden Charakter erstellen kannst, wodurch eine sehr flexible Konfiguration möglich wird."
+ L["new"] = "Neu"
+ L["new_sub"] = "Ein neues Profil erstellen."
+ L["profiles"] = "Profile"
+ L["profiles_sub"] = "Profile verwalten"
+ L["reset"] = "Profil zurücksetzen"
+ L["reset_desc"] = "Setzt das momentane Profil auf Standardwerte zurück, für den Fall, dass mit der Konfiguration etwas schief lief oder weil du einfach neu starten willst."
+ L["reset_sub"] = "Das aktuelle Profil auf Standard zurücksetzen."
+elseif LOCALE == "frFR" then
+ L["choose"] = "Profils existants"
+ L["choose_desc"] = "Vous pouvez créer un nouveau profil en entrant un nouveau nom dans la boîte de saisie, ou en choississant un des profils déjà existants."
+ L["choose_sub"] = "Permet de choisir un des profils déjà disponibles."
+ L["copy"] = "Copier à partir de"
+ L["copy_desc"] = "Copie les paramètres d'un profil déjà existant dans le profil actuellement actif."
+ L["current"] = "Profil actuel :"
+ L["default"] = "Défaut"
+ L["delete"] = "Supprimer un profil"
+ L["delete_confirm"] = "Etes-vous sûr de vouloir supprimer le profil sélectionné ?"
+ L["delete_desc"] = "Supprime les profils existants inutilisés de la base de données afin de gagner de la place et de nettoyer le fichier SavedVariables."
+ L["delete_sub"] = "Supprime un profil de la base de données."
+ L["intro"] = "Vous pouvez changer le profil actuel afin d'avoir des paramètres différents pour chaque personnage, permettant ainsi d'avoir une configuration très flexible."
+ L["new"] = "Nouveau"
+ L["new_sub"] = "Créée un nouveau profil vierge."
+ L["profiles"] = "Profils"
+ L["profiles_sub"] = "Gestion des profils"
+ L["reset"] = "Réinitialiser le profil"
+ L["reset_desc"] = "Réinitialise le profil actuel au cas où votre configuration est corrompue ou si vous voulez tout simplement faire table rase."
+ L["reset_sub"] = "Réinitialise le profil actuel avec les paramètres par défaut."
+elseif LOCALE == "koKR" then
+ L["choose"] = "저장 중인 프로필"
+ L["choose_desc"] = "입력창에 새로운 이름을 입력하거나 저장 중인 프로필 중 하나를 선택하여 새로운 프로필을 만들 수 있습니다."
+ L["choose_sub"] = "현재 이용할 수 있는 프로필 중 하나를 선택합니다."
+ L["copy"] = "복사해오기"
+ L["copy_desc"] = "현재 사용 중인 프로필에 선택한 프로필의 설정을 복사합니다."
+ L["current"] = "현재 프로필:"
+ L["default"] = "기본값"
+ L["delete"] = "프로필 삭제"
+ L["delete_confirm"] = "정말로 선택한 프로필을 삭제할까요?"
+ L["delete_desc"] = "저장 공간 절약과 SavedVariables 파일의 정리를 위해 데이터베이스에서 사용하지 않는 프로필을 삭제하세요."
+ L["delete_sub"] = "데이터베이스의 프로필을 삭제합니다."
+ L["intro"] = "활성 데이터베이스 프로필을 변경할 수 있고, 각 캐릭터 별로 다른 설정을 할 수 있습니다."
+ L["new"] = "새로운 프로필"
+ L["new_sub"] = "새로운 프로필을 만듭니다."
+ L["profiles"] = "프로필"
+ L["profiles_sub"] = "프로필 관리"
+ L["reset"] = "프로필 초기화"
+ L["reset_desc"] = "설정이 깨졌거나 처음부터 다시 설정을 원하는 경우, 현재 프로필을 기본값으로 초기화하세요."
+ L["reset_sub"] = "현재 프로필을 기본값으로 초기화합니다"
+elseif LOCALE == "esES" or LOCALE == "esMX" then
+ L["choose"] = "Perfiles existentes"
+ L["choose_desc"] = "Puedes crear un nuevo perfil introduciendo un nombre en el recuadro o puedes seleccionar un perfil de los ya existentes."
+ L["choose_sub"] = "Selecciona uno de los perfiles disponibles."
+ L["copy"] = "Copiar de"
+ L["copy_desc"] = "Copia los ajustes de un perfil existente al perfil actual."
+ L["current"] = "Perfil actual:"
+ L["default"] = "Por defecto"
+ L["delete"] = "Borrar un Perfil"
+ L["delete_confirm"] = "¿Estas seguro que quieres borrar el perfil seleccionado?"
+ L["delete_desc"] = "Borra los perfiles existentes y sin uso de la base de datos para ganar espacio y limpiar el archivo SavedVariables."
+ L["delete_sub"] = "Borra un perfil de la base de datos."
+ L["intro"] = "Puedes cambiar el perfil activo de tal manera que cada personaje tenga diferentes configuraciones."
+ L["new"] = "Nuevo"
+ L["new_sub"] = "Crear un nuevo perfil vacio."
+ L["profiles"] = "Perfiles"
+ L["profiles_sub"] = "Manejar Perfiles"
+ L["reset"] = "Reiniciar Perfil"
+ L["reset_desc"] = "Reinicia el perfil actual a los valores por defectos, en caso de que se haya estropeado la configuración o quieras volver a empezar de nuevo."
+ L["reset_sub"] = "Reinicar el perfil actual al de por defecto"
+elseif LOCALE == "zhTW" then
+ L["choose"] = "現有的設定檔"
+ L["choose_desc"] = "您可以在文字方塊內輸入名字以建立新的設定檔,或是選擇一個現有的設定檔使用。"
+ L["choose_sub"] = "從當前可用的設定檔裡面選擇一個。"
+ L["copy"] = "複製自"
+ L["copy_desc"] = "從一個現有的設定檔,將設定複製到現在使用中的設定檔。"
+ L["current"] = "目前設定檔:"
+ L["default"] = "預設"
+ L["delete"] = "刪除一個設定檔"
+ L["delete_confirm"] = "確定要刪除所選擇的設定檔嗎?"
+ L["delete_desc"] = "從資料庫裡刪除不再使用的設定檔,以節省空間,並且清理 SavedVariables 檔案。"
+ L["delete_sub"] = "從資料庫裡刪除一個設定檔。"
+ L["intro"] = "您可以從資料庫中選擇一個設定檔來使用,如此就可以讓每個角色使用不同的設定。"
+ L["new"] = "新建"
+ L["new_sub"] = "新建一個空的設定檔。"
+ L["profiles"] = "設定檔"
+ L["profiles_sub"] = "管理設定檔"
+ L["reset"] = "重置設定檔"
+ L["reset_desc"] = "將現用的設定檔重置為預設值;用於設定檔損壞,或者單純想要重來的情況。"
+ L["reset_sub"] = "將目前的設定檔重置為預設值"
+elseif LOCALE == "zhCN" then
+ L["choose"] = "现有的配置文件"
+ L["choose_desc"] = "你可以通过在文本框内输入一个名字创立一个新的配置文件,也可以选择一个已经存在的配置文件。"
+ L["choose_sub"] = "从当前可用的配置文件里面选择一个。"
+ L["copy"] = "复制自"
+ L["copy_desc"] = "从当前某个已保存的配置文件复制到当前正使用的配置文件。"
+ L["current"] = "当前配置文件:"
+ L["default"] = "默认"
+ L["delete"] = "删除一个配置文件"
+ L["delete_confirm"] = "你确定要删除所选择的配置文件么?"
+ L["delete_desc"] = "从数据库里删除不再使用的配置文件,以节省空间,并且清理SavedVariables文件。"
+ L["delete_sub"] = "从数据库里删除一个配置文件。"
+ L["intro"] = "你可以选择一个活动的数据配置文件,这样你的每个角色就可以拥有不同的设置值,可以给你的插件配置带来极大的灵活性。"
+ L["new"] = "新建"
+ L["new_sub"] = "新建一个空的配置文件。"
+ L["profiles"] = "配置文件"
+ L["profiles_sub"] = "管理配置文件"
+ L["reset"] = "重置配置文件"
+ L["reset_desc"] = "将当前的配置文件恢复到它的默认值,用于你的配置文件损坏,或者你只是想重来的情况。"
+ L["reset_sub"] = "将当前的配置文件恢复为默认值"
+elseif LOCALE == "ruRU" then
+ L["choose"] = "Существующие профили"
+ L["choose_desc"] = "Вы можете создать новый профиль, введя название в поле ввода, или выбрать один из уже существующих профилей."
+ L["choose_sub"] = "Выбор одиного из уже доступных профилей"
+ L["copy"] = "Скопировать из"
+ L["copy_desc"] = "Скопировать настройки из выбранного профиля в активный."
+ L["current"] = "Текущий профиль:"
+ L["default"] = "По умолчанию"
+ L["delete"] = "Удалить профиль"
+ L["delete_confirm"] = "Вы уверены, что вы хотите удалить выбранный профиль?"
+ L["delete_desc"] = "Удалить существующий и неиспользуемый профиль из БД для сохранения места, и очистить SavedVariables файл."
+ L["delete_sub"] = "Удаление профиля из БД"
+ L["intro"] = "Изменяя активный профиль, вы можете задать различные настройки модификаций для каждого персонажа."
+ L["new"] = "Новый"
+ L["new_sub"] = "Создать новый чистый профиль"
+ L["profiles"] = "Профили"
+ L["profiles_sub"] = "Управление профилями"
+ L["reset"] = "Сброс профиля"
+ L["reset_desc"] = "Сбросить текущий профиль к стандартным настройкам, если ваша конфигурация испорчена или вы хотите настроить всё заново."
+ L["reset_sub"] = "Сброс текущего профиля на стандартный"
+elseif LOCALE == "itIT" then
+ L["choose"] = "Profili Esistenti"
+ L["choose_desc"] = "Puoi creare un nuovo profilo digitando il nome della casella di testo, oppure scegliendone uno tra i profili già esistenti."
+ L["choose_sub"] = "Seleziona uno dei profili attualmente disponibili."
+ L["copy"] = "Copia Da"
+ L["copy_desc"] = "Copia le impostazioni da un profilo esistente, nel profilo attivo in questo momento."
+ L["current"] = "Profilo Attivo:"
+ L["default"] = "Standard"
+ L["delete"] = "Cancella un Profilo"
+ L["delete_confirm"] = "Sei sicuro di voler cancellare il profilo selezionato?"
+ L["delete_desc"] = "Cancella i profili non utilizzati dal database per risparmiare spazio e mantenere puliti i file di configurazione SavedVariables."
+ L["delete_sub"] = "Cancella un profilo dal Database."
+ L["intro"] = "Puoi cambiare il profilo attivo, in modo da usare impostazioni diverse per ogni personaggio."
+ L["new"] = "Nuovo"
+ L["new_sub"] = "Crea un nuovo profilo vuoto."
+ L["profiles"] = "Profili"
+ L["profiles_sub"] = "Gestisci Profili"
+ L["reset"] = "Reimposta Profilo"
+ L["reset_desc"] = "Riporta il tuo profilo attivo alle sue impostazioni predefinite, nel caso in cui la tua configurazione si sia corrotta, o semplicemente tu voglia re-inizializzarla."
+ L["reset_sub"] = "Reimposta il profilo ai suoi valori predefiniti."
+elseif LOCALE == "ptBR" then
+ L["choose"] = "Perfis Existentes"
+ L["choose_desc"] = "Você pode tanto criar um perfil novo tanto digitando um nome na caixa de texto, quanto escolher um dos perfis já existentes."
+ L["choose_sub"] = "Selecione um de seus perfis atualmente disponíveis."
+ L["copy"] = "Copiar De"
+ L["copy_desc"] = "Copia as definições de um perfil existente no perfil atualmente ativo."
+ L["current"] = "Perfil Autal:"
+ L["default"] = "Padrão"
+ L["delete"] = "Remover um Perfil"
+ L["delete_confirm"] = "Tem certeza que deseja remover o perfil selecionado?"
+ L["delete_desc"] = "Remove perfis existentes e inutilizados do banco de dados para economizar espaço, e limpar o arquivo SavedVariables."
+ L["delete_sub"] = "Remove um perfil do banco de dados."
+ L["intro"] = "Você pode alterar o perfil do banco de dados ativo, para que possa ter definições diferentes para cada personagem."
+ L["new"] = "Novo"
+ L["new_sub"] = "Cria um novo perfil vazio."
+ L["profiles"] = "Perfis"
+ L["profiles_sub"] = "Gerenciar Perfis"
+ L["reset"] = "Resetar Perfil"
+ L["reset_desc"] = "Reseta o perfil atual para os valores padrões, no caso de sua configuração estar quebrada, ou simplesmente se deseja começar novamente."
+ L["reset_sub"] = "Resetar o perfil atual ao padrão"
+end
+
+local defaultProfiles
+local tmpprofiles = {}
+
+-- Get a list of available profiles for the specified database.
+-- You can specify which profiles to include/exclude in the list using the two boolean parameters listed below.
+-- @param db The db object to retrieve the profiles from
+-- @param common If true, getProfileList will add the default profiles to the return list, even if they have not been created yet
+-- @param nocurrent If true, then getProfileList will not display the current profile in the list
+-- @return Hashtable of all profiles with the internal name as keys and the display name as value.
+local function getProfileList(db, common, nocurrent)
+ local profiles = {}
+
+ -- copy existing profiles into the table
+ local currentProfile = db:GetCurrentProfile()
+ for i,v in pairs(db:GetProfiles(tmpprofiles)) do
+ if not (nocurrent and v == currentProfile) then
+ profiles[v] = v
+ end
+ end
+
+ -- add our default profiles to choose from ( or rename existing profiles)
+ for k,v in pairs(defaultProfiles) do
+ if (common or profiles[k]) and not (nocurrent and k == currentProfile) then
+ profiles[k] = v
+ end
+ end
+
+ return profiles
+end
+
+--[[
+ OptionsHandlerPrototype
+ prototype class for handling the options in a sane way
+]]
+local OptionsHandlerPrototype = {}
+
+--[[ Reset the profile ]]
+function OptionsHandlerPrototype:Reset()
+ self.db:ResetProfile()
+end
+
+--[[ Set the profile to value ]]
+function OptionsHandlerPrototype:SetProfile(info, value)
+ self.db:SetProfile(value)
+end
+
+--[[ returns the currently active profile ]]
+function OptionsHandlerPrototype:GetCurrentProfile()
+ return self.db:GetCurrentProfile()
+end
+
+--[[
+ List all active profiles
+ you can control the output with the .arg variable
+ currently four modes are supported
+
+ (empty) - return all available profiles
+ "nocurrent" - returns all available profiles except the currently active profile
+ "common" - returns all avaialble profiles + some commonly used profiles ("char - realm", "realm", "class", "Default")
+ "both" - common except the active profile
+]]
+function OptionsHandlerPrototype:ListProfiles(info)
+ local arg = info.arg
+ local profiles
+ if arg == "common" and not self.noDefaultProfiles then
+ profiles = getProfileList(self.db, true, nil)
+ elseif arg == "nocurrent" then
+ profiles = getProfileList(self.db, nil, true)
+ elseif arg == "both" then -- currently not used
+ profiles = getProfileList(self.db, (not self.noDefaultProfiles) and true, true)
+ else
+ profiles = getProfileList(self.db)
+ end
+
+ return profiles
+end
+
+function OptionsHandlerPrototype:HasNoProfiles(info)
+ local profiles = self:ListProfiles(info)
+ return ((not next(profiles)) and true or false)
+end
+
+--[[ Copy a profile ]]
+function OptionsHandlerPrototype:CopyProfile(info, value)
+ self.db:CopyProfile(value)
+end
+
+--[[ Delete a profile from the db ]]
+function OptionsHandlerPrototype:DeleteProfile(info, value)
+ self.db:DeleteProfile(value)
+end
+
+--[[ fill defaultProfiles with some generic values ]]
+local function generateDefaultProfiles(db)
+ defaultProfiles = {
+ ["Default"] = L["default"],
+ [db.keys.char] = db.keys.char,
+ [db.keys.realm] = db.keys.realm,
+ [db.keys.class] = UnitClass("player")
+ }
+end
+
+--[[ create and return a handler object for the db, or upgrade it if it already existed ]]
+local function getOptionsHandler(db, noDefaultProfiles)
+ if not defaultProfiles then
+ generateDefaultProfiles(db)
+ end
+
+ local handler = AceDBOptions.handlers[db] or { db = db, noDefaultProfiles = noDefaultProfiles }
+
+ for k,v in pairs(OptionsHandlerPrototype) do
+ handler[k] = v
+ end
+
+ AceDBOptions.handlers[db] = handler
+ return handler
+end
+
+--[[
+ the real options table
+]]
+local optionsTable = {
+ desc = {
+ order = 1,
+ type = "description",
+ name = L["intro"] .. "\n",
+ },
+ descreset = {
+ order = 9,
+ type = "description",
+ name = L["reset_desc"],
+ },
+ reset = {
+ order = 10,
+ type = "execute",
+ name = L["reset"],
+ desc = L["reset_sub"],
+ func = "Reset",
+ },
+ current = {
+ order = 11,
+ type = "description",
+ name = function(info) return L["current"] .. " " .. NORMAL_FONT_COLOR_CODE .. info.handler:GetCurrentProfile() .. FONT_COLOR_CODE_CLOSE end,
+ width = "default",
+ },
+ choosedesc = {
+ order = 20,
+ type = "description",
+ name = "\n" .. L["choose_desc"],
+ },
+ new = {
+ name = L["new"],
+ desc = L["new_sub"],
+ type = "input",
+ order = 30,
+ get = false,
+ set = "SetProfile",
+ },
+ choose = {
+ name = L["choose"],
+ desc = L["choose_sub"],
+ type = "select",
+ order = 40,
+ get = "GetCurrentProfile",
+ set = "SetProfile",
+ values = "ListProfiles",
+ arg = "common",
+ },
+ copydesc = {
+ order = 50,
+ type = "description",
+ name = "\n" .. L["copy_desc"],
+ },
+ copyfrom = {
+ order = 60,
+ type = "select",
+ name = L["copy"],
+ desc = L["copy_desc"],
+ get = false,
+ set = "CopyProfile",
+ values = "ListProfiles",
+ disabled = "HasNoProfiles",
+ arg = "nocurrent",
+ },
+ deldesc = {
+ order = 70,
+ type = "description",
+ name = "\n" .. L["delete_desc"],
+ },
+ delete = {
+ order = 80,
+ type = "select",
+ name = L["delete"],
+ desc = L["delete_sub"],
+ get = false,
+ set = "DeleteProfile",
+ values = "ListProfiles",
+ disabled = "HasNoProfiles",
+ arg = "nocurrent",
+ confirm = true,
+ confirmText = L["delete_confirm"],
+ },
+}
+
+--- Get/Create a option table that you can use in your addon to control the profiles of AceDB-3.0.
+-- @param db The database object to create the options table for.
+-- @return The options table to be used in AceConfig-3.0
+-- @usage
+-- -- Assuming `options` is your top-level options table and `self.db` is your database:
+-- options.args.profiles = LibStub("AceDBOptions-3.0"):GetOptionsTable(self.db)
+function AceDBOptions:GetOptionsTable(db, noDefaultProfiles)
+ local tbl = AceDBOptions.optionTables[db] or {
+ type = "group",
+ name = L["profiles"],
+ desc = L["profiles_sub"],
+ }
+
+ tbl.handler = getOptionsHandler(db, noDefaultProfiles)
+ tbl.args = optionsTable
+
+ AceDBOptions.optionTables[db] = tbl
+ return tbl
+end
+
+-- upgrade existing tables
+for db,tbl in pairs(AceDBOptions.optionTables) do
+ tbl.handler = getOptionsHandler(db)
+ tbl.args = optionsTable
+end
diff --git a/MythicPlusDrop/Libs/AceDBOptions-3.0/AceDBOptions-3.0.xml b/MythicPlusDrop/Libs/AceDBOptions-3.0/AceDBOptions-3.0.xml
new file mode 100644
index 0000000..51305f9
--- /dev/null
+++ b/MythicPlusDrop/Libs/AceDBOptions-3.0/AceDBOptions-3.0.xml
@@ -0,0 +1,4 @@
+
+
+
diff --git a/MythicPlusDrop/Libs/AceGUI-3.0-SharedMediaWidgets/BackgroundWidget.lua b/MythicPlusDrop/Libs/AceGUI-3.0-SharedMediaWidgets/BackgroundWidget.lua
new file mode 100644
index 0000000..19ad608
--- /dev/null
+++ b/MythicPlusDrop/Libs/AceGUI-3.0-SharedMediaWidgets/BackgroundWidget.lua
@@ -0,0 +1,235 @@
+-- Widget is based on the AceGUIWidget-DropDown.lua supplied with AceGUI-3.0
+-- Widget created by Yssaril
+
+local AceGUI = LibStub("AceGUI-3.0")
+local Media = LibStub("LibSharedMedia-3.0")
+
+local AGSMW = LibStub("AceGUISharedMediaWidgets-1.0")
+
+do
+ local widgetType = "LSM30_Background"
+ local widgetVersion = 13
+
+ local contentFrameCache = {}
+ local function ReturnSelf(self)
+ self:ClearAllPoints()
+ self:Hide()
+ self.check:Hide()
+ table.insert(contentFrameCache, self)
+ end
+
+ local function ContentOnClick(this, button)
+ local self = this.obj
+ self:Fire("OnValueChanged", this.text:GetText())
+ if self.dropdown then
+ self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
+ end
+ end
+
+ local function ContentOnEnter(this, button)
+ local self = this.obj
+ local text = this.text:GetText()
+ local background = self.list[text] ~= text and self.list[text] or Media:Fetch('background',text)
+ self.dropdown.bgTex:SetTexture(background)
+ end
+
+ local function GetContentLine()
+ local frame
+ if next(contentFrameCache) then
+ frame = table.remove(contentFrameCache)
+ else
+ frame = CreateFrame("Button", nil, UIParent, BackdropTemplateMixin and "BackdropTemplate")
+ --frame:SetWidth(200)
+ frame:SetHeight(18)
+ frame:SetHighlightTexture([[Interface\QuestFrame\UI-QuestTitleHighlight]], "ADD")
+ frame:SetScript("OnClick", ContentOnClick)
+ frame:SetScript("OnEnter", ContentOnEnter)
+
+ local check = frame:CreateTexture("OVERLAY")
+ check:SetWidth(16)
+ check:SetHeight(16)
+ check:SetPoint("LEFT",frame,"LEFT",1,-1)
+ check:SetTexture("Interface\\Buttons\\UI-CheckBox-Check")
+ check:Hide()
+ frame.check = check
+
+ local text = frame:CreateFontString(nil,"OVERLAY","GameFontWhite")
+ local font, size = text:GetFont()
+ text:SetFont(font,size,"OUTLINE")
+
+ text:SetPoint("TOPLEFT", check, "TOPRIGHT", 1, 0)
+ text:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -2, 0)
+ text:SetJustifyH("LEFT")
+ text:SetText("Test Test Test Test Test Test Test")
+ frame.text = text
+
+ frame.ReturnSelf = ReturnSelf
+ end
+ frame:Show()
+ return frame
+ end
+
+ local function OnAcquire(self)
+ self:SetHeight(44)
+ self:SetWidth(200)
+ end
+
+ local function OnRelease(self)
+ self:SetText("")
+ self:SetLabel("")
+ self:SetDisabled(false)
+
+ self.value = nil
+ self.list = nil
+ self.open = nil
+ self.hasClose = nil
+
+ self.frame:ClearAllPoints()
+ self.frame:Hide()
+ end
+
+ local function SetValue(self, value) -- Set the value to an item in the List.
+ if self.list then
+ self:SetText(value or "")
+ end
+ self.value = value
+ end
+
+ local function GetValue(self)
+ return self.value
+ end
+
+ local function SetList(self, list) -- Set the list of values for the dropdown (key => value pairs)
+ self.list = list or Media:HashTable("background")
+ end
+
+
+ local function SetText(self, text) -- Set the text displayed in the box.
+ self.frame.text:SetText(text or "")
+ local background = self.list[text] ~= text and self.list[text] or Media:Fetch('background',text)
+
+ self.frame.displayButton:SetBackdrop({bgFile = background,
+ edgeFile = "Interface/Tooltips/UI-Tooltip-Border",
+ edgeSize = 16,
+ insets = { left = 4, right = 4, top = 4, bottom = 4 }})
+ end
+
+ local function SetLabel(self, text) -- Set the text for the label.
+ self.frame.label:SetText(text or "")
+ end
+
+ local function AddItem(self, key, value) -- Add an item to the list.
+ self.list = self.list or {}
+ self.list[key] = value
+ end
+ local SetItemValue = AddItem -- Set the value of a item in the list. <>
+
+ local function SetMultiselect(self, flag) end -- Toggle multi-selecting. <>
+ local function GetMultiselect() return false end-- Query the multi-select flag. <>
+ local function SetItemDisabled(self, key) end-- Disable one item in the list. <>
+
+ local function SetDisabled(self, disabled) -- Disable the widget.
+ self.disabled = disabled
+ if disabled then
+ self.frame:Disable()
+ self.frame.displayButton:SetBackdropColor(.2,.2,.2,1)
+ else
+ self.frame:Enable()
+ self.frame.displayButton:SetBackdropColor(1,1,1,1)
+ end
+ end
+
+ local function textSort(a,b)
+ return string.upper(a) < string.upper(b)
+ end
+
+ local sortedlist = {}
+ local function ToggleDrop(this)
+ local self = this.obj
+ if self.dropdown then
+ self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
+ AceGUI:ClearFocus()
+ else
+ AceGUI:SetFocus(self)
+ self.dropdown = AGSMW:GetDropDownFrame()
+ local width = self.frame:GetWidth()
+ self.dropdown:SetPoint("TOPLEFT", self.frame, "BOTTOMLEFT")
+ self.dropdown:SetPoint("TOPRIGHT", self.frame, "BOTTOMRIGHT", width < 160 and (160 - width) or 0, 0)
+ for k, v in pairs(self.list) do
+ sortedlist[#sortedlist+1] = k
+ end
+ table.sort(sortedlist, textSort)
+ for i, k in ipairs(sortedlist) do
+ local f = GetContentLine()
+ f.text:SetText(k)
+ --print(k)
+ if k == self.value then
+ f.check:Show()
+ end
+ f.obj = self
+ f.dropdown = self.dropdown
+ self.dropdown:AddFrame(f)
+ end
+ wipe(sortedlist)
+ end
+ end
+
+ local function ClearFocus(self)
+ if self.dropdown then
+ self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
+ end
+ end
+
+ local function OnHide(this)
+ local self = this.obj
+ if self.dropdown then
+ self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
+ end
+ end
+
+ local function Drop_OnEnter(this)
+ this.obj:Fire("OnEnter")
+ end
+
+ local function Drop_OnLeave(this)
+ this.obj:Fire("OnLeave")
+ end
+
+ local function Constructor()
+ local frame = AGSMW:GetBaseFrameWithWindow()
+ local self = {}
+
+ self.type = widgetType
+ self.frame = frame
+ frame.obj = self
+ frame.dropButton.obj = self
+ frame.dropButton:SetScript("OnEnter", Drop_OnEnter)
+ frame.dropButton:SetScript("OnLeave", Drop_OnLeave)
+ frame.dropButton:SetScript("OnClick",ToggleDrop)
+ frame:SetScript("OnHide", OnHide)
+
+ self.alignoffset = 31
+
+ self.OnRelease = OnRelease
+ self.OnAcquire = OnAcquire
+ self.ClearFocus = ClearFocus
+ self.SetText = SetText
+ self.SetValue = SetValue
+ self.GetValue = GetValue
+ self.SetList = SetList
+ self.SetLabel = SetLabel
+ self.SetDisabled = SetDisabled
+ self.AddItem = AddItem
+ self.SetMultiselect = SetMultiselect
+ self.GetMultiselect = GetMultiselect
+ self.SetItemValue = SetItemValue
+ self.SetItemDisabled = SetItemDisabled
+ self.ToggleDrop = ToggleDrop
+
+ AceGUI:RegisterAsWidget(self)
+ return self
+ end
+
+ AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion)
+
+end
diff --git a/MythicPlusDrop/Libs/AceGUI-3.0-SharedMediaWidgets/BorderWidget.lua b/MythicPlusDrop/Libs/AceGUI-3.0-SharedMediaWidgets/BorderWidget.lua
new file mode 100644
index 0000000..0f2cbea
--- /dev/null
+++ b/MythicPlusDrop/Libs/AceGUI-3.0-SharedMediaWidgets/BorderWidget.lua
@@ -0,0 +1,230 @@
+-- Widget is based on the AceGUIWidget-DropDown.lua supplied with AceGUI-3.0
+-- Widget created by Yssaril
+
+local AceGUI = LibStub("AceGUI-3.0")
+local Media = LibStub("LibSharedMedia-3.0")
+
+local AGSMW = LibStub("AceGUISharedMediaWidgets-1.0")
+
+do
+ local widgetType = "LSM30_Border"
+ local widgetVersion = 13
+
+ local contentFrameCache = {}
+ local function ReturnSelf(self)
+ self:ClearAllPoints()
+ self:Hide()
+ self.check:Hide()
+ table.insert(contentFrameCache, self)
+ end
+
+ local function ContentOnClick(this, button)
+ local self = this.obj
+ self:Fire("OnValueChanged", this.text:GetText())
+ if self.dropdown then
+ self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
+ end
+ end
+
+ local function ContentOnEnter(this, button)
+ local self = this.obj
+ local text = this.text:GetText()
+ local border = self.list[text] ~= text and self.list[text] or Media:Fetch('border',text)
+ this.dropdown:SetBackdrop({edgeFile = border,
+ bgFile=[[Interface\DialogFrame\UI-DialogBox-Background-Dark]],
+ tile = true, tileSize = 16, edgeSize = 16,
+ insets = { left = 4, right = 4, top = 4, bottom = 4 }})
+ end
+
+ local function GetContentLine()
+ local frame
+ if next(contentFrameCache) then
+ frame = table.remove(contentFrameCache)
+ else
+ frame = CreateFrame("Button", nil, UIParent)
+ --frame:SetWidth(200)
+ frame:SetHeight(18)
+ frame:SetHighlightTexture([[Interface\QuestFrame\UI-QuestTitleHighlight]], "ADD")
+ frame:SetScript("OnClick", ContentOnClick)
+ frame:SetScript("OnEnter", ContentOnEnter)
+ local check = frame:CreateTexture("OVERLAY")
+ check:SetWidth(16)
+ check:SetHeight(16)
+ check:SetPoint("LEFT",frame,"LEFT",1,-1)
+ check:SetTexture("Interface\\Buttons\\UI-CheckBox-Check")
+ check:Hide()
+ frame.check = check
+ local text = frame:CreateFontString(nil,"OVERLAY","GameFontWhite")
+ text:SetPoint("TOPLEFT", check, "TOPRIGHT", 1, 0)
+ text:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -2, 0)
+ text:SetJustifyH("LEFT")
+ text:SetText("Test Test Test Test Test Test Test")
+ frame.text = text
+ frame.ReturnSelf = ReturnSelf
+ end
+ frame:Show()
+ return frame
+ end
+
+ local function OnAcquire(self)
+ self:SetHeight(44)
+ self:SetWidth(200)
+ end
+
+ local function OnRelease(self)
+ self:SetText("")
+ self:SetLabel("")
+ self:SetDisabled(false)
+
+ self.value = nil
+ self.list = nil
+ self.open = nil
+ self.hasClose = nil
+
+ self.frame:ClearAllPoints()
+ self.frame:Hide()
+ end
+
+ local function SetValue(self, value) -- Set the value to an item in the List.
+ if self.list then
+ self:SetText(value or "")
+ end
+ self.value = value
+ end
+
+ local function GetValue(self)
+ return self.value
+ end
+
+ local function SetList(self, list) -- Set the list of values for the dropdown (key => value pairs)
+ self.list = list or Media:HashTable("border")
+ end
+
+
+ local function SetText(self, text) -- Set the text displayed in the box.
+ self.frame.text:SetText(text or "")
+ local border = self.list[text] ~= text and self.list[text] or Media:Fetch('border',text)
+
+ self.frame.displayButton:SetBackdrop({edgeFile = border,
+ bgFile=[[Interface\DialogFrame\UI-DialogBox-Background-Dark]],
+ tile = true, tileSize = 16, edgeSize = 16,
+ insets = { left = 4, right = 4, top = 4, bottom = 4 }})
+ end
+
+ local function SetLabel(self, text) -- Set the text for the label.
+ self.frame.label:SetText(text or "")
+ end
+
+ local function AddItem(self, key, value) -- Add an item to the list.
+ self.list = self.list or {}
+ self.list[key] = value
+ end
+ local SetItemValue = AddItem -- Set the value of a item in the list. <>
+
+ local function SetMultiselect(self, flag) end -- Toggle multi-selecting. <>
+ local function GetMultiselect() return false end-- Query the multi-select flag. <>
+ local function SetItemDisabled(self, key) end-- Disable one item in the list. <>
+
+ local function SetDisabled(self, disabled) -- Disable the widget.
+ self.disabled = disabled
+ if disabled then
+ self.frame:Disable()
+ else
+ self.frame:Enable()
+ end
+ end
+
+ local function textSort(a,b)
+ return string.upper(a) < string.upper(b)
+ end
+
+ local sortedlist = {}
+ local function ToggleDrop(this)
+ local self = this.obj
+ if self.dropdown then
+ self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
+ AceGUI:ClearFocus()
+ else
+ AceGUI:SetFocus(self)
+ self.dropdown = AGSMW:GetDropDownFrame()
+ local width = self.frame:GetWidth()
+ self.dropdown:SetPoint("TOPLEFT", self.frame, "BOTTOMLEFT")
+ self.dropdown:SetPoint("TOPRIGHT", self.frame, "BOTTOMRIGHT", width < 160 and (160 - width) or 0, 0)
+ for k, v in pairs(self.list) do
+ sortedlist[#sortedlist+1] = k
+ end
+ table.sort(sortedlist, textSort)
+ for i, k in ipairs(sortedlist) do
+ local f = GetContentLine()
+ f.text:SetText(k)
+ --print(k)
+ if k == self.value then
+ f.check:Show()
+ end
+ f.obj = self
+ f.dropdown = self.dropdown
+ self.dropdown:AddFrame(f)
+ end
+ wipe(sortedlist)
+ end
+ end
+
+ local function ClearFocus(self)
+ if self.dropdown then
+ self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
+ end
+ end
+
+ local function OnHide(this)
+ local self = this.obj
+ if self.dropdown then
+ self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
+ end
+ end
+
+ local function Drop_OnEnter(this)
+ this.obj:Fire("OnEnter")
+ end
+
+ local function Drop_OnLeave(this)
+ this.obj:Fire("OnLeave")
+ end
+
+ local function Constructor()
+ local frame = AGSMW:GetBaseFrameWithWindow()
+ local self = {}
+
+ self.type = widgetType
+ self.frame = frame
+ frame.obj = self
+ frame.dropButton.obj = self
+ frame.dropButton:SetScript("OnEnter", Drop_OnEnter)
+ frame.dropButton:SetScript("OnLeave", Drop_OnLeave)
+ frame.dropButton:SetScript("OnClick",ToggleDrop)
+ frame:SetScript("OnHide", OnHide)
+
+ self.alignoffset = 31
+
+ self.OnRelease = OnRelease
+ self.OnAcquire = OnAcquire
+ self.ClearFocus = ClearFocus
+ self.SetText = SetText
+ self.SetValue = SetValue
+ self.GetValue = GetValue
+ self.SetList = SetList
+ self.SetLabel = SetLabel
+ self.SetDisabled = SetDisabled
+ self.AddItem = AddItem
+ self.SetMultiselect = SetMultiselect
+ self.GetMultiselect = GetMultiselect
+ self.SetItemValue = SetItemValue
+ self.SetItemDisabled = SetItemDisabled
+ self.ToggleDrop = ToggleDrop
+
+ AceGUI:RegisterAsWidget(self)
+ return self
+ end
+
+ AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion)
+
+end
diff --git a/MythicPlusDrop/Libs/AceGUI-3.0-SharedMediaWidgets/FontWidget.lua b/MythicPlusDrop/Libs/AceGUI-3.0-SharedMediaWidgets/FontWidget.lua
new file mode 100644
index 0000000..e9f98b9
--- /dev/null
+++ b/MythicPlusDrop/Libs/AceGUI-3.0-SharedMediaWidgets/FontWidget.lua
@@ -0,0 +1,216 @@
+-- Widget is based on the AceGUIWidget-DropDown.lua supplied with AceGUI-3.0
+-- Widget created by Yssaril
+
+local AceGUI = LibStub("AceGUI-3.0")
+local Media = LibStub("LibSharedMedia-3.0")
+
+local AGSMW = LibStub("AceGUISharedMediaWidgets-1.0")
+
+do
+ local widgetType = "LSM30_Font"
+ local widgetVersion = 13
+
+ local contentFrameCache = {}
+ local function ReturnSelf(self)
+ self:ClearAllPoints()
+ self:Hide()
+ self.check:Hide()
+ table.insert(contentFrameCache, self)
+ end
+
+ local function ContentOnClick(this, button)
+ local self = this.obj
+ self:Fire("OnValueChanged", this.text:GetText())
+ if self.dropdown then
+ self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
+ end
+ end
+
+ local function GetContentLine()
+ local frame
+ if next(contentFrameCache) then
+ frame = table.remove(contentFrameCache)
+ else
+ frame = CreateFrame("Button", nil, UIParent)
+ --frame:SetWidth(200)
+ frame:SetHeight(18)
+ frame:SetHighlightTexture([[Interface\QuestFrame\UI-QuestTitleHighlight]], "ADD")
+ frame:SetScript("OnClick", ContentOnClick)
+ local check = frame:CreateTexture("OVERLAY")
+ check:SetWidth(16)
+ check:SetHeight(16)
+ check:SetPoint("LEFT",frame,"LEFT",1,-1)
+ check:SetTexture("Interface\\Buttons\\UI-CheckBox-Check")
+ check:Hide()
+ frame.check = check
+ local text = frame:CreateFontString(nil,"OVERLAY","GameFontWhite")
+ text:SetPoint("TOPLEFT", check, "TOPRIGHT", 1, 0)
+ text:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -2, 0)
+ text:SetJustifyH("LEFT")
+ text:SetText("Test Test Test Test Test Test Test")
+ frame.text = text
+ frame.ReturnSelf = ReturnSelf
+ end
+ frame:Show()
+ return frame
+ end
+
+ local function OnAcquire(self)
+ self:SetHeight(44)
+ self:SetWidth(200)
+ end
+
+ local function OnRelease(self)
+ self:SetText("")
+ self:SetLabel("")
+ self:SetDisabled(false)
+
+ self.value = nil
+ self.list = nil
+ self.open = nil
+ self.hasClose = nil
+
+ self.frame:ClearAllPoints()
+ self.frame:Hide()
+ end
+
+ local function SetValue(self, value) -- Set the value to an item in the List.
+ if self.list then
+ self:SetText(value or "")
+ end
+ self.value = value
+ end
+
+ local function GetValue(self)
+ return self.value
+ end
+
+ local function SetList(self, list) -- Set the list of values for the dropdown (key => value pairs)
+ self.list = list or Media:HashTable("font")
+ end
+
+ local function SetText(self, text) -- Set the text displayed in the box.
+ self.frame.text:SetText(text or "")
+ local font = self.list[text] ~= text and self.list[text] or Media:Fetch('font',text)
+ local _, size, outline= self.frame.text:GetFont()
+ self.frame.text:SetFont(font,size,outline)
+ end
+
+ local function SetLabel(self, text) -- Set the text for the label.
+ self.frame.label:SetText(text or "")
+ end
+
+ local function AddItem(self, key, value) -- Add an item to the list.
+ self.list = self.list or {}
+ self.list[key] = value
+ end
+ local SetItemValue = AddItem -- Set the value of a item in the list. <>
+
+ local function SetMultiselect(self, flag) end -- Toggle multi-selecting. <>
+ local function GetMultiselect() return false end-- Query the multi-select flag. <>
+ local function SetItemDisabled(self, key) end-- Disable one item in the list. <>
+
+ local function SetDisabled(self, disabled) -- Disable the widget.
+ self.disabled = disabled
+ if disabled then
+ self.frame:Disable()
+ else
+ self.frame:Enable()
+ end
+ end
+
+ local function textSort(a,b)
+ return string.upper(a) < string.upper(b)
+ end
+
+ local sortedlist = {}
+ local function ToggleDrop(this)
+ local self = this.obj
+ if self.dropdown then
+ self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
+ AceGUI:ClearFocus()
+ else
+ AceGUI:SetFocus(self)
+ self.dropdown = AGSMW:GetDropDownFrame()
+ local width = self.frame:GetWidth()
+ self.dropdown:SetPoint("TOPLEFT", self.frame, "BOTTOMLEFT")
+ self.dropdown:SetPoint("TOPRIGHT", self.frame, "BOTTOMRIGHT", width < 160 and (160 - width) or 0, 0)
+ for k, v in pairs(self.list) do
+ sortedlist[#sortedlist+1] = k
+ end
+ table.sort(sortedlist, textSort)
+ for i, k in ipairs(sortedlist) do
+ local f = GetContentLine()
+ local _, size, outline= f.text:GetFont()
+ local font = self.list[k] ~= k and self.list[k] or Media:Fetch('font',k)
+ f.text:SetFont(font,size,outline)
+ f.text:SetText(k)
+ if k == self.value then
+ f.check:Show()
+ end
+ f.obj = self
+ self.dropdown:AddFrame(f)
+ end
+ wipe(sortedlist)
+ end
+ end
+
+ local function ClearFocus(self)
+ if self.dropdown then
+ self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
+ end
+ end
+
+ local function OnHide(this)
+ local self = this.obj
+ if self.dropdown then
+ self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
+ end
+ end
+
+ local function Drop_OnEnter(this)
+ this.obj:Fire("OnEnter")
+ end
+
+ local function Drop_OnLeave(this)
+ this.obj:Fire("OnLeave")
+ end
+
+ local function Constructor()
+ local frame = AGSMW:GetBaseFrame()
+ local self = {}
+
+ self.type = widgetType
+ self.frame = frame
+ frame.obj = self
+ frame.dropButton.obj = self
+ frame.dropButton:SetScript("OnEnter", Drop_OnEnter)
+ frame.dropButton:SetScript("OnLeave", Drop_OnLeave)
+ frame.dropButton:SetScript("OnClick",ToggleDrop)
+ frame:SetScript("OnHide", OnHide)
+
+ self.alignoffset = 31
+
+ self.OnRelease = OnRelease
+ self.OnAcquire = OnAcquire
+ self.ClearFocus = ClearFocus
+ self.SetText = SetText
+ self.SetValue = SetValue
+ self.GetValue = GetValue
+ self.SetList = SetList
+ self.SetLabel = SetLabel
+ self.SetDisabled = SetDisabled
+ self.AddItem = AddItem
+ self.SetMultiselect = SetMultiselect
+ self.GetMultiselect = GetMultiselect
+ self.SetItemValue = SetItemValue
+ self.SetItemDisabled = SetItemDisabled
+ self.ToggleDrop = ToggleDrop
+
+ AceGUI:RegisterAsWidget(self)
+ return self
+ end
+
+ AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion)
+
+end
diff --git a/MythicPlusDrop/Libs/AceGUI-3.0-SharedMediaWidgets/SoundWidget.lua b/MythicPlusDrop/Libs/AceGUI-3.0-SharedMediaWidgets/SoundWidget.lua
new file mode 100644
index 0000000..77557a5
--- /dev/null
+++ b/MythicPlusDrop/Libs/AceGUI-3.0-SharedMediaWidgets/SoundWidget.lua
@@ -0,0 +1,264 @@
+-- Widget is based on the AceGUIWidget-DropDown.lua supplied with AceGUI-3.0
+-- Widget created by Yssaril
+
+local AceGUI = LibStub("AceGUI-3.0")
+local Media = LibStub("LibSharedMedia-3.0")
+
+local AGSMW = LibStub("AceGUISharedMediaWidgets-1.0")
+
+do
+ local widgetType = "LSM30_Sound"
+ local widgetVersion = 13
+
+ local contentFrameCache = {}
+ local function ReturnSelf(self)
+ self:ClearAllPoints()
+ self:Hide()
+ self.check:Hide()
+ table.insert(contentFrameCache, self)
+ end
+
+ local function ContentOnClick(this, button)
+ local self = this.obj
+ self:Fire("OnValueChanged", this.text:GetText())
+ if self.dropdown then
+ self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
+ end
+ end
+
+ local function ContentSpeakerOnClick(this, button)
+ local self = this.frame.obj
+ local sound = this.frame.text:GetText()
+ PlaySoundFile(self.list[sound] ~= sound and self.list[sound] or Media:Fetch('sound',sound), "Master")
+ end
+
+ local function GetContentLine()
+ local frame
+ if next(contentFrameCache) then
+ frame = table.remove(contentFrameCache)
+ else
+ frame = CreateFrame("Button", nil, UIParent)
+ --frame:SetWidth(200)
+ frame:SetHeight(18)
+ frame:SetHighlightTexture([[Interface\QuestFrame\UI-QuestTitleHighlight]], "ADD")
+ frame:SetScript("OnClick", ContentOnClick)
+ local check = frame:CreateTexture("OVERLAY")
+ check:SetWidth(16)
+ check:SetHeight(16)
+ check:SetPoint("LEFT",frame,"LEFT",1,-1)
+ check:SetTexture("Interface\\Buttons\\UI-CheckBox-Check")
+ check:Hide()
+ frame.check = check
+
+ local soundbutton = CreateFrame("Button", nil, frame)
+ soundbutton:SetWidth(16)
+ soundbutton:SetHeight(16)
+ soundbutton:SetPoint("RIGHT",frame,"RIGHT",-1,0)
+ soundbutton.frame = frame
+ soundbutton:SetScript("OnClick", ContentSpeakerOnClick)
+ frame.soundbutton = soundbutton
+
+ local speaker = soundbutton:CreateTexture(nil, "BACKGROUND")
+ speaker:SetTexture("Interface\\Common\\VoiceChat-Speaker")
+ speaker:SetAllPoints(soundbutton)
+ frame.speaker = speaker
+ local speakeron = soundbutton:CreateTexture(nil, "HIGHLIGHT")
+ speakeron:SetTexture("Interface\\Common\\VoiceChat-On")
+ speakeron:SetAllPoints(soundbutton)
+ frame.speakeron = speakeron
+
+ local text = frame:CreateFontString(nil,"OVERLAY","GameFontWhite")
+ text:SetPoint("TOPLEFT", check, "TOPRIGHT", 1, 0)
+ text:SetPoint("BOTTOMRIGHT", soundbutton, "BOTTOMLEFT", -2, 0)
+ text:SetJustifyH("LEFT")
+ text:SetText("Test Test Test Test Test Test Test")
+ frame.text = text
+ frame.ReturnSelf = ReturnSelf
+ end
+ frame:Show()
+ return frame
+ end
+
+ local function OnAcquire(self)
+ self:SetHeight(44)
+ self:SetWidth(200)
+ end
+
+ local function OnRelease(self)
+ self:SetText("")
+ self:SetLabel("")
+ self:SetDisabled(false)
+
+ self.value = nil
+ self.list = nil
+ self.open = nil
+ self.hasClose = nil
+
+ self.frame:ClearAllPoints()
+ self.frame:Hide()
+ end
+
+ local function SetValue(self, value) -- Set the value to an item in the List.
+ if self.list then
+ self:SetText(value or "")
+ end
+ self.value = value
+ end
+
+ local function GetValue(self)
+ return self.value
+ end
+
+ local function SetList(self, list) -- Set the list of values for the dropdown (key => value pairs)
+ self.list = list or Media:HashTable("sound")
+ end
+
+ local function SetText(self, text) -- Set the text displayed in the box.
+ self.frame.text:SetText(text or "")
+ end
+
+ local function SetLabel(self, text) -- Set the text for the label.
+ self.frame.label:SetText(text or "")
+ end
+
+ local function AddItem(self, key, value) -- Add an item to the list.
+ self.list = self.list or {}
+ self.list[key] = value
+ end
+ local SetItemValue = AddItem -- Set the value of a item in the list. <>
+
+ local function SetMultiselect(self, flag) end -- Toggle multi-selecting. <>
+ local function GetMultiselect() return false end-- Query the multi-select flag. <>
+ local function SetItemDisabled(self, key) end-- Disable one item in the list. <>
+
+ local function SetDisabled(self, disabled) -- Disable the widget.
+ self.disabled = disabled
+ if disabled then
+ self.frame:Disable()
+ self.speaker:SetDesaturated(true)
+ self.speakeron:SetDesaturated(true)
+ else
+ self.frame:Enable()
+ self.speaker:SetDesaturated(false)
+ self.speakeron:SetDesaturated(false)
+ end
+ end
+
+ local function textSort(a,b)
+ return string.upper(a) < string.upper(b)
+ end
+
+ local sortedlist = {}
+ local function ToggleDrop(this)
+ local self = this.obj
+ if self.dropdown then
+ self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
+ AceGUI:ClearFocus()
+ else
+ AceGUI:SetFocus(self)
+ self.dropdown = AGSMW:GetDropDownFrame()
+ local width = self.frame:GetWidth()
+ self.dropdown:SetPoint("TOPLEFT", self.frame, "BOTTOMLEFT")
+ self.dropdown:SetPoint("TOPRIGHT", self.frame, "BOTTOMRIGHT", width < 160 and (160 - width) or 0, 0)
+ for k, v in pairs(self.list) do
+ sortedlist[#sortedlist+1] = k
+ end
+ table.sort(sortedlist, textSort)
+ for i, k in ipairs(sortedlist) do
+ local f = GetContentLine()
+ f.text:SetText(k)
+ if k == self.value then
+ f.check:Show()
+ end
+ f.obj = self
+ self.dropdown:AddFrame(f)
+ end
+ wipe(sortedlist)
+ end
+ end
+
+ local function ClearFocus(self)
+ if self.dropdown then
+ self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
+ end
+ end
+
+ local function OnHide(this)
+ local self = this.obj
+ if self.dropdown then
+ self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
+ end
+ end
+
+ local function Drop_OnEnter(this)
+ this.obj:Fire("OnEnter")
+ end
+
+ local function Drop_OnLeave(this)
+ this.obj:Fire("OnLeave")
+ end
+
+ local function WidgetPlaySound(this)
+ local self = this.obj
+ local sound = self.frame.text:GetText()
+ PlaySoundFile(self.list[sound] ~= sound and self.list[sound] or Media:Fetch('sound',sound), "Master")
+ end
+
+ local function Constructor()
+ local frame = AGSMW:GetBaseFrame()
+ local self = {}
+
+ self.type = widgetType
+ self.frame = frame
+ frame.obj = self
+ frame.dropButton.obj = self
+ frame.dropButton:SetScript("OnEnter", Drop_OnEnter)
+ frame.dropButton:SetScript("OnLeave", Drop_OnLeave)
+ frame.dropButton:SetScript("OnClick",ToggleDrop)
+ frame:SetScript("OnHide", OnHide)
+
+
+ local soundbutton = CreateFrame("Button", nil, frame)
+ soundbutton:SetWidth(16)
+ soundbutton:SetHeight(16)
+ soundbutton:SetPoint("LEFT",frame.DLeft,"LEFT",26,1)
+ soundbutton:SetScript("OnClick", WidgetPlaySound)
+ soundbutton.obj = self
+ self.soundbutton = soundbutton
+ frame.text:SetPoint("LEFT",soundbutton,"RIGHT",2,0)
+
+
+ local speaker = soundbutton:CreateTexture(nil, "BACKGROUND")
+ speaker:SetTexture("Interface\\Common\\VoiceChat-Speaker")
+ speaker:SetAllPoints(soundbutton)
+ self.speaker = speaker
+ local speakeron = soundbutton:CreateTexture(nil, "HIGHLIGHT")
+ speakeron:SetTexture("Interface\\Common\\VoiceChat-On")
+ speakeron:SetAllPoints(soundbutton)
+ self.speakeron = speakeron
+
+ self.alignoffset = 31
+
+ self.OnRelease = OnRelease
+ self.OnAcquire = OnAcquire
+ self.ClearFocus = ClearFocus
+ self.SetText = SetText
+ self.SetValue = SetValue
+ self.GetValue = GetValue
+ self.SetList = SetList
+ self.SetLabel = SetLabel
+ self.SetDisabled = SetDisabled
+ self.AddItem = AddItem
+ self.SetMultiselect = SetMultiselect
+ self.GetMultiselect = GetMultiselect
+ self.SetItemValue = SetItemValue
+ self.SetItemDisabled = SetItemDisabled
+ self.ToggleDrop = ToggleDrop
+
+ AceGUI:RegisterAsWidget(self)
+ return self
+ end
+
+ AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion)
+
+end
diff --git a/MythicPlusDrop/Libs/AceGUI-3.0-SharedMediaWidgets/StatusbarWidget.lua b/MythicPlusDrop/Libs/AceGUI-3.0-SharedMediaWidgets/StatusbarWidget.lua
new file mode 100644
index 0000000..05467aa
--- /dev/null
+++ b/MythicPlusDrop/Libs/AceGUI-3.0-SharedMediaWidgets/StatusbarWidget.lua
@@ -0,0 +1,233 @@
+-- Widget is based on the AceGUIWidget-DropDown.lua supplied with AceGUI-3.0
+-- Widget created by Yssaril
+
+local AceGUI = LibStub("AceGUI-3.0")
+local Media = LibStub("LibSharedMedia-3.0")
+
+local AGSMW = LibStub("AceGUISharedMediaWidgets-1.0")
+
+do
+ local widgetType = "LSM30_Statusbar"
+ local widgetVersion = 13
+
+ local contentFrameCache = {}
+ local function ReturnSelf(self)
+ self:ClearAllPoints()
+ self:Hide()
+ self.check:Hide()
+ table.insert(contentFrameCache, self)
+ end
+
+ local function ContentOnClick(this, button)
+ local self = this.obj
+ self:Fire("OnValueChanged", this.text:GetText())
+ if self.dropdown then
+ self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
+ end
+ end
+
+ local function GetContentLine()
+ local frame
+ if next(contentFrameCache) then
+ frame = table.remove(contentFrameCache)
+ else
+ frame = CreateFrame("Button", nil, UIParent)
+ --frame:SetWidth(200)
+ frame:SetHeight(18)
+ frame:SetHighlightTexture([[Interface\QuestFrame\UI-QuestTitleHighlight]], "ADD")
+ frame:SetScript("OnClick", ContentOnClick)
+ local check = frame:CreateTexture("OVERLAY")
+ check:SetWidth(16)
+ check:SetHeight(16)
+ check:SetPoint("LEFT",frame,"LEFT",1,-1)
+ check:SetTexture("Interface\\Buttons\\UI-CheckBox-Check")
+ check:Hide()
+ frame.check = check
+ local bar = frame:CreateTexture("ARTWORK")
+ bar:SetHeight(16)
+ bar:SetPoint("LEFT",check,"RIGHT",1,0)
+ bar:SetPoint("RIGHT",frame,"RIGHT",-1,0)
+ frame.bar = bar
+ local text = frame:CreateFontString(nil,"OVERLAY","GameFontWhite")
+
+ local font, size = text:GetFont()
+ text:SetFont(font,size,"OUTLINE")
+
+ text:SetPoint("TOPLEFT", check, "TOPRIGHT", 3, 0)
+ text:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -2, 0)
+ text:SetJustifyH("LEFT")
+ text:SetText("Test Test Test Test Test Test Test")
+ frame.text = text
+ frame.ReturnSelf = ReturnSelf
+ end
+ frame:Show()
+ return frame
+ end
+
+ local function OnAcquire(self)
+ self:SetHeight(44)
+ self:SetWidth(200)
+ end
+
+ local function OnRelease(self)
+ self:SetText("")
+ self:SetLabel("")
+ self:SetDisabled(false)
+
+ self.value = nil
+ self.list = nil
+ self.open = nil
+ self.hasClose = nil
+
+ self.frame:ClearAllPoints()
+ self.frame:Hide()
+ end
+
+ local function SetValue(self, value) -- Set the value to an item in the List.
+ if self.list then
+ self:SetText(value or "")
+ end
+ self.value = value
+ end
+
+ local function GetValue(self)
+ return self.value
+ end
+
+ local function SetList(self, list) -- Set the list of values for the dropdown (key => value pairs)
+ self.list = list or Media:HashTable("statusbar")
+ end
+
+
+ local function SetText(self, text) -- Set the text displayed in the box.
+ self.frame.text:SetText(text or "")
+ local statusbar = self.list[text] ~= text and self.list[text] or Media:Fetch('statusbar',text)
+ self.bar:SetTexture(statusbar)
+ end
+
+ local function SetLabel(self, text) -- Set the text for the label.
+ self.frame.label:SetText(text or "")
+ end
+
+ local function AddItem(self, key, value) -- Add an item to the list.
+ self.list = self.list or {}
+ self.list[key] = value
+ end
+ local SetItemValue = AddItem -- Set the value of a item in the list. <>
+
+ local function SetMultiselect(self, flag) end -- Toggle multi-selecting. <>
+ local function GetMultiselect() return false end-- Query the multi-select flag. <>
+ local function SetItemDisabled(self, key) end-- Disable one item in the list. <>
+
+ local function SetDisabled(self, disabled) -- Disable the widget.
+ self.disabled = disabled
+ if disabled then
+ self.frame:Disable()
+ else
+ self.frame:Enable()
+ end
+ end
+
+ local function textSort(a,b)
+ return string.upper(a) < string.upper(b)
+ end
+
+ local sortedlist = {}
+ local function ToggleDrop(this)
+ local self = this.obj
+ if self.dropdown then
+ self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
+ AceGUI:ClearFocus()
+ else
+ AceGUI:SetFocus(self)
+ self.dropdown = AGSMW:GetDropDownFrame()
+ local width = self.frame:GetWidth()
+ self.dropdown:SetPoint("TOPLEFT", self.frame, "BOTTOMLEFT")
+ self.dropdown:SetPoint("TOPRIGHT", self.frame, "BOTTOMRIGHT", width < 160 and (160 - width) or 0, 0)
+ for k, v in pairs(self.list) do
+ sortedlist[#sortedlist+1] = k
+ end
+ table.sort(sortedlist, textSort)
+ for i, k in ipairs(sortedlist) do
+ local f = GetContentLine()
+ f.text:SetText(k)
+ --print(k)
+ if k == self.value then
+ f.check:Show()
+ end
+
+ local statusbar = self.list[k] ~= k and self.list[k] or Media:Fetch('statusbar',k)
+ f.bar:SetTexture(statusbar)
+ f.obj = self
+ f.dropdown = self.dropdown
+ self.dropdown:AddFrame(f)
+ end
+ wipe(sortedlist)
+ end
+ end
+
+ local function ClearFocus(self)
+ if self.dropdown then
+ self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
+ end
+ end
+
+ local function OnHide(this)
+ local self = this.obj
+ if self.dropdown then
+ self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
+ end
+ end
+
+ local function Drop_OnEnter(this)
+ this.obj:Fire("OnEnter")
+ end
+
+ local function Drop_OnLeave(this)
+ this.obj:Fire("OnLeave")
+ end
+
+ local function Constructor()
+ local frame = AGSMW:GetBaseFrame()
+ local self = {}
+
+ self.type = widgetType
+ self.frame = frame
+ frame.obj = self
+ frame.dropButton.obj = self
+ frame.dropButton:SetScript("OnEnter", Drop_OnEnter)
+ frame.dropButton:SetScript("OnLeave", Drop_OnLeave)
+ frame.dropButton:SetScript("OnClick",ToggleDrop)
+ frame:SetScript("OnHide", OnHide)
+
+ local bar = frame:CreateTexture(nil, "OVERLAY")
+ bar:SetPoint("TOPLEFT", frame,"TOPLEFT",6,-25)
+ bar:SetPoint("BOTTOMRIGHT", frame,"BOTTOMRIGHT", -21, 5)
+ bar:SetAlpha(0.5)
+ self.bar = bar
+
+ self.alignoffset = 31
+
+ self.OnRelease = OnRelease
+ self.OnAcquire = OnAcquire
+ self.ClearFocus = ClearFocus
+ self.SetText = SetText
+ self.SetValue = SetValue
+ self.GetValue = GetValue
+ self.SetList = SetList
+ self.SetLabel = SetLabel
+ self.SetDisabled = SetDisabled
+ self.AddItem = AddItem
+ self.SetMultiselect = SetMultiselect
+ self.GetMultiselect = GetMultiselect
+ self.SetItemValue = SetItemValue
+ self.SetItemDisabled = SetItemDisabled
+ self.ToggleDrop = ToggleDrop
+
+ AceGUI:RegisterAsWidget(self)
+ return self
+ end
+
+ AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion)
+
+end
diff --git a/MythicPlusDrop/Libs/AceGUI-3.0-SharedMediaWidgets/prototypes.lua b/MythicPlusDrop/Libs/AceGUI-3.0-SharedMediaWidgets/prototypes.lua
new file mode 100644
index 0000000..95b511d
--- /dev/null
+++ b/MythicPlusDrop/Libs/AceGUI-3.0-SharedMediaWidgets/prototypes.lua
@@ -0,0 +1,266 @@
+-- Widget created by Yssaril
+local DataVersion = 9004
+local AGSMW = LibStub:NewLibrary("AceGUISharedMediaWidgets-1.0", DataVersion)
+
+if not AGSMW then
+ return -- already loaded and no upgrade necessary
+end
+
+local AceGUI = LibStub("AceGUI-3.0")
+local Media = LibStub("LibSharedMedia-3.0")
+
+AGSMW = AGSMW or {}
+
+AceGUIWidgetLSMlists = {
+ ['font'] = Media:HashTable("font"),
+ ['sound'] = Media:HashTable("sound"),
+ ['statusbar'] = Media:HashTable("statusbar"),
+ ['border'] = Media:HashTable("border"),
+ ['background'] = Media:HashTable("background"),
+}
+
+do
+ local function disable(frame)
+ frame.label:SetTextColor(.5,.5,.5)
+ frame.text:SetTextColor(.5,.5,.5)
+ frame.dropButton:Disable()
+ if frame.displayButtonFont then
+ frame.displayButtonFont:SetTextColor(.5,.5,.5)
+ frame.displayButton:Disable()
+ end
+ end
+
+ local function enable(frame)
+ frame.label:SetTextColor(1,.82,0)
+ frame.text:SetTextColor(1,1,1)
+ frame.dropButton:Enable()
+ if frame.displayButtonFont then
+ frame.displayButtonFont:SetTextColor(1,1,1)
+ frame.displayButton:Enable()
+ end
+ end
+
+ local displayButtonBackdrop = {
+ edgeFile = "Interface/Tooltips/UI-Tooltip-Border",
+ tile = true, tileSize = 16, edgeSize = 16,
+ insets = { left = 4, right = 4, top = 4, bottom = 4 },
+ }
+
+ -- create or retrieve BaseFrame
+ function AGSMW:GetBaseFrame()
+ local frame = CreateFrame("Frame", nil, UIParent)
+ frame:SetHeight(44)
+ frame:SetWidth(200)
+
+ local label = frame:CreateFontString(nil,"OVERLAY","GameFontNormalSmall")
+ label:SetPoint("TOPLEFT",frame,"TOPLEFT",0,0)
+ label:SetPoint("TOPRIGHT",frame,"TOPRIGHT",0,0)
+ label:SetJustifyH("LEFT")
+ label:SetHeight(18)
+ label:SetText("")
+ frame.label = label
+
+ local DLeft = frame:CreateTexture(nil, "ARTWORK")
+ DLeft:SetWidth(25)
+ DLeft:SetHeight(64)
+ DLeft:SetPoint("BOTTOMLEFT", frame, "BOTTOMLEFT", -17, -21)
+ DLeft:SetTexture([[Interface\Glues\CharacterCreate\CharacterCreate-LabelFrame]])
+ DLeft:SetTexCoord(0, 0.1953125, 0, 1)
+ frame.DLeft = DLeft
+
+ local DRight = frame:CreateTexture(nil, "ARTWORK")
+ DRight:SetWidth(25)
+ DRight:SetHeight(64)
+ DRight:SetPoint("TOP", DLeft, "TOP")
+ DRight:SetPoint("RIGHT", frame, "RIGHT", 17, 0)
+ DRight:SetTexture([[Interface\Glues\CharacterCreate\CharacterCreate-LabelFrame]])
+ DRight:SetTexCoord(0.8046875, 1, 0, 1)
+ frame.DRight = DRight
+
+ local DMiddle = frame:CreateTexture(nil, "ARTWORK")
+ DMiddle:SetHeight(64)
+ DMiddle:SetPoint("TOP", DLeft, "TOP")
+ DMiddle:SetPoint("LEFT", DLeft, "RIGHT")
+ DMiddle:SetPoint("RIGHT", DRight, "LEFT")
+ DMiddle:SetTexture([[Interface\Glues\CharacterCreate\CharacterCreate-LabelFrame]])
+ DMiddle:SetTexCoord(0.1953125, 0.8046875, 0, 1)
+ frame.DMiddle = DMiddle
+
+ local text = frame:CreateFontString(nil,"OVERLAY","GameFontHighlightSmall")
+ text:SetPoint("RIGHT",DRight,"RIGHT",-43,1)
+ text:SetPoint("LEFT",DLeft,"LEFT",26,1)
+ text:SetJustifyH("RIGHT")
+ text:SetHeight(18)
+ text:SetText("")
+ frame.text = text
+
+ local dropButton = CreateFrame("Button", nil, frame)
+ dropButton:SetWidth(24)
+ dropButton:SetHeight(24)
+ dropButton:SetPoint("TOPRIGHT", DRight, "TOPRIGHT", -16, -18)
+ dropButton:SetNormalTexture([[Interface\ChatFrame\UI-ChatIcon-ScrollDown-Up]])
+ dropButton:SetPushedTexture([[Interface\ChatFrame\UI-ChatIcon-ScrollDown-Down]])
+ dropButton:SetDisabledTexture([[Interface\ChatFrame\UI-ChatIcon-ScrollDown-Disabled]])
+ dropButton:SetHighlightTexture([[Interface\Buttons\UI-Common-MouseHilight]], "ADD")
+ frame.dropButton = dropButton
+
+ frame.Disable = disable
+ frame.Enable = enable
+ return frame
+ end
+
+ function AGSMW:GetBaseFrameWithWindow()
+ local frame = self:GetBaseFrame()
+
+ local displayButton = CreateFrame("Button", nil, frame, BackdropTemplateMixin and "BackdropTemplate")
+ displayButton:SetHeight(42)
+ displayButton:SetWidth(42)
+ displayButton:SetPoint("TOPLEFT", frame, "TOPLEFT", 1, -2)
+ displayButton:SetBackdrop(displayButtonBackdrop)
+ displayButton:SetBackdropBorderColor(.5, .5, .5)
+ frame.displayButton = displayButton
+
+ frame.label:SetPoint("TOPLEFT",displayButton,"TOPRIGHT",1,2)
+
+ frame.DLeft:SetPoint("BOTTOMLEFT", displayButton, "BOTTOMRIGHT", -17, -20)
+
+ return frame
+ end
+
+end
+
+do
+
+ local sliderBackdrop = {
+ ["bgFile"] = [[Interface\Buttons\UI-SliderBar-Background]],
+ ["edgeFile"] = [[Interface\Buttons\UI-SliderBar-Border]],
+ ["tile"] = true,
+ ["edgeSize"] = 8,
+ ["tileSize"] = 8,
+ ["insets"] = {
+ ["left"] = 3,
+ ["right"] = 3,
+ ["top"] = 3,
+ ["bottom"] = 3,
+ },
+ }
+ local frameBackdrop = {
+ bgFile=[[Interface\DialogFrame\UI-DialogBox-Background-Dark]],
+ edgeFile = [[Interface\DialogFrame\UI-DialogBox-Border]],
+ tile = true, tileSize = 32, edgeSize = 32,
+ insets = { left = 11, right = 12, top = 12, bottom = 9 },
+ }
+
+ local function OnMouseWheel(self, dir)
+ self.slider:SetValue(self.slider:GetValue()+(15*dir*-1))
+ end
+
+ local function AddFrame(self, frame)
+ frame:SetParent(self.contentframe)
+ frame:SetFrameStrata(self:GetFrameStrata())
+ frame:SetFrameLevel(self:GetFrameLevel() + 100)
+
+ if next(self.contentRepo) then
+ frame:SetPoint("TOPLEFT", self.contentRepo[#self.contentRepo], "BOTTOMLEFT", 0, 0)
+ frame:SetPoint("RIGHT", self.contentframe, "RIGHT", 0, 0)
+ self.contentframe:SetHeight(self.contentframe:GetHeight() + frame:GetHeight())
+ self.contentRepo[#self.contentRepo+1] = frame
+ else
+ self.contentframe:SetHeight(frame:GetHeight())
+ frame:SetPoint("TOPLEFT", self.contentframe, "TOPLEFT", 0, 0)
+ frame:SetPoint("RIGHT", self.contentframe, "RIGHT", 0, 0)
+ self.contentRepo[1] = frame
+ end
+
+ if self.contentframe:GetHeight() > UIParent:GetHeight()*2/5 - 20 then
+ self.scrollframe:SetPoint("BOTTOMRIGHT", self, "BOTTOMRIGHT", -28, 12)
+ self:SetHeight(UIParent:GetHeight()*2/5)
+ self.slider:Show()
+ self:SetScript("OnMouseWheel", OnMouseWheel)
+ self.slider:SetMinMaxValues(0, self.contentframe:GetHeight()-self.scrollframe:GetHeight())
+ else
+ self.scrollframe:SetPoint("BOTTOMRIGHT", self, "BOTTOMRIGHT", -14, 12)
+ self:SetHeight(self.contentframe:GetHeight()+25)
+ self.slider:Hide()
+ self:SetScript("OnMouseWheel", nil)
+ self.slider:SetMinMaxValues(0, 0)
+ end
+ self.contentframe:SetWidth(self.scrollframe:GetWidth())
+ end
+
+ local function ClearFrames(self)
+ for i, frame in ipairs(self.contentRepo) do
+ frame:ReturnSelf()
+ self.contentRepo[i] = nil
+ end
+ end
+
+ local function slider_OnValueChanged(self, value)
+ self.frame.scrollframe:SetVerticalScroll(value)
+ end
+
+ local DropDownCache = {}
+ function AGSMW:GetDropDownFrame()
+ local frame
+ if next(DropDownCache) then
+ frame = table.remove(DropDownCache)
+ else
+ frame = CreateFrame("Frame", nil, UIParent, BackdropTemplateMixin and "BackdropTemplate")
+ frame:SetClampedToScreen(true)
+ frame:SetWidth(188)
+ frame:SetBackdrop(frameBackdrop)
+ frame:SetFrameStrata("TOOLTIP")
+ frame:EnableMouseWheel(true)
+
+ local contentframe = CreateFrame("Frame", nil, frame)
+ contentframe:SetWidth(160)
+ contentframe:SetHeight(0)
+ frame.contentframe = contentframe
+
+ local scrollframe = CreateFrame("ScrollFrame", nil, frame)
+ scrollframe:SetWidth(160)
+ scrollframe:SetPoint("TOPLEFT", frame, "TOPLEFT", 14, -13)
+ scrollframe:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -14, 12)
+ scrollframe:SetScrollChild(contentframe)
+ frame.scrollframe = scrollframe
+
+ contentframe:SetPoint("TOPLEFT", scrollframe)
+ contentframe:SetPoint("TOPRIGHT", scrollframe)
+
+ local bgTex = frame:CreateTexture(nil, "ARTWORK")
+ bgTex:SetAllPoints(scrollframe)
+ frame.bgTex = bgTex
+
+ frame.AddFrame = AddFrame
+ frame.ClearFrames = ClearFrames
+ frame.contentRepo = {} -- store all our frames in here so we can get rid of them later
+
+ local slider = CreateFrame("Slider", nil, scrollframe, BackdropTemplateMixin and "BackdropTemplate")
+ slider:SetOrientation("VERTICAL")
+ slider:SetPoint("TOPRIGHT", frame, "TOPRIGHT", -14, -10)
+ slider:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -14, 10)
+ slider:SetBackdrop(sliderBackdrop)
+ slider:SetThumbTexture([[Interface\Buttons\UI-SliderBar-Button-Vertical]])
+ slider:SetMinMaxValues(0, 1)
+ --slider:SetValueStep(1)
+ slider:SetWidth(12)
+ slider.frame = frame
+ slider:SetScript("OnValueChanged", slider_OnValueChanged)
+ frame.slider = slider
+ end
+ frame:SetHeight(UIParent:GetHeight()*2/5)
+ frame.slider:SetValue(0)
+ frame:Show()
+ return frame
+ end
+
+ function AGSMW:ReturnDropDownFrame(frame)
+ ClearFrames(frame)
+ frame:ClearAllPoints()
+ frame:Hide()
+ frame:SetBackdrop(frameBackdrop)
+ frame.bgTex:SetTexture(nil)
+ table.insert(DropDownCache, frame)
+ return nil
+ end
+end
diff --git a/MythicPlusDrop/Libs/AceGUI-3.0-SharedMediaWidgets/widget.xml b/MythicPlusDrop/Libs/AceGUI-3.0-SharedMediaWidgets/widget.xml
new file mode 100644
index 0000000..43c46a1
--- /dev/null
+++ b/MythicPlusDrop/Libs/AceGUI-3.0-SharedMediaWidgets/widget.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
diff --git a/MythicPlusDrop/Libs/AceGUI-3.0/AceGUI-3.0.lua b/MythicPlusDrop/Libs/AceGUI-3.0/AceGUI-3.0.lua
index cde61f6..f05b1ed 100644
--- a/MythicPlusDrop/Libs/AceGUI-3.0/AceGUI-3.0.lua
+++ b/MythicPlusDrop/Libs/AceGUI-3.0/AceGUI-3.0.lua
@@ -24,28 +24,22 @@
-- f:AddChild(btn)
-- @class file
-- @name AceGUI-3.0
--- @release $Id: AceGUI-3.0.lua 1231 2020-04-14 22:20:36Z nevcairiel $
+-- @release $Id: AceGUI-3.0.lua 1288 2022-09-25 14:19:00Z funkehdude $
local ACEGUI_MAJOR, ACEGUI_MINOR = "AceGUI-3.0", 41
local AceGUI, oldminor = LibStub:NewLibrary(ACEGUI_MAJOR, ACEGUI_MINOR)
if not AceGUI then return end -- No upgrade needed
-- Lua APIs
-local tinsert = table.insert
+local tinsert, wipe = table.insert, table.wipe
local select, pairs, next, type = select, pairs, next, type
local error, assert = error, assert
local setmetatable, rawget = setmetatable, rawget
-local math_max = math.max
+local math_max, math_min, math_ceil = math.max, math.min, math.ceil
-- WoW APIs
local UIParent = UIParent
--- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
--- List them here for Mikk's FindGlobals script
--- GLOBALS: geterrorhandler, LibStub
-
---local con = LibStub("AceConsole-3.0",true)
-
AceGUI.WidgetRegistry = AceGUI.WidgetRegistry or {}
AceGUI.LayoutRegistry = AceGUI.LayoutRegistry or {}
AceGUI.WidgetBase = AceGUI.WidgetBase or {}
@@ -94,38 +88,38 @@ do
AceGUI.objPools = AceGUI.objPools or {}
local objPools = AceGUI.objPools
--Returns a new instance, if none are available either returns a new table or calls the given contructor
- function newWidget(type)
- if not WidgetRegistry[type] then
+ function newWidget(widgetType)
+ if not WidgetRegistry[widgetType] then
error("Attempt to instantiate unknown widget type", 2)
end
- if not objPools[type] then
- objPools[type] = {}
+ if not objPools[widgetType] then
+ objPools[widgetType] = {}
end
- local newObj = next(objPools[type])
+ local newObj = next(objPools[widgetType])
if not newObj then
- newObj = WidgetRegistry[type]()
- newObj.AceGUIWidgetVersion = WidgetVersions[type]
+ newObj = WidgetRegistry[widgetType]()
+ newObj.AceGUIWidgetVersion = WidgetVersions[widgetType]
else
- objPools[type][newObj] = nil
+ objPools[widgetType][newObj] = nil
-- if the widget is older then the latest, don't even try to reuse it
-- just forget about it, and grab a new one.
- if not newObj.AceGUIWidgetVersion or newObj.AceGUIWidgetVersion < WidgetVersions[type] then
- return newWidget(type)
+ if not newObj.AceGUIWidgetVersion or newObj.AceGUIWidgetVersion < WidgetVersions[widgetType] then
+ return newWidget(widgetType)
end
end
return newObj
end
-- Releases an instance to the Pool
- function delWidget(obj,type)
- if not objPools[type] then
- objPools[type] = {}
+ function delWidget(obj,widgetType)
+ if not objPools[widgetType] then
+ objPools[widgetType] = {}
end
- if objPools[type][obj] then
+ if objPools[widgetType][obj] then
error("Attempt to Release Widget that is already released", 2)
end
- objPools[type][obj] = true
+ objPools[widgetType][obj] = true
end
end
@@ -141,9 +135,9 @@ end
-- OnAcquire function on it, before returning.
-- @param type The type of the widget.
-- @return The newly created widget.
-function AceGUI:Create(type)
- if WidgetRegistry[type] then
- local widget = newWidget(type)
+function AceGUI:Create(widgetType)
+ if WidgetRegistry[widgetType] then
+ local widget = newWidget(widgetType)
if rawget(widget, "Acquire") then
widget.OnAcquire = widget.Acquire
@@ -161,7 +155,7 @@ function AceGUI:Create(type)
if widget.OnAcquire then
widget:OnAcquire()
else
- error(("Widget type %s doesn't supply an OnAcquire Function"):format(type))
+ error(("Widget type %s doesn't supply an OnAcquire Function"):format(widgetType))
end
-- Set the default Layout ("List")
safecall(widget.SetLayout, widget, "List")
@@ -589,25 +583,25 @@ AceGUI.counts = AceGUI.counts or {}
-- This is used by widgets that require a named frame, e.g. when a Blizzard
-- Template requires it.
-- @param type The widget type
-function AceGUI:GetNextWidgetNum(type)
- if not self.counts[type] then
- self.counts[type] = 0
+function AceGUI:GetNextWidgetNum(widgetType)
+ if not self.counts[widgetType] then
+ self.counts[widgetType] = 0
end
- self.counts[type] = self.counts[type] + 1
- return self.counts[type]
+ self.counts[widgetType] = self.counts[widgetType] + 1
+ return self.counts[widgetType]
end
--- Return the number of created widgets for this type.
-- In contrast to GetNextWidgetNum, the number is not incremented.
--- @param type The widget type
-function AceGUI:GetWidgetCount(type)
- return self.counts[type] or 0
+-- @param widgetType The widget type
+function AceGUI:GetWidgetCount(widgetType)
+ return self.counts[widgetType] or 0
end
--- Return the version of the currently registered widget type.
--- @param type The widget type
-function AceGUI:GetWidgetVersion(type)
- return WidgetVersions[type]
+-- @param widgetType The widget type
+function AceGUI:GetWidgetVersion(widgetType)
+ return WidgetVersions[widgetType]
end
-------------
@@ -770,7 +764,6 @@ AceGUI:RegisterLayout("Flow",
usedwidth = 0
rowstart = frame
- rowstartoffset = frameoffset
if child.DoLayout then
child:DoLayout()
@@ -813,7 +806,8 @@ local GetCellAlign = function (dir, tableObj, colObj, cellObj, cell, child)
or colObj and (colObj["align" .. dir] or colObj.align)
or tableObj["align" .. dir] or tableObj.align
or "CENTERLEFT"
- local child, cell, val = child or 0, cell or 0, nil
+ local val
+ child, cell = child or 0, cell or 0
if type(fn) == "string" then
fn = fn:lower()
@@ -827,7 +821,7 @@ local GetCellAlign = function (dir, tableObj, colObj, cellObj, cell, child)
val = fn
end
- return fn, max(0, min(val, cell))
+ return fn, math_max(0, math_min(val, cell))
end
-- Get width or height for multiple cells combined
@@ -836,7 +830,7 @@ local GetCellDimension = function (dir, laneDim, from, to, space)
for cell=from,to do
dim = dim + (laneDim[cell] or 0)
end
- return dim + max(0, to - from) * (space or 0)
+ return dim + math_max(0, to - from) * (space or 0)
end
--[[ Options
@@ -882,7 +876,7 @@ AceGUI:RegisterLayout("Table",
repeat
n = n + 1
local col = (n - 1) % #cols + 1
- local row = ceil(n / #cols)
+ local row = math_ceil(n / #cols)
local rowspan = rowspans[col]
local cell = rowspan and rowspan.child or child
local cellObj = cell:GetUserData("cell")
@@ -898,7 +892,7 @@ AceGUI:RegisterLayout("Table",
end
-- Colspan
- local colspan = max(0, min((cellObj and cellObj.colspan or 1) - 1, #cols - col))
+ local colspan = math_max(0, math_min((cellObj and cellObj.colspan or 1) - 1, #cols - col))
n = n + colspan
-- Place the cell
@@ -915,7 +909,7 @@ AceGUI:RegisterLayout("Table",
end
end
- local rows = ceil(n / #cols)
+ local rows = math_ceil(n / #cols)
-- Determine fixed size cols and collect weights
local extantH, totalWeight = totalH, 0
@@ -940,16 +934,16 @@ AceGUI:RegisterLayout("Table",
f:ClearAllPoints()
local childH = f:GetWidth() or 0
- laneH[col] = max(laneH[col], childH - GetCellDimension("H", laneH, colStart[child], col - 1, spaceH))
+ laneH[col] = math_max(laneH[col], childH - GetCellDimension("H", laneH, colStart[child], col - 1, spaceH))
end
end
- laneH[col] = max(colObj.min or colObj[1] or 0, min(laneH[col], colObj.max or colObj[2] or laneH[col]))
+ laneH[col] = math_max(colObj.min or colObj[1] or 0, math_min(laneH[col], colObj.max or colObj[2] or laneH[col]))
else
-- Rel./Abs. width
laneH[col] = colObj.width < 1 and colObj.width * totalH or colObj.width
end
- extantH = max(0, extantH - laneH[col])
+ extantH = math_max(0, extantH - laneH[col])
end
end
@@ -988,7 +982,7 @@ AceGUI:RegisterLayout("Table",
child:DoLayout()
end
- rowV = max(rowV, (f:GetHeight() or 0) - GetCellDimension("V", laneV, rowStart[child], row - 1, spaceV))
+ rowV = math_max(rowV, (f:GetHeight() or 0) - GetCellDimension("V", laneV, rowStart[child], row - 1, spaceV))
end
end
diff --git a/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIContainer-BlizOptionsGroup.lua b/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIContainer-BlizOptionsGroup.lua
index 9a48f8b..d95db58 100644
--- a/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIContainer-BlizOptionsGroup.lua
+++ b/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIContainer-BlizOptionsGroup.lua
@@ -2,7 +2,7 @@
BlizOptionsGroup Container
Simple container widget for the integration of AceGUI into the Blizzard Interface Options
-------------------------------------------------------------------------------]]
-local Type, Version = "BlizOptionsGroup", 21
+local Type, Version = "BlizOptionsGroup", 26
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
@@ -99,7 +99,7 @@ local methods = {
Constructor
-------------------------------------------------------------------------------]]
local function Constructor()
- local frame = CreateFrame("Frame")
+ local frame = CreateFrame("Frame", nil, InterfaceOptionsFramePanelContainer)
frame:Hide()
-- support functions for the Blizzard Interface Options
@@ -108,6 +108,11 @@ local function Constructor()
frame.default = default
frame.refresh = refresh
+ -- 10.0 support function aliases (cancel has been removed)
+ frame.OnCommit = okay
+ frame.OnDefault = default
+ frame.OnRefresh = refresh
+
frame:SetScript("OnHide", OnHide)
frame:SetScript("OnShow", OnShow)
diff --git a/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIContainer-DropDownGroup.lua b/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIContainer-DropDownGroup.lua
index 379ea25..cd83755 100644
--- a/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIContainer-DropDownGroup.lua
+++ b/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIContainer-DropDownGroup.lua
@@ -125,7 +125,7 @@ local function Constructor()
dropdown.frame:Show()
dropdown:SetLabel("")
- local border = CreateFrame("Frame", nil, frame, BackdropTemplateMixin and "BackdropTemplate" or nil)
+ local border = CreateFrame("Frame", nil, frame, "BackdropTemplate")
border:SetPoint("TOPLEFT", 0, -26)
border:SetPoint("BOTTOMRIGHT", 0, 3)
border:SetBackdrop(PaneBackdrop)
diff --git a/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIContainer-Frame.lua b/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIContainer-Frame.lua
index fbd6005..39a1004 100644
--- a/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIContainer-Frame.lua
+++ b/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIContainer-Frame.lua
@@ -1,7 +1,7 @@
--[[-----------------------------------------------------------------------------
Frame Container
-------------------------------------------------------------------------------]]
-local Type, Version = "Frame", 27
+local Type, Version = "Frame", 30
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
@@ -13,10 +13,6 @@ local wipe = table.wipe
local PlaySound = PlaySound
local CreateFrame, UIParent = CreateFrame, UIParent
--- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
--- List them here for Mikk's FindGlobals script
--- GLOBALS: CLOSE
-
--[[-----------------------------------------------------------------------------
Scripts
-------------------------------------------------------------------------------]]
@@ -83,6 +79,7 @@ local methods = {
["OnAcquire"] = function(self)
self.frame:SetParent(UIParent)
self.frame:SetFrameStrata("FULLSCREEN_DIALOG")
+ self.frame:SetFrameLevel(100) -- Lots of room to draw under it
self:SetTitle()
self:SetStatusText()
self:ApplyStatus()
@@ -179,16 +176,21 @@ local PaneBackdrop = {
}
local function Constructor()
- local frame = CreateFrame("Frame", nil, UIParent, BackdropTemplateMixin and "BackdropTemplate" or nil)
+ local frame = CreateFrame("Frame", nil, UIParent, "BackdropTemplate")
frame:Hide()
frame:EnableMouse(true)
frame:SetMovable(true)
frame:SetResizable(true)
frame:SetFrameStrata("FULLSCREEN_DIALOG")
+ frame:SetFrameLevel(100) -- Lots of room to draw under it
frame:SetBackdrop(FrameBackdrop)
frame:SetBackdropColor(0, 0, 0, 1)
- frame:SetMinResize(400, 200)
+ if frame.SetResizeBounds then -- WoW 10.0
+ frame:SetResizeBounds(400, 200)
+ else
+ frame:SetMinResize(400, 200)
+ end
frame:SetToplevel(true)
frame:SetScript("OnShow", Frame_OnShow)
frame:SetScript("OnHide", Frame_OnClose)
@@ -201,7 +203,7 @@ local function Constructor()
closebutton:SetWidth(100)
closebutton:SetText(CLOSE)
- local statusbg = CreateFrame("Button", nil, frame, BackdropTemplateMixin and "BackdropTemplate" or nil)
+ local statusbg = CreateFrame("Button", nil, frame, "BackdropTemplate")
statusbg:SetPoint("BOTTOMLEFT", 15, 15)
statusbg:SetPoint("BOTTOMRIGHT", -132, 15)
statusbg:SetHeight(24)
@@ -269,7 +271,7 @@ local function Constructor()
line2:SetHeight(8)
line2:SetPoint("BOTTOMRIGHT", -8, 8)
line2:SetTexture(137057) -- Interface\\Tooltips\\UI-Tooltip-Border
- local x = 0.1 * 8/17
+ x = 0.1 * 8/17
line2:SetTexCoord(0.05 - x, 0.5, 0.05, 0.5 + x, 0.05, 0.5 - x, 0.5 + x, 0.5)
local sizer_s = CreateFrame("Frame", nil, frame)
diff --git a/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIContainer-InlineGroup.lua b/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIContainer-InlineGroup.lua
index 357e843..1676ae4 100644
--- a/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIContainer-InlineGroup.lua
+++ b/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIContainer-InlineGroup.lua
@@ -75,7 +75,7 @@ local function Constructor()
titletext:SetJustifyH("LEFT")
titletext:SetHeight(18)
- local border = CreateFrame("Frame", nil, frame, BackdropTemplateMixin and "BackdropTemplate" or nil)
+ local border = CreateFrame("Frame", nil, frame, "BackdropTemplate")
border:SetPoint("TOPLEFT", 0, -17)
border:SetPoint("BOTTOMRIGHT", -1, 3)
border:SetBackdrop(PaneBackdrop)
diff --git a/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIContainer-TabGroup.lua b/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIContainer-TabGroup.lua
index 195ab0b..8e46876 100644
--- a/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIContainer-TabGroup.lua
+++ b/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIContainer-TabGroup.lua
@@ -2,22 +2,18 @@
TabGroup Container
Container that uses tabs on top to switch between groups.
-------------------------------------------------------------------------------]]
-local Type, Version = "TabGroup", 37
+local Type, Version = "TabGroup", 38
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
-- Lua APIs
-local pairs, ipairs, assert, type, wipe = pairs, ipairs, assert, type, wipe
+local pairs, ipairs, assert, type, wipe = pairs, ipairs, assert, type, table.wipe
-- WoW APIs
local PlaySound = PlaySound
local CreateFrame, UIParent = CreateFrame, UIParent
local _G = _G
--- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
--- List them here for Mikk's FindGlobals script
--- GLOBALS: PanelTemplates_TabResize, PanelTemplates_SetDisabledTabState, PanelTemplates_SelectTab, PanelTemplates_DeselectTab
-
-- local upvalue storage used by BuildTabs
local widths = {}
local rowwidths = {}
@@ -26,6 +22,143 @@ local rowends = {}
--[[-----------------------------------------------------------------------------
Support functions
-------------------------------------------------------------------------------]]
+
+local function PanelTemplates_TabResize(tab, padding, absoluteSize, minWidth, maxWidth, absoluteTextSize)
+ local tabName = tab:GetName();
+
+ local buttonMiddle = tab.Middle or tab.middleTexture or _G[tabName.."Middle"];
+ local buttonMiddleDisabled = tab.MiddleDisabled or (tabName and _G[tabName.."MiddleDisabled"]);
+ local left = tab.Left or tab.leftTexture or _G[tabName.."Left"];
+ local sideWidths = 2 * left:GetWidth();
+ local tabText = tab.Text or _G[tab:GetName().."Text"];
+ local highlightTexture = tab.HighlightTexture or (tabName and _G[tabName.."HighlightTexture"]);
+
+ local width, tabWidth;
+ local textWidth;
+ if ( absoluteTextSize ) then
+ textWidth = absoluteTextSize;
+ else
+ tabText:SetWidth(0);
+ textWidth = tabText:GetWidth();
+ end
+ -- If there's an absolute size specified then use it
+ if ( absoluteSize ) then
+ if ( absoluteSize < sideWidths) then
+ width = 1;
+ tabWidth = sideWidths
+ else
+ width = absoluteSize - sideWidths;
+ tabWidth = absoluteSize
+ end
+ tabText:SetWidth(width);
+ else
+ -- Otherwise try to use padding
+ if ( padding ) then
+ width = textWidth + padding;
+ else
+ width = textWidth + 24;
+ end
+ -- If greater than the maxWidth then cap it
+ if ( maxWidth and width > maxWidth ) then
+ if ( padding ) then
+ width = maxWidth + padding;
+ else
+ width = maxWidth + 24;
+ end
+ tabText:SetWidth(width);
+ else
+ tabText:SetWidth(0);
+ end
+ if (minWidth and width < minWidth) then
+ width = minWidth;
+ end
+ tabWidth = width + sideWidths;
+ end
+
+ if ( buttonMiddle ) then
+ buttonMiddle:SetWidth(width);
+ end
+ if ( buttonMiddleDisabled ) then
+ buttonMiddleDisabled:SetWidth(width);
+ end
+
+ tab:SetWidth(tabWidth);
+
+ if ( highlightTexture ) then
+ highlightTexture:SetWidth(tabWidth);
+ end
+end
+
+local function PanelTemplates_DeselectTab(tab)
+ local name = tab:GetName();
+
+ local left = tab.Left or _G[name.."Left"];
+ local middle = tab.Middle or _G[name.."Middle"];
+ local right = tab.Right or _G[name.."Right"];
+ left:Show();
+ middle:Show();
+ right:Show();
+ --tab:UnlockHighlight();
+ tab:Enable();
+ local text = tab.Text or _G[name.."Text"];
+ text:SetPoint("CENTER", tab, "CENTER", (tab.deselectedTextX or 0), (tab.deselectedTextY or 2));
+
+ local leftDisabled = tab.LeftDisabled or _G[name.."LeftDisabled"];
+ local middleDisabled = tab.MiddleDisabled or _G[name.."MiddleDisabled"];
+ local rightDisabled = tab.RightDisabled or _G[name.."RightDisabled"];
+ leftDisabled:Hide();
+ middleDisabled:Hide();
+ rightDisabled:Hide();
+end
+
+local function PanelTemplates_SelectTab(tab)
+ local name = tab:GetName();
+
+ local left = tab.Left or _G[name.."Left"];
+ local middle = tab.Middle or _G[name.."Middle"];
+ local right = tab.Right or _G[name.."Right"];
+ left:Hide();
+ middle:Hide();
+ right:Hide();
+ --tab:LockHighlight();
+ tab:Disable();
+ tab:SetDisabledFontObject(GameFontHighlightSmall);
+ local text = tab.Text or _G[name.."Text"];
+ text:SetPoint("CENTER", tab, "CENTER", (tab.selectedTextX or 0), (tab.selectedTextY or -3));
+
+ local leftDisabled = tab.LeftDisabled or _G[name.."LeftDisabled"];
+ local middleDisabled = tab.MiddleDisabled or _G[name.."MiddleDisabled"];
+ local rightDisabled = tab.RightDisabled or _G[name.."RightDisabled"];
+ leftDisabled:Show();
+ middleDisabled:Show();
+ rightDisabled:Show();
+
+ if GameTooltip:IsOwned(tab) then
+ GameTooltip:Hide();
+ end
+end
+
+local function PanelTemplates_SetDisabledTabState(tab)
+ local name = tab:GetName();
+ local left = tab.Left or _G[name.."Left"];
+ local middle = tab.Middle or _G[name.."Middle"];
+ local right = tab.Right or _G[name.."Right"];
+ left:Show();
+ middle:Show();
+ right:Show();
+ --tab:UnlockHighlight();
+ tab:Disable();
+ tab.text = tab:GetText();
+ -- Gray out text
+ tab:SetDisabledFontObject(GameFontDisableSmall);
+ local leftDisabled = tab.LeftDisabled or _G[name.."LeftDisabled"];
+ local middleDisabled = tab.MiddleDisabled or _G[name.."MiddleDisabled"];
+ local rightDisabled = tab.RightDisabled or _G[name.."RightDisabled"];
+ leftDisabled:Hide();
+ middleDisabled:Hide();
+ rightDisabled:Hide();
+end
+
local function UpdateTabLook(frame)
if frame.disabled then
PanelTemplates_SetDisabledTabState(frame)
@@ -103,11 +236,64 @@ local methods = {
["CreateTab"] = function(self, id)
local tabname = ("AceGUITabGroup%dTab%d"):format(self.num, id)
- local tab = CreateFrame("Button", tabname, self.border, "OptionsFrameTabButtonTemplate")
+ local tab = CreateFrame("Button", tabname, self.border)
+ tab:SetSize(115, 24)
+ tab.deselectedTextY = -3
+ tab.selectedTextY = -2
+
+ tab.LeftDisabled = tab:CreateTexture(tabname .. "LeftDisabled", "BORDER")
+ tab.LeftDisabled:SetTexture("Interface\\OptionsFrame\\UI-OptionsFrame-ActiveTab")
+ tab.LeftDisabled:SetSize(20, 24)
+ tab.LeftDisabled:SetPoint("BOTTOMLEFT", 0, -3)
+ tab.LeftDisabled:SetTexCoord(0, 0.15625, 0, 1.0)
+
+ tab.MiddleDisabled = tab:CreateTexture(tabname .. "MiddleDisabled", "BORDER")
+ tab.MiddleDisabled:SetTexture("Interface\\OptionsFrame\\UI-OptionsFrame-ActiveTab")
+ tab.MiddleDisabled:SetSize(88, 24)
+ tab.MiddleDisabled:SetPoint("LEFT", tab.LeftDisabled, "RIGHT")
+ tab.MiddleDisabled:SetTexCoord(0.15625, 0.84375, 0, 1.0)
+
+ tab.RightDisabled = tab:CreateTexture(tabname .. "RightDisabled", "BORDER")
+ tab.RightDisabled:SetTexture("Interface\\OptionsFrame\\UI-OptionsFrame-ActiveTab")
+ tab.RightDisabled:SetSize(20, 24)
+ tab.RightDisabled:SetPoint("LEFT", tab.MiddleDisabled, "RIGHT")
+ tab.RightDisabled:SetTexCoord(0.84375, 1.0, 0, 1.0)
+
+ tab.Left = tab:CreateTexture(tabname .. "Left", "BORDER")
+ tab.Left:SetTexture("Interface\\OptionsFrame\\UI-OptionsFrame-InActiveTab")
+ tab.Left:SetSize(20, 24)
+ tab.Left:SetPoint("TOPLEFT")
+ tab.Left:SetTexCoord(0, 0.15625, 0, 1.0)
+
+ tab.Middle = tab:CreateTexture(tabname .. "Middle", "BORDER")
+ tab.Middle:SetTexture("Interface\\OptionsFrame\\UI-OptionsFrame-InActiveTab")
+ tab.Middle:SetSize(88, 24)
+ tab.Middle:SetPoint("LEFT", tab.Left, "RIGHT")
+ tab.Middle:SetTexCoord(0.15625, 0.84375, 0, 1.0)
+
+ tab.Right = tab:CreateTexture(tabname .. "Right", "BORDER")
+ tab.Right:SetTexture("Interface\\OptionsFrame\\UI-OptionsFrame-InActiveTab")
+ tab.Right:SetSize(20, 24)
+ tab.Right:SetPoint("LEFT", tab.Middle, "RIGHT")
+ tab.Right:SetTexCoord(0.84375, 1.0, 0, 1.0)
+
+ tab.Text = tab:CreateFontString(tabname .. "Text")
+ tab:SetFontString(tab.Text)
+
+ tab:SetNormalFontObject(GameFontNormalSmall)
+ tab:SetHighlightFontObject(GameFontHighlightSmall)
+ tab:SetDisabledFontObject(GameFontHighlightSmall)
+ tab:SetHighlightTexture("Interface\\PaperDollInfoFrame\\UI-Character-Tab-Highlight", "ADD")
+ tab.HighlightTexture = tab:GetHighlightTexture()
+ tab.HighlightTexture:ClearAllPoints()
+ tab.HighlightTexture:SetPoint("LEFT", tab, "LEFT", 10, -4)
+ tab.HighlightTexture:SetPoint("RIGHT", tab, "RIGHT", -10, -4)
+ _G[tabname .. "HighlightTexture"] = tab.HighlightTexture
+
tab.obj = self
tab.id = id
- tab.text = _G[tabname .. "Text"]
+ tab.text = tab.Text -- compat
tab.text:ClearAllPoints()
tab.text:SetPoint("LEFT", 14, -3)
tab.text:SetPoint("RIGHT", -12, -3)
@@ -316,7 +502,7 @@ local function Constructor()
titletext:SetHeight(18)
titletext:SetText("")
- local border = CreateFrame("Frame", nil, frame, BackdropTemplateMixin and "BackdropTemplate" or nil)
+ local border = CreateFrame("Frame", nil, frame, "BackdropTemplate")
border:SetPoint("TOPLEFT", 1, -27)
border:SetPoint("BOTTOMRIGHT", -1, 3)
border:SetBackdrop(PaneBackdrop)
diff --git a/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua b/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua
index cdc8051..89f387a 100644
--- a/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua
+++ b/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua
@@ -2,22 +2,18 @@
TreeGroup Container
Container that uses a tree control to switch between groups.
-------------------------------------------------------------------------------]]
-local Type, Version = "TreeGroup", 45
+local Type, Version = "TreeGroup", 47
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
-- Lua APIs
local next, pairs, ipairs, assert, type = next, pairs, ipairs, assert, type
-local math_min, math_max, floor = math.min, math.max, floor
+local math_min, math_max, floor = math.min, math.max, math.floor
local select, tremove, unpack, tconcat = select, table.remove, unpack, table.concat
-- WoW APIs
local CreateFrame, UIParent = CreateFrame, UIParent
--- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
--- List them here for Mikk's FindGlobals script
--- GLOBALS: FONT_COLOR_CODE_CLOSE
-
-- Recycling functions
local new, del
do
@@ -567,7 +563,11 @@ local methods = {
if maxtreewidth > 100 and status.treewidth > maxtreewidth then
self:SetTreeWidth(maxtreewidth, status.treesizable)
end
- treeframe:SetMaxResize(maxtreewidth, 1600)
+ if treeframe.SetResizeBounds then
+ treeframe:SetResizeBounds(100, 1, maxtreewidth, 1600)
+ else
+ treeframe:SetMaxResize(maxtreewidth, 1600)
+ end
end,
["OnHeightSet"] = function(self, height)
@@ -637,7 +637,7 @@ local function Constructor()
local num = AceGUI:GetNextWidgetNum(Type)
local frame = CreateFrame("Frame", nil, UIParent)
- local treeframe = CreateFrame("Frame", nil, frame, BackdropTemplateMixin and "BackdropTemplate" or nil)
+ local treeframe = CreateFrame("Frame", nil, frame, "BackdropTemplate")
treeframe:SetPoint("TOPLEFT")
treeframe:SetPoint("BOTTOMLEFT")
treeframe:SetWidth(DEFAULT_TREE_WIDTH)
@@ -646,13 +646,17 @@ local function Constructor()
treeframe:SetBackdropColor(0.1, 0.1, 0.1, 0.5)
treeframe:SetBackdropBorderColor(0.4, 0.4, 0.4)
treeframe:SetResizable(true)
- treeframe:SetMinResize(100, 1)
- treeframe:SetMaxResize(400, 1600)
+ if treeframe.SetResizeBounds then -- WoW 10.0
+ treeframe:SetResizeBounds(100, 1, 400, 1600)
+ else
+ treeframe:SetMinResize(100, 1)
+ treeframe:SetMaxResize(400, 1600)
+ end
treeframe:SetScript("OnUpdate", FirstFrameUpdate)
treeframe:SetScript("OnSizeChanged", Tree_OnSizeChanged)
treeframe:SetScript("OnMouseWheel", Tree_OnMouseWheel)
- local dragger = CreateFrame("Frame", nil, treeframe, BackdropTemplateMixin and "BackdropTemplate" or nil)
+ local dragger = CreateFrame("Frame", nil, treeframe, "BackdropTemplate")
dragger:SetWidth(8)
dragger:SetPoint("TOP", treeframe, "TOPRIGHT")
dragger:SetPoint("BOTTOM", treeframe, "BOTTOMRIGHT")
@@ -677,7 +681,7 @@ local function Constructor()
scrollbg:SetAllPoints(scrollbar)
scrollbg:SetColorTexture(0,0,0,0.4)
- local border = CreateFrame("Frame", nil, frame, BackdropTemplateMixin and "BackdropTemplate" or nil)
+ local border = CreateFrame("Frame", nil, frame, "BackdropTemplate")
border:SetPoint("TOPLEFT", treeframe, "TOPRIGHT")
border:SetPoint("BOTTOMRIGHT")
border:SetBackdrop(PaneBackdrop)
diff --git a/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIContainer-Window.lua b/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIContainer-Window.lua
index 2e28a3d..f378d93 100644
--- a/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIContainer-Window.lua
+++ b/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIContainer-Window.lua
@@ -7,10 +7,6 @@ local pairs, assert, type = pairs, assert, type
local PlaySound = PlaySound
local CreateFrame, UIParent = CreateFrame, UIParent
--- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
--- List them here for Mikk's FindGlobals script
--- GLOBALS: GameFontNormal
-
----------------
-- Main Frame --
----------------
@@ -21,7 +17,7 @@ local CreateFrame, UIParent = CreateFrame, UIParent
]]
do
local Type = "Window"
- local Version = 6
+ local Version = 8
local function frameOnShow(this)
this.obj:Fire("OnShow")
@@ -186,7 +182,11 @@ do
frame:SetScript("OnShow",frameOnShow)
frame:SetScript("OnHide",frameOnClose)
- frame:SetMinResize(240,240)
+ if frame.SetResizeBounds then -- WoW 10.0
+ frame:SetResizeBounds(240,240)
+ else
+ frame:SetMinResize(240,240)
+ end
frame:SetToplevel(true)
local titlebg = frame:CreateTexture(nil, "BACKGROUND")
@@ -300,7 +300,7 @@ do
line2:SetHeight(8)
line2:SetPoint("BOTTOMRIGHT", -8, 8)
line2:SetTexture(137057) -- Interface\\Tooltips\\UI-Tooltip-Border
- local x = 0.1 * 8/17
+ x = 0.1 * 8/17
line2:SetTexCoord(0.05 - x, 0.5, 0.05, 0.5 + x, 0.05, 0.5 - x, 0.5 + x, 0.5)
local sizer_s = CreateFrame("Frame",nil,frame)
diff --git a/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIWidget-CheckBox.lua b/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIWidget-CheckBox.lua
index 53ef618..fe17e03 100644
--- a/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIWidget-CheckBox.lua
+++ b/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIWidget-CheckBox.lua
@@ -12,10 +12,6 @@ local select, pairs = select, pairs
local PlaySound = PlaySound
local CreateFrame, UIParent = CreateFrame, UIParent
--- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
--- List them here for Mikk's FindGlobals script
--- GLOBALS: SetDesaturation, GameFontHighlight
-
--[[-----------------------------------------------------------------------------
Support functions
-------------------------------------------------------------------------------]]
@@ -199,14 +195,14 @@ local methods = {
["SetDescription"] = function(self, desc)
if desc then
if not self.desc then
- local desc = self.frame:CreateFontString(nil, "OVERLAY", "GameFontHighlightSmall")
- desc:ClearAllPoints()
- desc:SetPoint("TOPLEFT", self.checkbg, "TOPRIGHT", 5, -21)
- desc:SetWidth(self.frame.width - 30)
- desc:SetPoint("RIGHT", self.frame, "RIGHT", -30, 0)
- desc:SetJustifyH("LEFT")
- desc:SetJustifyV("TOP")
- self.desc = desc
+ local f = self.frame:CreateFontString(nil, "OVERLAY", "GameFontHighlightSmall")
+ f:ClearAllPoints()
+ f:SetPoint("TOPLEFT", self.checkbg, "TOPRIGHT", 5, -21)
+ f:SetWidth(self.frame.width - 30)
+ f:SetPoint("RIGHT", self.frame, "RIGHT", -30, 0)
+ f:SetJustifyH("LEFT")
+ f:SetJustifyV("TOP")
+ self.desc = f
end
self.desc:Show()
--self.text:SetFontObject(GameFontNormal)
diff --git a/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIWidget-ColorPicker.lua b/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIWidget-ColorPicker.lua
index 1101162..d57b008 100644
--- a/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIWidget-ColorPicker.lua
+++ b/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIWidget-ColorPicker.lua
@@ -11,10 +11,6 @@ local pairs = pairs
-- WoW APIs
local CreateFrame, UIParent = CreateFrame, UIParent
--- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
--- List them here for Mikk's FindGlobals script
--- GLOBALS: ColorPickerFrame, OpacitySliderFrame
-
--[[-----------------------------------------------------------------------------
Support functions
-------------------------------------------------------------------------------]]
diff --git a/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown-Items.lua b/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown-Items.lua
index 7ae1401..947184c 100644
--- a/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown-Items.lua
+++ b/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown-Items.lua
@@ -1,4 +1,4 @@
---[[ $Id: AceGUIWidget-DropDown-Items.lua 1202 2019-05-15 23:11:22Z nevcairiel $ ]]--
+--[[ $Id: AceGUIWidget-DropDown-Items.lua 1272 2022-08-29 15:56:35Z nevcairiel $ ]]--
local AceGUI = LibStub("AceGUI-3.0")
@@ -41,7 +41,7 @@ local ItemBase = {
-- NOTE: The ItemBase version is added to each item's version number
-- to ensure proper updates on ItemBase changes.
-- Use at least 1000er steps.
- version = 1000,
+ version = 2000,
counter = 0,
}
@@ -178,7 +178,7 @@ function ItemBase.Create(type)
highlight:Hide()
self.highlight = highlight
- local check = frame:CreateTexture("OVERLAY")
+ local check = frame:CreateTexture(nil, "OVERLAY")
check:SetWidth(16)
check:SetHeight(16)
check:SetPoint("LEFT",frame,"LEFT",3,-1)
@@ -186,7 +186,7 @@ function ItemBase.Create(type)
check:Hide()
self.check = check
- local sub = frame:CreateTexture("OVERLAY")
+ local sub = frame:CreateTexture(nil, "OVERLAY")
sub:SetWidth(16)
sub:SetHeight(16)
sub:SetPoint("RIGHT",frame,"RIGHT",-3,-1)
diff --git a/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown.lua b/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown.lua
index 10233b7..59c7f53 100644
--- a/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown.lua
+++ b/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown.lua
@@ -1,4 +1,4 @@
---[[ $Id: AceGUIWidget-DropDown.lua 1237 2020-07-17 22:50:38Z nevcairiel $ ]]--
+--[[ $Id: AceGUIWidget-DropDown.lua 1284 2022-09-25 09:15:30Z nevcairiel $ ]]--
local AceGUI = LibStub("AceGUI-3.0")
-- Lua APIs
@@ -11,10 +11,6 @@ local PlaySound = PlaySound
local UIParent, CreateFrame = UIParent, CreateFrame
local _G = _G
--- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
--- List them here for Mikk's FindGlobals script
--- GLOBALS: CLOSE
-
local function fixlevels(parent,...)
local i = 1
local child = select(i, ...)
@@ -39,7 +35,7 @@ end
do
local widgetType = "Dropdown-Pullout"
- local widgetVersion = 4
+ local widgetVersion = 5
--[[ Static data ]]--
@@ -193,12 +189,7 @@ do
local height = 8
for i, item in pairs(items) do
- if i == 1 then
- item:SetPoint("TOP", itemFrame, "TOP", 0, -2)
- else
- item:SetPoint("TOP", items[i-1].frame, "BOTTOM", 0, 1)
- end
-
+ item:SetPoint("TOP", itemFrame, "TOP", 0, -2 + (i - 1) * -16)
item:Show()
height = height + 16
@@ -258,7 +249,7 @@ do
local function Constructor()
local count = AceGUI:GetNextWidgetNum(widgetType)
- local frame = CreateFrame("Frame", "AceGUI30Pullout"..count, UIParent, BackdropTemplateMixin and "BackdropTemplate" or nil)
+ local frame = CreateFrame("Frame", "AceGUI30Pullout"..count, UIParent, "BackdropTemplate")
local self = {}
self.count = count
self.type = widgetType
@@ -309,7 +300,7 @@ do
scrollFrame.obj = self
itemFrame.obj = self
- local slider = CreateFrame("Slider", "AceGUI30PulloutScrollbar"..count, scrollFrame, BackdropTemplateMixin and "BackdropTemplate" or nil)
+ local slider = CreateFrame("Slider", "AceGUI30PulloutScrollbar"..count, scrollFrame, "BackdropTemplate")
slider:SetOrientation("VERTICAL")
slider:SetHitRectInsets(0, 0, -10, 0)
slider:SetBackdrop(sliderBackdrop)
@@ -356,7 +347,7 @@ end
do
local widgetType = "Dropdown"
- local widgetVersion = 35
+ local widgetVersion = 36
--[[ Static data ]]--
@@ -381,7 +372,6 @@ do
local function Dropdown_TogglePullout(this)
local self = this.obj
- PlaySound(856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON
if self.open then
self.open = nil
self.pullout:Close()
diff --git a/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIWidget-EditBox.lua b/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIWidget-EditBox.lua
index 29f7e00..bb1e4fd 100644
--- a/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIWidget-EditBox.lua
+++ b/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIWidget-EditBox.lua
@@ -14,10 +14,6 @@ local GetCursorInfo, ClearCursor, GetSpellInfo = GetCursorInfo, ClearCursor, Get
local CreateFrame, UIParent = CreateFrame, UIParent
local _G = _G
--- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
--- List them here for Mikk's FindGlobals script
--- GLOBALS: AceGUIEditBoxInsertLink, ChatFontNormal, OKAY
-
--[[-----------------------------------------------------------------------------
Support functions
-------------------------------------------------------------------------------]]
diff --git a/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIWidget-Keybinding.lua b/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIWidget-Keybinding.lua
index 17a3c0b..0c779dc 100644
--- a/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIWidget-Keybinding.lua
+++ b/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIWidget-Keybinding.lua
@@ -13,10 +13,6 @@ local pairs = pairs
local IsShiftKeyDown, IsControlKeyDown, IsAltKeyDown = IsShiftKeyDown, IsControlKeyDown, IsAltKeyDown
local CreateFrame, UIParent = CreateFrame, UIParent
--- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
--- List them here for Mikk's FindGlobals script
--- GLOBALS: NOT_BOUND
-
--[[-----------------------------------------------------------------------------
Scripts
-------------------------------------------------------------------------------]]
@@ -214,7 +210,7 @@ local function Constructor()
label:SetJustifyH("CENTER")
label:SetHeight(18)
- local msgframe = CreateFrame("Frame", nil, UIParent, BackdropTemplateMixin and "BackdropTemplate" or nil)
+ local msgframe = CreateFrame("Frame", nil, UIParent, "BackdropTemplate")
msgframe:SetHeight(30)
msgframe:SetBackdrop(ControlBackdrop)
msgframe:SetBackdropColor(0,0,0)
diff --git a/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIWidget-Label.lua b/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIWidget-Label.lua
index 5c75f3b..d0841ef 100644
--- a/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIWidget-Label.lua
+++ b/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIWidget-Label.lua
@@ -2,7 +2,7 @@
Label Widget
Displays text and optionally an icon.
-------------------------------------------------------------------------------]]
-local Type, Version = "Label", 27
+local Type, Version = "Label", 28
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
@@ -12,10 +12,6 @@ local max, select, pairs = math.max, select, pairs
-- WoW APIs
local CreateFrame, UIParent = CreateFrame, UIParent
--- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
--- List them here for Mikk's FindGlobals script
--- GLOBALS: GameFontHighlightSmall
-
--[[-----------------------------------------------------------------------------
Support functions
-------------------------------------------------------------------------------]]
@@ -129,12 +125,16 @@ local methods = {
end,
["SetFont"] = function(self, font, height, flags)
- self.label:SetFont(font, height, flags)
- UpdateImageAnchor(self)
+ if not self.fontObject then
+ self.fontObject = CreateFont("AceGUI30LabelFont" .. AceGUI:GetNextWidgetNum(Type))
+ end
+ self.fontObject:SetFont(font, height, flags)
+ self:SetFontObject(self.fontObject)
end,
["SetFontObject"] = function(self, font)
- self:SetFont((font or GameFontHighlightSmall):GetFont())
+ self.label:SetFontObject(font or GameFontHighlightSmall)
+ UpdateImageAnchor(self)
end,
["SetImageSize"] = function(self, width, height)
diff --git a/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIWidget-MultiLineEditBox.lua b/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIWidget-MultiLineEditBox.lua
index 0e953ab..bacb2be 100644
--- a/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIWidget-MultiLineEditBox.lua
+++ b/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIWidget-MultiLineEditBox.lua
@@ -1,4 +1,4 @@
-local Type, Version = "MultiLineEditBox", 29
+local Type, Version = "MultiLineEditBox", 32
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
@@ -10,10 +10,6 @@ local GetCursorInfo, GetSpellInfo, ClearCursor = GetCursorInfo, GetSpellInfo, Cl
local CreateFrame, UIParent = CreateFrame, UIParent
local _G = _G
--- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
--- List them here for Mikk's FindGlobals script
--- GLOBALS: ACCEPT, ChatFontNormal
-
--[[-----------------------------------------------------------------------------
Support functions
-------------------------------------------------------------------------------]]
@@ -145,6 +141,14 @@ local function OnVerticalScroll(self, offset)
editBox:SetHitRectInsets(0, 0, offset, editBox:GetHeight() - offset - self:GetHeight())
end
+local function OnScrollRangeChanged(self, xrange, yrange)
+ if yrange == 0 then
+ self.obj.editBox:SetHitRectInsets(0, 0, 0, 0)
+ else
+ OnVerticalScroll(self, self:GetVerticalScroll())
+ end
+end
+
local function OnShowFocus(frame)
frame.obj.editBox:SetFocus()
frame:SetScript("OnShow", nil)
@@ -257,8 +261,6 @@ local methods = {
["SetCursorPosition"] = function(self, ...)
return self.editBox:SetCursorPosition(...)
end,
-
-
}
--[[-----------------------------------------------------------------------------
@@ -297,7 +299,7 @@ local function Constructor()
text:SetPoint("BOTTOMRIGHT", button, "BOTTOMRIGHT", -5, 1)
text:SetJustifyV("MIDDLE")
- local scrollBG = CreateFrame("Frame", nil, frame, BackdropTemplateMixin and "BackdropTemplate" or nil)
+ local scrollBG = CreateFrame("Frame", nil, frame, "BackdropTemplate")
scrollBG:SetBackdrop(backdrop)
scrollBG:SetBackdropColor(0, 0, 0)
scrollBG:SetBackdropBorderColor(0.4, 0.4, 0.4)
@@ -321,6 +323,7 @@ local function Constructor()
scrollFrame:SetScript("OnReceiveDrag", OnReceiveDrag)
scrollFrame:SetScript("OnSizeChanged", OnSizeChanged)
scrollFrame:HookScript("OnVerticalScroll", OnVerticalScroll)
+ scrollFrame:HookScript("OnScrollRangeChanged", OnScrollRangeChanged)
local editBox = CreateFrame("EditBox", ("%s%dEdit"):format(Type, widgetNum), scrollFrame)
editBox:SetAllPoints()
diff --git a/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIWidget-Slider.lua b/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIWidget-Slider.lua
index 9f26d2d..483d400 100644
--- a/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIWidget-Slider.lua
+++ b/MythicPlusDrop/Libs/AceGUI-3.0/widgets/AceGUIWidget-Slider.lua
@@ -14,10 +14,6 @@ local tonumber, pairs = tonumber, pairs
local PlaySound = PlaySound
local CreateFrame, UIParent = CreateFrame, UIParent
--- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
--- List them here for Mikk's FindGlobals script
--- GLOBALS: GameFontHighlightSmall
-
--[[-----------------------------------------------------------------------------
Support functions
-------------------------------------------------------------------------------]]
@@ -31,13 +27,13 @@ local function UpdateText(self)
end
local function UpdateLabels(self)
- local min, max = (self.min or 0), (self.max or 100)
+ local min_value, max_value = (self.min or 0), (self.max or 100)
if self.ispercent then
- self.lowtext:SetFormattedText("%s%%", (min * 100))
- self.hightext:SetFormattedText("%s%%", (max * 100))
+ self.lowtext:SetFormattedText("%s%%", (min_value * 100))
+ self.hightext:SetFormattedText("%s%%", (max_value * 100))
else
- self.lowtext:SetText(min)
- self.hightext:SetText(max)
+ self.lowtext:SetText(min_value)
+ self.hightext:SetText(max_value)
end
end
@@ -175,13 +171,13 @@ local methods = {
self.label:SetText(text)
end,
- ["SetSliderValues"] = function(self, min, max, step)
+ ["SetSliderValues"] = function(self, min_value, max_value, step)
local frame = self.slider
frame.setup = true
- self.min = min
- self.max = max
+ self.min = min_value
+ self.max = max_value
self.step = step
- frame:SetMinMaxValues(min or 0,max or 100)
+ frame:SetMinMaxValues(min_value or 0,max_value or 100)
UpdateLabels(self)
frame:SetValueStep(step or 1)
if self.value then
@@ -225,7 +221,7 @@ local function Constructor()
label:SetJustifyH("CENTER")
label:SetHeight(15)
- local slider = CreateFrame("Slider", nil, frame, BackdropTemplateMixin and "BackdropTemplate" or nil)
+ local slider = CreateFrame("Slider", nil, frame, "BackdropTemplate")
slider:SetOrientation("HORIZONTAL")
slider:SetHeight(15)
slider:SetHitRectInsets(0, 0, -10, 0)
@@ -247,7 +243,7 @@ local function Constructor()
local hightext = slider:CreateFontString(nil, "ARTWORK", "GameFontHighlightSmall")
hightext:SetPoint("TOPRIGHT", slider, "BOTTOMRIGHT", -2, 3)
- local editbox = CreateFrame("EditBox", nil, frame, BackdropTemplateMixin and "BackdropTemplate" or nil)
+ local editbox = CreateFrame("EditBox", nil, frame, "BackdropTemplate")
editbox:SetAutoFocus(false)
editbox:SetFontObject(GameFontHighlightSmall)
editbox:SetPoint("TOP", slider, "BOTTOM")
diff --git a/MythicPlusDrop/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua b/MythicPlusDrop/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua
index 675d7b0..a791159 100644
--- a/MythicPlusDrop/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua
+++ b/MythicPlusDrop/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua
@@ -1,5 +1,5 @@
---[[ $Id: CallbackHandler-1.0.lua 1131 2015-06-04 07:29:24Z nevcairiel $ ]]
-local MAJOR, MINOR = "CallbackHandler-1.0", 6
+--[[ $Id: CallbackHandler-1.0.lua 1284 2022-09-25 09:15:30Z nevcairiel $ ]]
+local MAJOR, MINOR = "CallbackHandler-1.0", 7
local CallbackHandler = LibStub:NewLibrary(MAJOR, MINOR)
if not CallbackHandler then return end -- No upgrade needed
@@ -7,56 +7,25 @@ if not CallbackHandler then return end -- No upgrade needed
local meta = {__index = function(tbl, key) tbl[key] = {} return tbl[key] end}
-- Lua APIs
-local tconcat = table.concat
-local assert, error, loadstring = assert, error, loadstring
-local setmetatable, rawset, rawget = setmetatable, rawset, rawget
+local error = error
+local setmetatable, rawget = setmetatable, rawget
local next, select, pairs, type, tostring = next, select, pairs, type, tostring
--- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
--- List them here for Mikk's FindGlobals script
--- GLOBALS: geterrorhandler
-
local xpcall = xpcall
local function errorhandler(err)
return geterrorhandler()(err)
end
-local function CreateDispatcher(argCount)
- local code = [[
- local next, xpcall, eh = ...
-
- local method, ARGS
- local function call() method(ARGS) end
-
- local function dispatch(handlers, ...)
- local index
- index, method = next(handlers)
- if not method then return end
- local OLD_ARGS = ARGS
- ARGS = ...
- repeat
- xpcall(call, eh)
- index, method = next(handlers, index)
- until not method
- ARGS = OLD_ARGS
- end
-
- return dispatch
- ]]
-
- local ARGS, OLD_ARGS = {}, {}
- for i = 1, argCount do ARGS[i], OLD_ARGS[i] = "arg"..i, "old_arg"..i end
- code = code:gsub("OLD_ARGS", tconcat(OLD_ARGS, ", ")):gsub("ARGS", tconcat(ARGS, ", "))
- return assert(loadstring(code, "safecall Dispatcher["..argCount.."]"))(next, xpcall, errorhandler)
+local function Dispatch(handlers, ...)
+ local index, method = next(handlers)
+ if not method then return end
+ repeat
+ xpcall(method, errorhandler, ...)
+ index, method = next(handlers, index)
+ until not method
end
-local Dispatchers = setmetatable({}, {__index=function(self, argCount)
- local dispatcher = CreateDispatcher(argCount)
- rawset(self, argCount, dispatcher)
- return dispatcher
-end})
-
--------------------------------------------------------------------------
-- CallbackHandler:New
--
@@ -65,7 +34,7 @@ end})
-- UnregisterName - name of the callback unregistration API, default "UnregisterCallback"
-- UnregisterAllName - name of the API to unregister all callbacks, default "UnregisterAllCallbacks". false == don't publish this API.
-function CallbackHandler:New(target, RegisterName, UnregisterName, UnregisterAllName)
+function CallbackHandler.New(_self, target, RegisterName, UnregisterName, UnregisterAllName)
RegisterName = RegisterName or "RegisterCallback"
UnregisterName = UnregisterName or "UnregisterCallback"
@@ -87,19 +56,19 @@ function CallbackHandler:New(target, RegisterName, UnregisterName, UnregisterAll
local oldrecurse = registry.recurse
registry.recurse = oldrecurse + 1
- Dispatchers[select('#', ...) + 1](events[eventname], eventname, ...)
+ Dispatch(events[eventname], eventname, ...)
registry.recurse = oldrecurse
if registry.insertQueue and oldrecurse==0 then
-- Something in one of our callbacks wanted to register more callbacks; they got queued
- for eventname,callbacks in pairs(registry.insertQueue) do
- local first = not rawget(events, eventname) or not next(events[eventname]) -- test for empty before. not test for one member after. that one member may have been overwritten.
- for self,func in pairs(callbacks) do
- events[eventname][self] = func
+ for event,callbacks in pairs(registry.insertQueue) do
+ local first = not rawget(events, event) or not next(events[event]) -- test for empty before. not test for one member after. that one member may have been overwritten.
+ for object,func in pairs(callbacks) do
+ events[event][object] = func
-- fire OnUsed callback?
if first and registry.OnUsed then
- registry.OnUsed(registry, target, eventname)
+ registry.OnUsed(registry, target, event)
first = nil
end
end
diff --git a/MythicPlusDrop/Libs/CallbackHandler-1.0/CallbackHandler-1.0.xml b/MythicPlusDrop/Libs/CallbackHandler-1.0/CallbackHandler-1.0.xml
index 876df83..c107f88 100644
--- a/MythicPlusDrop/Libs/CallbackHandler-1.0/CallbackHandler-1.0.xml
+++ b/MythicPlusDrop/Libs/CallbackHandler-1.0/CallbackHandler-1.0.xml
@@ -1,4 +1,4 @@
-
\ No newline at end of file
+
diff --git a/MythicPlusDrop/Libs/LibDBIcon-1.0/LibDBIcon-1.0.lua b/MythicPlusDrop/Libs/LibDBIcon-1.0/LibDBIcon-1.0.lua
index e865bdf..fb22384 100644
--- a/MythicPlusDrop/Libs/LibDBIcon-1.0/LibDBIcon-1.0.lua
+++ b/MythicPlusDrop/Libs/LibDBIcon-1.0/LibDBIcon-1.0.lua
@@ -1,4 +1,4 @@
-
+--@curseforge-project-slug: libdbicon-1-0@
-----------------------------------------------------------------------
-- LibDBIcon-1.0
--
@@ -6,7 +6,7 @@
--
local DBICON10 = "LibDBIcon-1.0"
-local DBICON10_MINOR = 43 -- Bump on changes
+local DBICON10_MINOR = 45 -- Bump on changes
if not LibStub then error(DBICON10 .. " requires LibStub.") end
local ldb = LibStub("LibDataBroker-1.1", true)
if not ldb then error(DBICON10 .. " requires LibDataBroker-1.1.") end
@@ -18,8 +18,8 @@ lib.callbackRegistered = lib.callbackRegistered or nil
lib.callbacks = lib.callbacks or LibStub("CallbackHandler-1.0"):New(lib)
lib.notCreated = lib.notCreated or {}
lib.radius = lib.radius or 5
+local next, Minimap, CreateFrame = next, Minimap, CreateFrame
lib.tooltip = lib.tooltip or CreateFrame("GameTooltip", "LibDBIconTooltip", UIParent, "GameTooltipTemplate")
-local next, Minimap = next, Minimap
local isDraggingButton = false
function lib:IconCallback(event, name, key, value)
@@ -218,31 +218,49 @@ local function createButton(name, object, db)
button.dataObject = object
button.db = db
button:SetFrameStrata("MEDIUM")
- button:SetSize(31, 31)
+ button:SetFixedFrameStrata(true)
button:SetFrameLevel(8)
+ button:SetFixedFrameLevel(true)
+ button:SetSize(31, 31)
button:RegisterForClicks("anyUp")
button:RegisterForDrag("LeftButton")
button:SetHighlightTexture(136477) --"Interface\\Minimap\\UI-Minimap-ZoomButton-Highlight"
- local overlay = button:CreateTexture(nil, "OVERLAY")
- overlay:SetSize(53, 53)
- overlay:SetTexture(136430) --"Interface\\Minimap\\MiniMap-TrackingBorder"
- overlay:SetPoint("TOPLEFT")
- local background = button:CreateTexture(nil, "BACKGROUND")
- background:SetSize(20, 20)
- background:SetTexture(136467) --"Interface\\Minimap\\UI-Minimap-Background"
- background:SetPoint("TOPLEFT", 7, -5)
- local icon = button:CreateTexture(nil, "ARTWORK")
- icon:SetSize(17, 17)
- icon:SetTexture(object.icon)
- icon:SetPoint("TOPLEFT", 7, -6)
- button.icon = icon
- button.isMouseDown = false
+ if WOW_PROJECT_ID == WOW_PROJECT_MAINLINE then
+ local overlay = button:CreateTexture(nil, "OVERLAY")
+ overlay:SetSize(50, 50)
+ overlay:SetTexture(136430) --"Interface\\Minimap\\MiniMap-TrackingBorder"
+ overlay:SetPoint("TOPLEFT", button, "TOPLEFT", 0, 0)
+ local background = button:CreateTexture(nil, "BACKGROUND")
+ background:SetSize(24, 24)
+ background:SetTexture(136467) --"Interface\\Minimap\\UI-Minimap-Background"
+ background:SetPoint("CENTER", button, "CENTER", 0, 1)
+ local icon = button:CreateTexture(nil, "ARTWORK")
+ icon:SetSize(18, 18)
+ icon:SetTexture(object.icon)
+ icon:SetPoint("CENTER", button, "CENTER", 0, 1)
+ button.icon = icon
+ else
+ local overlay = button:CreateTexture(nil, "OVERLAY")
+ overlay:SetSize(53, 53)
+ overlay:SetTexture(136430) --"Interface\\Minimap\\MiniMap-TrackingBorder"
+ overlay:SetPoint("TOPLEFT")
+ local background = button:CreateTexture(nil, "BACKGROUND")
+ background:SetSize(20, 20)
+ background:SetTexture(136467) --"Interface\\Minimap\\UI-Minimap-Background"
+ background:SetPoint("TOPLEFT", 7, -5)
+ local icon = button:CreateTexture(nil, "ARTWORK")
+ icon:SetSize(17, 17)
+ icon:SetTexture(object.icon)
+ icon:SetPoint("TOPLEFT", 7, -6)
+ button.icon = icon
+ end
- local r, g, b = icon:GetVertexColor()
- icon:SetVertexColor(object.iconR or r, object.iconG or g, object.iconB or b)
+ button.isMouseDown = false
+ local r, g, b = button.icon:GetVertexColor()
+ button.icon:SetVertexColor(object.iconR or r, object.iconG or g, object.iconB or b)
- icon.UpdateCoord = updateCoord
- icon:UpdateCoord()
+ button.icon.UpdateCoord = updateCoord
+ button.icon:UpdateCoord()
button:SetScript("OnEnter", onEnter)
button:SetScript("OnLeave", onLeave)
diff --git a/MythicPlusDrop/Libs/LibSharedMedia-3.0/LibSharedMedia-3.0.lua b/MythicPlusDrop/Libs/LibSharedMedia-3.0/LibSharedMedia-3.0.lua
new file mode 100644
index 0000000..fb3446c
--- /dev/null
+++ b/MythicPlusDrop/Libs/LibSharedMedia-3.0/LibSharedMedia-3.0.lua
@@ -0,0 +1,301 @@
+--@curseforge-project-slug: libsharedmedia-3-0@
+--[[
+Name: LibSharedMedia-3.0
+Revision: $Revision: 128 $
+Author: Elkano (elkano@gmx.de)
+Inspired By: SurfaceLib by Haste/Otravi (troeks@gmail.com)
+Website: http://www.wowace.com/projects/libsharedmedia-3-0/
+Description: Shared handling of media data (fonts, sounds, textures, ...) between addons.
+Dependencies: LibStub, CallbackHandler-1.0
+License: LGPL v2.1
+]]
+
+local MAJOR, MINOR = "LibSharedMedia-3.0", 8020003 -- 8.2.0 v3 / increase manually on changes
+local lib = LibStub:NewLibrary(MAJOR, MINOR)
+
+if not lib then return end
+
+local _G = getfenv(0)
+
+local pairs = _G.pairs
+local type = _G.type
+
+local band = _G.bit.band
+local table_sort = _G.table.sort
+
+local RESTRICTED_FILE_ACCESS = WOW_PROJECT_ID == WOW_PROJECT_MAINLINE -- starting with 8.2, some rules for file access have changed; classic still uses the old way
+
+local locale = GetLocale()
+local locale_is_western
+local LOCALE_MASK = 0
+lib.LOCALE_BIT_koKR = 1
+lib.LOCALE_BIT_ruRU = 2
+lib.LOCALE_BIT_zhCN = 4
+lib.LOCALE_BIT_zhTW = 8
+lib.LOCALE_BIT_western = 128
+
+local CallbackHandler = LibStub:GetLibrary("CallbackHandler-1.0")
+
+lib.callbacks = lib.callbacks or CallbackHandler:New(lib)
+
+lib.DefaultMedia = lib.DefaultMedia or {}
+lib.MediaList = lib.MediaList or {}
+lib.MediaTable = lib.MediaTable or {}
+lib.MediaType = lib.MediaType or {}
+lib.OverrideMedia = lib.OverrideMedia or {}
+
+local defaultMedia = lib.DefaultMedia
+local mediaList = lib.MediaList
+local mediaTable = lib.MediaTable
+local overrideMedia = lib.OverrideMedia
+
+
+-- create mediatype constants
+lib.MediaType.BACKGROUND = "background" -- background textures
+lib.MediaType.BORDER = "border" -- border textures
+lib.MediaType.FONT = "font" -- fonts
+lib.MediaType.STATUSBAR = "statusbar" -- statusbar textures
+lib.MediaType.SOUND = "sound" -- sound files
+
+-- populate lib with default Blizzard data
+-- BACKGROUND
+if not lib.MediaTable.background then lib.MediaTable.background = {} end
+lib.MediaTable.background["None"] = [[]]
+lib.MediaTable.background["Blizzard Collections Background"] = [[Interface\Collections\CollectionsBackgroundTile]]
+lib.MediaTable.background["Blizzard Dialog Background"] = [[Interface\DialogFrame\UI-DialogBox-Background]]
+lib.MediaTable.background["Blizzard Dialog Background Dark"] = [[Interface\DialogFrame\UI-DialogBox-Background-Dark]]
+lib.MediaTable.background["Blizzard Dialog Background Gold"] = [[Interface\DialogFrame\UI-DialogBox-Gold-Background]]
+lib.MediaTable.background["Blizzard Garrison Background"] = [[Interface\Garrison\GarrisonUIBackground]]
+lib.MediaTable.background["Blizzard Garrison Background 2"] = [[Interface\Garrison\GarrisonUIBackground2]]
+lib.MediaTable.background["Blizzard Garrison Background 3"] = [[Interface\Garrison\GarrisonMissionUIInfoBoxBackgroundTile]]
+lib.MediaTable.background["Blizzard Low Health"] = [[Interface\FullScreenTextures\LowHealth]]
+lib.MediaTable.background["Blizzard Marble"] = [[Interface\FrameGeneral\UI-Background-Marble]]
+lib.MediaTable.background["Blizzard Out of Control"] = [[Interface\FullScreenTextures\OutOfControl]]
+lib.MediaTable.background["Blizzard Parchment"] = [[Interface\AchievementFrame\UI-Achievement-Parchment-Horizontal]]
+lib.MediaTable.background["Blizzard Parchment 2"] = [[Interface\AchievementFrame\UI-GuildAchievement-Parchment-Horizontal]]
+lib.MediaTable.background["Blizzard Rock"] = [[Interface\FrameGeneral\UI-Background-Rock]]
+lib.MediaTable.background["Blizzard Tabard Background"] = [[Interface\TabardFrame\TabardFrameBackground]]
+lib.MediaTable.background["Blizzard Tooltip"] = [[Interface\Tooltips\UI-Tooltip-Background]]
+lib.MediaTable.background["Solid"] = [[Interface\Buttons\WHITE8X8]]
+lib.DefaultMedia.background = "None"
+
+-- BORDER
+if not lib.MediaTable.border then lib.MediaTable.border = {} end
+lib.MediaTable.border["None"] = [[]]
+lib.MediaTable.border["Blizzard Achievement Wood"] = [[Interface\AchievementFrame\UI-Achievement-WoodBorder]]
+lib.MediaTable.border["Blizzard Chat Bubble"] = [[Interface\Tooltips\ChatBubble-Backdrop]]
+lib.MediaTable.border["Blizzard Dialog"] = [[Interface\DialogFrame\UI-DialogBox-Border]]
+lib.MediaTable.border["Blizzard Dialog Gold"] = [[Interface\DialogFrame\UI-DialogBox-Gold-Border]]
+lib.MediaTable.border["Blizzard Party"] = [[Interface\CHARACTERFRAME\UI-Party-Border]]
+lib.MediaTable.border["Blizzard Tooltip"] = [[Interface\Tooltips\UI-Tooltip-Border]]
+lib.DefaultMedia.border = "None"
+
+-- FONT
+if not lib.MediaTable.font then lib.MediaTable.font = {} end
+local SML_MT_font = lib.MediaTable.font
+--[[
+All font files are currently in all clients, the following table depicts which font supports which charset as of 5.0.4
+Fonts were checked using langcover.pl from DejaVu fonts (http://sourceforge.net/projects/dejavu/) and FontForge (http://fontforge.org/)
+latin means check for: de, en, es, fr, it, pt
+
+file name latin koKR ruRU zhCN zhTW
+2002.ttf 2002 X X X - -
+2002B.ttf 2002 Bold X X X - -
+ARHei.ttf AR CrystalzcuheiGBK Demibold X - X X X
+ARIALN.TTF Arial Narrow X - X - -
+ARKai_C.ttf AR ZhongkaiGBK Medium (Combat) X - X X X
+ARKai_T.ttf AR ZhongkaiGBK Medium X - X X X
+bHEI00M.ttf AR Heiti2 Medium B5 - - - - X
+bHEI01B.ttf AR Heiti2 Bold B5 - - - - X
+bKAI00M.ttf AR Kaiti Medium B5 - - - - X
+bLEI00D.ttf AR Leisu Demi B5 - - - - X
+FRIZQT__.TTF Friz Quadrata TT X - - - -
+FRIZQT___CYR.TTF FrizQuadrataCTT x - X - -
+K_Damage.TTF YDIWingsM - X X - -
+K_Pagetext.TTF MoK X X X - -
+MORPHEUS.TTF Morpheus X - - - -
+MORPHEUS_CYR.TTF Morpheus X - X - -
+NIM_____.ttf Nimrod MT X - X - -
+SKURRI.TTF Skurri X - - - -
+SKURRI_CYR.TTF Skurri X - X - -
+
+WARNING: Although FRIZQT___CYR is available on western clients, it doesn't support special European characters e.g. é, ï, ö
+Due to this, we cannot use it as a replacement for FRIZQT__.TTF
+]]
+
+if locale == "koKR" then
+ LOCALE_MASK = lib.LOCALE_BIT_koKR
+--
+ SML_MT_font["굵은 글꼴"] = [[Fonts\2002B.TTF]]
+ SML_MT_font["기본 글꼴"] = [[Fonts\2002.TTF]]
+ SML_MT_font["데미지 글꼴"] = [[Fonts\K_Damage.TTF]]
+ SML_MT_font["퀘스트 글꼴"] = [[Fonts\K_Pagetext.TTF]]
+--
+ lib.DefaultMedia["font"] = "기본 글꼴" -- someone from koKR please adjust if needed
+--
+elseif locale == "zhCN" then
+ LOCALE_MASK = lib.LOCALE_BIT_zhCN
+--
+ SML_MT_font["伤害数字"] = [[Fonts\ARKai_C.ttf]]
+ SML_MT_font["默认"] = [[Fonts\ARKai_T.ttf]]
+ SML_MT_font["聊天"] = [[Fonts\ARHei.ttf]]
+--
+ lib.DefaultMedia["font"] = "默认" -- someone from zhCN please adjust if needed
+--
+elseif locale == "zhTW" then
+ LOCALE_MASK = lib.LOCALE_BIT_zhTW
+--
+ SML_MT_font["提示訊息"] = [[Fonts\bHEI00M.ttf]]
+ SML_MT_font["聊天"] = [[Fonts\bHEI01B.ttf]]
+ SML_MT_font["傷害數字"] = [[Fonts\bKAI00M.ttf]]
+ SML_MT_font["預設"] = [[Fonts\bLEI00D.ttf]]
+--
+ lib.DefaultMedia["font"] = "預設" -- someone from zhTW please adjust if needed
+
+elseif locale == "ruRU" then
+ LOCALE_MASK = lib.LOCALE_BIT_ruRU
+--
+ SML_MT_font["2002"] = [[Fonts\2002.TTF]]
+ SML_MT_font["2002 Bold"] = [[Fonts\2002B.TTF]]
+ SML_MT_font["AR CrystalzcuheiGBK Demibold"] = [[Fonts\ARHei.TTF]]
+ SML_MT_font["AR ZhongkaiGBK Medium (Combat)"] = [[Fonts\ARKai_C.TTF]]
+ SML_MT_font["AR ZhongkaiGBK Medium"] = [[Fonts\ARKai_T.TTF]]
+ SML_MT_font["Arial Narrow"] = [[Fonts\ARIALN.TTF]]
+ SML_MT_font["Friz Quadrata TT"] = [[Fonts\FRIZQT___CYR.TTF]]
+ SML_MT_font["MoK"] = [[Fonts\K_Pagetext.TTF]]
+ SML_MT_font["Morpheus"] = [[Fonts\MORPHEUS_CYR.TTF]]
+ SML_MT_font["Nimrod MT"] = [[Fonts\NIM_____.ttf]]
+ SML_MT_font["Skurri"] = [[Fonts\SKURRI_CYR.TTF]]
+--
+ lib.DefaultMedia.font = "Friz Quadrata TT"
+--
+else
+ LOCALE_MASK = lib.LOCALE_BIT_western
+ locale_is_western = true
+--
+ SML_MT_font["2002"] = [[Fonts\2002.TTF]]
+ SML_MT_font["2002 Bold"] = [[Fonts\2002B.TTF]]
+ SML_MT_font["AR CrystalzcuheiGBK Demibold"] = [[Fonts\ARHei.TTF]]
+ SML_MT_font["AR ZhongkaiGBK Medium (Combat)"] = [[Fonts\ARKai_C.TTF]]
+ SML_MT_font["AR ZhongkaiGBK Medium"] = [[Fonts\ARKai_T.TTF]]
+ SML_MT_font["Arial Narrow"] = [[Fonts\ARIALN.TTF]]
+ SML_MT_font["Friz Quadrata TT"] = [[Fonts\FRIZQT__.TTF]]
+ SML_MT_font["MoK"] = [[Fonts\K_Pagetext.TTF]]
+ SML_MT_font["Morpheus"] = [[Fonts\MORPHEUS_CYR.TTF]]
+ SML_MT_font["Nimrod MT"] = [[Fonts\NIM_____.ttf]]
+ SML_MT_font["Skurri"] = [[Fonts\SKURRI_CYR.TTF]]
+--
+ lib.DefaultMedia.font = "Friz Quadrata TT"
+--
+end
+
+-- STATUSBAR
+if not lib.MediaTable.statusbar then lib.MediaTable.statusbar = {} end
+lib.MediaTable.statusbar["Blizzard"] = [[Interface\TargetingFrame\UI-StatusBar]]
+lib.MediaTable.statusbar["Blizzard Character Skills Bar"] = [[Interface\PaperDollInfoFrame\UI-Character-Skills-Bar]]
+lib.MediaTable.statusbar["Blizzard Raid Bar"] = [[Interface\RaidFrame\Raid-Bar-Hp-Fill]]
+lib.MediaTable.statusbar["Solid"] = [[Interface\Buttons\WHITE8X8]]
+lib.DefaultMedia.statusbar = "Blizzard"
+
+-- SOUND
+if not lib.MediaTable.sound then lib.MediaTable.sound = {} end
+lib.MediaTable.sound["None"] = RESTRICTED_FILE_ACCESS and 1 or [[Interface\Quiet.ogg]] -- Relies on the fact that PlaySound[File] doesn't error on these values.
+lib.DefaultMedia.sound = "None"
+
+local function rebuildMediaList(mediatype)
+ local mtable = mediaTable[mediatype]
+ if not mtable then return end
+ if not mediaList[mediatype] then mediaList[mediatype] = {} end
+ local mlist = mediaList[mediatype]
+ -- list can only get larger, so simply overwrite it
+ local i = 0
+ for k in pairs(mtable) do
+ i = i + 1
+ mlist[i] = k
+ end
+ table_sort(mlist)
+end
+
+function lib:Register(mediatype, key, data, langmask)
+ if type(mediatype) ~= "string" then
+ error(MAJOR..":Register(mediatype, key, data, langmask) - mediatype must be string, got "..type(mediatype))
+ end
+ if type(key) ~= "string" then
+ error(MAJOR..":Register(mediatype, key, data, langmask) - key must be string, got "..type(key))
+ end
+ mediatype = mediatype:lower()
+ if mediatype == lib.MediaType.FONT and ((langmask and band(langmask, LOCALE_MASK) == 0) or not (langmask or locale_is_western)) then
+ -- ignore fonts that aren't flagged as supporting local glyphs on non-western clients
+ return false
+ end
+ if type(data) == "string" and (mediatype == lib.MediaType.BACKGROUND or mediatype == lib.MediaType.BORDER or mediatype == lib.MediaType.STATUSBAR or mediatype == lib.MediaType.SOUND) then
+ local path = data:lower()
+ if RESTRICTED_FILE_ACCESS and not path:find("^interface") then
+ -- files accessed via path only allowed from interface folder
+ return false
+ end
+ if mediatype == lib.MediaType.SOUND and not (path:find(".ogg", nil, true) or path:find(".mp3", nil, true)) then
+ -- Only ogg and mp3 are valid sounds.
+ return false
+ end
+ end
+ if not mediaTable[mediatype] then mediaTable[mediatype] = {} end
+ local mtable = mediaTable[mediatype]
+ if mtable[key] then return false end
+
+ mtable[key] = data
+ rebuildMediaList(mediatype)
+ self.callbacks:Fire("LibSharedMedia_Registered", mediatype, key)
+ return true
+end
+
+function lib:Fetch(mediatype, key, noDefault)
+ local mtt = mediaTable[mediatype]
+ local overridekey = overrideMedia[mediatype]
+ local result = mtt and ((overridekey and mtt[overridekey] or mtt[key]) or (not noDefault and defaultMedia[mediatype] and mtt[defaultMedia[mediatype]])) or nil
+ return result ~= "" and result or nil
+end
+
+function lib:IsValid(mediatype, key)
+ return mediaTable[mediatype] and (not key or mediaTable[mediatype][key]) and true or false
+end
+
+function lib:HashTable(mediatype)
+ return mediaTable[mediatype]
+end
+
+function lib:List(mediatype)
+ if not mediaTable[mediatype] then
+ return nil
+ end
+ if not mediaList[mediatype] then
+ rebuildMediaList(mediatype)
+ end
+ return mediaList[mediatype]
+end
+
+function lib:GetGlobal(mediatype)
+ return overrideMedia[mediatype]
+end
+
+function lib:SetGlobal(mediatype, key)
+ if not mediaTable[mediatype] then
+ return false
+ end
+ overrideMedia[mediatype] = (key and mediaTable[mediatype][key]) and key or nil
+ self.callbacks:Fire("LibSharedMedia_SetGlobal", mediatype, overrideMedia[mediatype])
+ return true
+end
+
+function lib:GetDefault(mediatype)
+ return defaultMedia[mediatype]
+end
+
+function lib:SetDefault(mediatype, key)
+ if mediaTable[mediatype] and mediaTable[mediatype][key] and not defaultMedia[mediatype] then
+ defaultMedia[mediatype] = key
+ return true
+ else
+ return false
+ end
+end
diff --git a/MythicPlusDrop/Libs/LibSharedMedia-3.0/lib.xml b/MythicPlusDrop/Libs/LibSharedMedia-3.0/lib.xml
new file mode 100644
index 0000000..7f2fd53
--- /dev/null
+++ b/MythicPlusDrop/Libs/LibSharedMedia-3.0/lib.xml
@@ -0,0 +1,4 @@
+
+
+
diff --git a/MythicPlusDrop/Libs/LibStub/LibStub.lua b/MythicPlusDrop/Libs/LibStub/LibStub.lua
index 0a41ac0..d50c267 100644
--- a/MythicPlusDrop/Libs/LibStub/LibStub.lua
+++ b/MythicPlusDrop/Libs/LibStub/LibStub.lua
@@ -7,24 +7,24 @@ if not LibStub or LibStub.minor < LIBSTUB_MINOR then
LibStub = LibStub or {libs = {}, minors = {} }
_G[LIBSTUB_MAJOR] = LibStub
LibStub.minor = LIBSTUB_MINOR
-
+
function LibStub:NewLibrary(major, minor)
assert(type(major) == "string", "Bad argument #2 to `NewLibrary' (string expected)")
- minor = assert(tonumber(strmatch(minor, "%d+")), "Minor version must either be a number or contain a number.")
-
+ minor = assert(tonumber(string.match(minor, "%d+")), "Minor version must either be a number or contain a number.")
+
local oldminor = self.minors[major]
if oldminor and oldminor >= minor then return nil end
self.minors[major], self.libs[major] = minor, self.libs[major] or {}
return self.libs[major], oldminor
end
-
+
function LibStub:GetLibrary(major, silent)
if not self.libs[major] and not silent then
error(("Cannot find a library instance of %q."):format(tostring(major)), 2)
end
return self.libs[major], self.minors[major]
end
-
+
function LibStub:IterateLibraries() return pairs(self.libs) end
setmetatable(LibStub, { __call = LibStub.GetLibrary })
end
diff --git a/MythicPlusDrop/MythicPlusDrop.toc b/MythicPlusDrop/MythicPlusDrop.toc
index 2a7b19e..d1878cd 100644
--- a/MythicPlusDrop/MythicPlusDrop.toc
+++ b/MythicPlusDrop/MythicPlusDrop.toc
@@ -1,6 +1,6 @@
## Interface: 100002
## Title: |cffd6266cMythicPlusDrop|r
-## Version: 5.6
+## Version: 5.7
## Author: BloodDragon2580
## Notes: Info for Mythic Dungeons