diff --git a/libs/AceAddon-3.0/AceAddon-3.0.lua b/libs/AceAddon-3.0/AceAddon-3.0.lua index a7f7279..e9d4154 100644 --- a/libs/AceAddon-3.0/AceAddon-3.0.lua +++ b/libs/AceAddon-3.0/AceAddon-3.0.lua @@ -28,7 +28,7 @@ -- end -- @class file -- @name AceAddon-3.0.lua --- @release $Id: AceAddon-3.0.lua 1084 2013-04-27 20:14:11Z nevcairiel $ +-- @release $Id: AceAddon-3.0.lua 1184 2018-07-21 14:13:14Z nevcairiel $ local MAJOR, MINOR = "AceAddon-3.0", 12 local AceAddon, oldminor = LibStub:NewLibrary(MAJOR, MINOR) @@ -62,43 +62,12 @@ local function errorhandler(err) return geterrorhandler()(err) end -local function CreateDispatcher(argCount) - local code = [[ - local xpcall, eh = ... - local method, ARGS - local function call() return method(ARGS) end - - local function dispatch(func, ...) - method = func - if not method then return end - ARGS = ... - return xpcall(call, eh) - end - - return dispatch - ]] - - local ARGS = {} - for i = 1, argCount do ARGS[i] = "arg"..i end - code = code:gsub("ARGS", tconcat(ARGS, ", ")) - return assert(loadstring(code, "safecall Dispatcher["..argCount.."]"))(xpcall, errorhandler) -end - -local Dispatchers = setmetatable({}, {__index=function(self, argCount) - local dispatcher = CreateDispatcher(argCount) - rawset(self, argCount, dispatcher) - return dispatcher -end}) -Dispatchers[0] = function(func) - return xpcall(func, errorhandler) -end - local function safecall(func, ...) -- we check to see if the func is passed is actually a function here and don't error when it isn't -- this safecall is used for optional functions like OnInitialize OnEnable etc. When they are not -- present execution should continue without hinderance if type(func) == "function" then - return Dispatchers[select('#', ...)](func, ...) + return xpcall(func, errorhandler, ...) end end diff --git a/libs/AceAddon-3.0/AceAddon-3.0.xml b/libs/AceAddon-3.0/AceAddon-3.0.xml index e6ad639..dcf24c7 100644 --- a/libs/AceAddon-3.0/AceAddon-3.0.xml +++ b/libs/AceAddon-3.0/AceAddon-3.0.xml @@ -1,4 +1,4 @@ <Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/ ..\FrameXML\UI.xsd"> <Script file="AceAddon-3.0.lua"/> -</Ui> \ No newline at end of file +</Ui> diff --git a/libs/AceConsole-3.0/AceConsole-3.0.xml b/libs/AceConsole-3.0/AceConsole-3.0.xml index be9f47c..4f4699a 100644 --- a/libs/AceConsole-3.0/AceConsole-3.0.xml +++ b/libs/AceConsole-3.0/AceConsole-3.0.xml @@ -1,4 +1,4 @@ <Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/ ..\FrameXML\UI.xsd"> <Script file="AceConsole-3.0.lua"/> -</Ui> \ No newline at end of file +</Ui> diff --git a/libs/AceEvent-3.0/AceEvent-3.0.lua b/libs/AceEvent-3.0/AceEvent-3.0.lua index 578ae25..bbf55c2 100644 --- a/libs/AceEvent-3.0/AceEvent-3.0.lua +++ b/libs/AceEvent-3.0/AceEvent-3.0.lua @@ -9,8 +9,10 @@ -- make into AceEvent. -- @class file -- @name AceEvent-3.0 --- @release $Id: AceEvent-3.0.lua 975 2010-10-23 11:26:18Z nevcairiel $ -local MAJOR, MINOR = "AceEvent-3.0", 3 +-- @release $Id: AceEvent-3.0.lua 1161 2017-08-12 14:30:16Z funkydude $ +local CallbackHandler = LibStub("CallbackHandler-1.0") + +local MAJOR, MINOR = "AceEvent-3.0", 4 local AceEvent = LibStub:NewLibrary(MAJOR, MINOR) if not AceEvent then return end @@ -18,8 +20,6 @@ if not AceEvent then return end -- Lua APIs local pairs = pairs -local CallbackHandler = LibStub:GetLibrary("CallbackHandler-1.0") - AceEvent.frame = AceEvent.frame or CreateFrame("Frame", "AceEvent30Frame") -- our event frame AceEvent.embeds = AceEvent.embeds or {} -- what objects embed this lib diff --git a/libs/AceEvent-3.0/AceEvent-3.0.xml b/libs/AceEvent-3.0/AceEvent-3.0.xml index 313ef4d..41ef791 100644 --- a/libs/AceEvent-3.0/AceEvent-3.0.xml +++ b/libs/AceEvent-3.0/AceEvent-3.0.xml @@ -1,4 +1,4 @@ <Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/ ..\FrameXML\UI.xsd"> <Script file="AceEvent-3.0.lua"/> -</Ui> \ No newline at end of file +</Ui> diff --git a/libs/AceGUI-3.0/AceGUI-3.0.lua b/libs/AceGUI-3.0/AceGUI-3.0.lua index 9853644..e5c6aba 100644 --- a/libs/AceGUI-3.0/AceGUI-3.0.lua +++ b/libs/AceGUI-3.0/AceGUI-3.0.lua @@ -24,8 +24,8 @@ -- f:AddChild(btn) -- @class file -- @name AceGUI-3.0 --- @release $Id: AceGUI-3.0.lua 1102 2013-10-25 14:15:23Z nevcairiel $ -local ACEGUI_MAJOR, ACEGUI_MINOR = "AceGUI-3.0", 34 +-- @release $Id: AceGUI-3.0.lua 1184 2018-07-21 14:13:14Z nevcairiel $ +local ACEGUI_MAJOR, ACEGUI_MINOR = "AceGUI-3.0", 36 local AceGUI, oldminor = LibStub:NewLibrary(ACEGUI_MAJOR, ACEGUI_MINOR) if not AceGUI then return end -- No upgrade needed @@ -66,39 +66,10 @@ local function errorhandler(err) return geterrorhandler()(err) end -local function CreateDispatcher(argCount) - local code = [[ - local xpcall, eh = ... - local method, ARGS - local function call() return method(ARGS) end - - local function dispatch(func, ...) - method = func - if not method then return end - ARGS = ... - return xpcall(call, eh) - end - - return dispatch - ]] - - local ARGS = {} - for i = 1, argCount do ARGS[i] = "arg"..i end - code = code:gsub("ARGS", tconcat(ARGS, ", ")) - return assert(loadstring(code, "safecall Dispatcher["..argCount.."]"))(xpcall, errorhandler) -end - -local Dispatchers = setmetatable({}, {__index=function(self, argCount) - local dispatcher = CreateDispatcher(argCount) - rawset(self, argCount, dispatcher) - return dispatcher -end}) -Dispatchers[0] = function(func) - return xpcall(func, errorhandler) -end - local function safecall(func, ...) - return Dispatchers[select("#", ...)](func, ...) + if func then + return xpcall(func, errorhandler, ...) + end end -- Recycling functions @@ -811,3 +782,221 @@ AceGUI:RegisterLayout("Flow", height = height + rowheight + 3 safecall(content.obj.LayoutFinished, content.obj, nil, height) end) + +-- Get alignment method and value. Possible alignment methods are a callback, a number, "start", "middle", "end", "fill" or "TOPLEFT", "BOTTOMRIGHT" etc. +local GetCellAlign = function (dir, tableObj, colObj, cellObj, cell, child) + local fn = cellObj and (cellObj["align" .. dir] or cellObj.align) + 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 + + if type(fn) == "string" then + fn = fn:lower() + fn = dir == "V" and (fn:sub(1, 3) == "top" and "start" or fn:sub(1, 6) == "bottom" and "end" or fn:sub(1, 6) == "center" and "middle") + or dir == "H" and (fn:sub(-4) == "left" and "start" or fn:sub(-5) == "right" and "end" or fn:sub(-6) == "center" and "middle") + or fn + val = (fn == "start" or fn == "fill") and 0 or fn == "end" and cell - child or (cell - child) / 2 + elseif type(fn) == "function" then + val = fn(child or 0, cell, dir) + else + val = fn + end + + return fn, max(0, min(val, cell)) +end + +-- Get width or height for multiple cells combined +local GetCellDimension = function (dir, laneDim, from, to, space) + local dim = 0 + for cell=from,to do + dim = dim + (laneDim[cell] or 0) + end + return dim + max(0, to - from) * (space or 0) +end + +--[[ Options +============ +Container: + - columns ({col, col, ...}): Column settings. "col" can be a number (<= 0: content width, <1: rel. width, <10: weight, >=10: abs. width) or a table with column setting. + - space, spaceH, spaceV: Overall, horizontal and vertical spacing between cells. + - align, alignH, alignV: Overall, horizontal and vertical cell alignment. See GetCellAlign() for possible values. +Columns: + - width: Fixed column width (nil or <=0: content width, <1: rel. width, >=1: abs. width). + - min or 1: Min width for content based width + - max or 2: Max width for content based width + - weight: Flexible column width. The leftover width after accounting for fixed-width columns is distributed to weighted columns according to their weights. + - align, alignH, alignV: Overwrites the container setting for alignment. +Cell: + - colspan: Makes a cell span multiple columns. + - rowspan: Makes a cell span multiple rows. + - align, alignH, alignV: Overwrites the container and column setting for alignment. +]] +AceGUI:RegisterLayout("Table", + function (content, children) + local obj = content.obj + obj:PauseLayout() + + local tableObj = obj:GetUserData("table") + local cols = tableObj.columns + local spaceH = tableObj.spaceH or tableObj.space or 0 + local spaceV = tableObj.spaceV or tableObj.space or 0 + local totalH = (content:GetWidth() or content.width or 0) - spaceH * (#cols - 1) + + -- We need to reuse these because layout events can come in very frequently + local layoutCache = obj:GetUserData("layoutCache") + if not layoutCache then + layoutCache = {{}, {}, {}, {}, {}, {}} + obj:SetUserData("layoutCache", layoutCache) + end + local t, laneH, laneV, rowspans, rowStart, colStart = unpack(layoutCache) + + -- Create the grid + local n, slotFound = 0 + for i,child in ipairs(children) do + if child:IsShown() then + repeat + n = n + 1 + local col = (n - 1) % #cols + 1 + local row = ceil(n / #cols) + local rowspan = rowspans[col] + local cell = rowspan and rowspan.child or child + local cellObj = cell:GetUserData("cell") + slotFound = not rowspan + + -- Rowspan + if not rowspan and cellObj and cellObj.rowspan then + rowspan = {child = child, from = row, to = row + cellObj.rowspan - 1} + rowspans[col] = rowspan + end + if rowspan and i == #children then + rowspan.to = row + end + + -- Colspan + local colspan = max(0, min((cellObj and cellObj.colspan or 1) - 1, #cols - col)) + n = n + colspan + + -- Place the cell + if not rowspan or rowspan.to == row then + t[n] = cell + rowStart[cell] = rowspan and rowspan.from or row + colStart[cell] = col + + if rowspan then + rowspans[col] = nil + end + end + until slotFound + end + end + + local rows = ceil(n / #cols) + + -- Determine fixed size cols and collect weights + local extantH, totalWeight = totalH, 0 + for col,colObj in ipairs(cols) do + laneH[col] = 0 + + if type(colObj) == "number" then + colObj = {[colObj >= 1 and colObj < 10 and "weight" or "width"] = colObj} + cols[col] = colObj + end + + if colObj.weight then + -- Weight + totalWeight = totalWeight + (colObj.weight or 1) + else + if not colObj.width or colObj.width <= 0 then + -- Content width + for row=1,rows do + local child = t[(row - 1) * #cols + col] + if child then + local f = child.frame + f:ClearAllPoints() + local childH = f:GetWidth() or 0 + + laneH[col] = 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])) + else + -- Rel./Abs. width + laneH[col] = colObj.width < 1 and colObj.width * totalH or colObj.width + end + extantH = max(0, extantH - laneH[col]) + end + end + + -- Determine sizes based on weight + local scale = totalWeight > 0 and extantH / totalWeight or 0 + for col,colObj in pairs(cols) do + if colObj.weight then + laneH[col] = scale * colObj.weight + end + end + + -- Arrange children + for row=1,rows do + local rowV = 0 + + -- Horizontal placement and sizing + for col=1,#cols do + local child = t[(row - 1) * #cols + col] + if child then + local colObj = cols[colStart[child]] + local cellObj = child:GetUserData("cell") + local offsetH = GetCellDimension("H", laneH, 1, colStart[child] - 1, spaceH) + (colStart[child] == 1 and 0 or spaceH) + local cellH = GetCellDimension("H", laneH, colStart[child], col, spaceH) + + local f = child.frame + f:ClearAllPoints() + local childH = f:GetWidth() or 0 + + local alignFn, align = GetCellAlign("H", tableObj, colObj, cellObj, cellH, childH) + f:SetPoint("LEFT", content, offsetH + align, 0) + if child:IsFullWidth() or alignFn == "fill" or childH > cellH then + f:SetPoint("RIGHT", content, "LEFT", offsetH + align + cellH, 0) + end + + if child.DoLayout then + child:DoLayout() + end + + rowV = max(rowV, (f:GetHeight() or 0) - GetCellDimension("V", laneV, rowStart[child], row - 1, spaceV)) + end + end + + laneV[row] = rowV + + -- Vertical placement and sizing + for col=1,#cols do + local child = t[(row - 1) * #cols + col] + if child then + local colObj = cols[colStart[child]] + local cellObj = child:GetUserData("cell") + local offsetV = GetCellDimension("V", laneV, 1, rowStart[child] - 1, spaceV) + (rowStart[child] == 1 and 0 or spaceV) + local cellV = GetCellDimension("V", laneV, rowStart[child], row, spaceV) + + local f = child.frame + local childV = f:GetHeight() or 0 + + local alignFn, align = GetCellAlign("V", tableObj, colObj, cellObj, cellV, childV) + if child:IsFullHeight() or alignFn == "fill" then + f:SetHeight(cellV) + end + f:SetPoint("TOP", content, 0, -(offsetV + align)) + end + end + end + + -- Calculate total height + local totalV = GetCellDimension("V", laneV, 1, #laneV, spaceV) + + -- Cleanup + for _,v in pairs(layoutCache) do wipe(v) end + + safecall(obj.LayoutFinished, obj, nil, totalV) + obj:ResumeLayout() + end) diff --git a/libs/AceGUI-3.0/widgets/AceGUIContainer-Frame.lua b/libs/AceGUI-3.0/widgets/AceGUIContainer-Frame.lua index 0dae68c..80fd582 100644 --- a/libs/AceGUI-3.0/widgets/AceGUIContainer-Frame.lua +++ b/libs/AceGUI-3.0/widgets/AceGUIContainer-Frame.lua @@ -1,7 +1,7 @@ --[[----------------------------------------------------------------------------- Frame Container -------------------------------------------------------------------------------]] -local Type, Version = "Frame", 24 +local Type, Version = "Frame", 26 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end @@ -21,10 +21,14 @@ local CreateFrame, UIParent = CreateFrame, UIParent Scripts -------------------------------------------------------------------------------]] local function Button_OnClick(frame) - PlaySound("gsTitleOptionExit") + PlaySound(799) -- SOUNDKIT.GS_TITLE_OPTION_EXIT frame.obj:Hide() end +local function Frame_OnShow(frame) + frame.obj:Fire("OnShow") +end + local function Frame_OnClose(frame) frame.obj:Fire("OnClose") end @@ -186,6 +190,7 @@ local function Constructor() frame:SetBackdropColor(0, 0, 0, 1) frame:SetMinResize(400, 200) frame:SetToplevel(true) + frame:SetScript("OnShow", Frame_OnShow) frame:SetScript("OnHide", Frame_OnClose) frame:SetScript("OnMouseDown", Frame_OnMouseDown) diff --git a/libs/AceGUI-3.0/widgets/AceGUIContainer-ScrollFrame.lua b/libs/AceGUI-3.0/widgets/AceGUIContainer-ScrollFrame.lua index 6dd0c4d..a95579d 100644 --- a/libs/AceGUI-3.0/widgets/AceGUIContainer-ScrollFrame.lua +++ b/libs/AceGUI-3.0/widgets/AceGUIContainer-ScrollFrame.lua @@ -2,12 +2,10 @@ ScrollFrame Container Plain container that scrolls its content and doesn't grow in height. -------------------------------------------------------------------------------]] -local Type, Version = "ScrollFrame", 24 +local Type, Version = "ScrollFrame", 25 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end -local IsLegion = select(4, GetBuildInfo()) >= 70000 - -- Lua APIs local pairs, assert, type = pairs, assert, type local min, max, floor, abs = math.min, math.max, math.floor, math.abs @@ -130,6 +128,11 @@ local methods = { ["LayoutFinished"] = function(self, width, height) self.content:SetHeight(height or 0 + 20) + + -- update the scrollframe + self:FixScroll() + + -- schedule another update when everything has "settled" self.scrollframe:SetScript("OnUpdate", FixScrollOnUpdate) end, @@ -178,11 +181,7 @@ local function Constructor() local scrollbg = scrollbar:CreateTexture(nil, "BACKGROUND") scrollbg:SetAllPoints(scrollbar) - if IsLegion then - scrollbg:SetColorTexture(0, 0, 0, 0.4) - else - scrollbg:SetTexture(0, 0, 0, 0.4) - end + scrollbg:SetColorTexture(0, 0, 0, 0.4) --Container Support local content = CreateFrame("Frame", nil, scrollframe) diff --git a/libs/AceGUI-3.0/widgets/AceGUIContainer-TabGroup.lua b/libs/AceGUI-3.0/widgets/AceGUIContainer-TabGroup.lua index 00be129..95544c5 100644 --- a/libs/AceGUI-3.0/widgets/AceGUIContainer-TabGroup.lua +++ b/libs/AceGUI-3.0/widgets/AceGUIContainer-TabGroup.lua @@ -2,7 +2,7 @@ TabGroup Container Container that uses tabs on top to switch between groups. -------------------------------------------------------------------------------]] -local Type, Version = "TabGroup", 35 +local Type, Version = "TabGroup", 36 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end @@ -63,7 +63,7 @@ Scripts -------------------------------------------------------------------------------]] local function Tab_OnClick(frame) if not (frame.selected or frame.disabled) then - PlaySound("igCharacterInfoTab") + PlaySound(841) -- SOUNDKIT.IG_CHARACTER_INFO_TAB frame.obj:SelectTab(frame.value) end end diff --git a/libs/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua b/libs/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua index 9bf17d8..236f633 100644 --- a/libs/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua +++ b/libs/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua @@ -2,11 +2,11 @@ TreeGroup Container Container that uses a tree control to switch between groups. -------------------------------------------------------------------------------]] -local Type, Version = "TreeGroup", 40 +local Type, Version = "TreeGroup", 41 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end -local IsLegion = select(4, GetBuildInfo()) >= 70000 +local WoW80 = select(4, GetBuildInfo()) >= 80000 -- Lua APIs local next, pairs, ipairs, assert, type = next, pairs, ipairs, assert, type @@ -164,7 +164,7 @@ end local function FirstFrameUpdate(frame) local self = frame.obj frame:SetScript("OnUpdate", nil) - self:RefreshTree() + self:RefreshTree(nil, true) end local function BuildUniqueValue(...) @@ -302,6 +302,8 @@ local methods = { ["OnRelease"] = function(self) self.status = nil + self.tree = nil + self.frame:SetScript("OnUpdate", nil) for k, v in pairs(self.localstatus) do if k == "groups" then for k2 in pairs(v) do @@ -390,8 +392,8 @@ local methods = { end end, - ["RefreshTree"] = function(self,scrollToSelection) - local buttons = self.buttons + ["RefreshTree"] = function(self,scrollToSelection,fromOnUpdate) + local buttons = self.buttons local lines = self.lines for i, v in ipairs(buttons) do @@ -422,6 +424,12 @@ local methods = { local maxlines = (floor(((self.treeframe:GetHeight()or 0) - 20 ) / 18)) if maxlines <= 0 then return end + -- workaround for lag spikes on WoW 8.0 + if WoW80 and self.frame:GetParent() == UIParent and not fromOnUpdate then + self.frame:SetScript("OnUpdate", FirstFrameUpdate) + return + end + local first, last scrollToSelection = status.scrollToSelection @@ -672,12 +680,7 @@ local function Constructor() local scrollbg = scrollbar:CreateTexture(nil, "BACKGROUND") scrollbg:SetAllPoints(scrollbar) - - if IsLegion then - scrollbg:SetColorTexture(0,0,0,0.4) - else - scrollbg:SetTexture(0,0,0,0.4) - end + scrollbg:SetColorTexture(0,0,0,0.4) local border = CreateFrame("Frame",nil,frame) border:SetPoint("TOPLEFT", treeframe, "TOPRIGHT") diff --git a/libs/AceGUI-3.0/widgets/AceGUIContainer-Window.lua b/libs/AceGUI-3.0/widgets/AceGUIContainer-Window.lua index bb0a2a2..6825420 100644 --- a/libs/AceGUI-3.0/widgets/AceGUIContainer-Window.lua +++ b/libs/AceGUI-3.0/widgets/AceGUIContainer-Window.lua @@ -21,14 +21,18 @@ local CreateFrame, UIParent = CreateFrame, UIParent ]] do local Type = "Window" - local Version = 4 + local Version = 6 + + local function frameOnShow(this) + this.obj:Fire("OnShow") + end local function frameOnClose(this) this.obj:Fire("OnClose") end local function closeOnClick(this) - PlaySound("gsTitleOptionExit") + PlaySound(799) -- SOUNDKIT.GS_TITLE_OPTION_EXIT this.obj:Hide() end @@ -180,6 +184,7 @@ do frame:SetFrameStrata("FULLSCREEN_DIALOG") frame:SetScript("OnMouseDown", frameOnMouseDown) + frame:SetScript("OnShow",frameOnShow) frame:SetScript("OnHide",frameOnClose) frame:SetMinResize(240,240) frame:SetToplevel(true) diff --git a/libs/AceGUI-3.0/widgets/AceGUIWidget-Button.lua b/libs/AceGUI-3.0/widgets/AceGUIWidget-Button.lua index c7c72c1..0a23be4 100644 --- a/libs/AceGUI-3.0/widgets/AceGUIWidget-Button.lua +++ b/libs/AceGUI-3.0/widgets/AceGUIWidget-Button.lua @@ -2,7 +2,7 @@ Button Widget Graphical Button. -------------------------------------------------------------------------------]] -local Type, Version = "Button", 23 +local Type, Version = "Button", 24 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end @@ -18,7 +18,7 @@ Scripts -------------------------------------------------------------------------------]] local function Button_OnClick(frame, ...) AceGUI:ClearFocus() - PlaySound("igMainMenuOption") + PlaySound(852) -- SOUNDKIT.IG_MAINMENU_OPTION frame.obj:Fire("OnClick", ...) end diff --git a/libs/AceGUI-3.0/widgets/AceGUIWidget-CheckBox.lua b/libs/AceGUI-3.0/widgets/AceGUIWidget-CheckBox.lua index 8847ebc..e34debf 100644 --- a/libs/AceGUI-3.0/widgets/AceGUIWidget-CheckBox.lua +++ b/libs/AceGUI-3.0/widgets/AceGUIWidget-CheckBox.lua @@ -1,7 +1,7 @@ --[[----------------------------------------------------------------------------- Checkbox Widget -------------------------------------------------------------------------------]] -local Type, Version = "CheckBox", 22 +local Type, Version = "CheckBox", 25 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end @@ -26,7 +26,7 @@ local function AlignImage(self) self.text:SetPoint("LEFT", self.checkbg, "RIGHT") self.text:SetPoint("RIGHT") else - self.text:SetPoint("LEFT", self.image,"RIGHT", 1, 0) + self.text:SetPoint("LEFT", self.image, "RIGHT", 1, 0) self.text:SetPoint("RIGHT") end end @@ -60,9 +60,9 @@ local function CheckBox_OnMouseUp(frame) self:ToggleChecked() if self.checked then - PlaySound("igMainMenuOptionCheckBoxOn") + PlaySound(856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON else -- for both nil and false (tristate) - PlaySound("igMainMenuOptionCheckBoxOff") + PlaySound(857) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_OFF end self:Fire("OnValueChanged", self.checked) @@ -203,6 +203,7 @@ local methods = { 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 diff --git a/libs/AceGUI-3.0/widgets/AceGUIWidget-ColorPicker.lua b/libs/AceGUI-3.0/widgets/AceGUIWidget-ColorPicker.lua index 740a467..05e2b57 100644 --- a/libs/AceGUI-3.0/widgets/AceGUIWidget-ColorPicker.lua +++ b/libs/AceGUI-3.0/widgets/AceGUIWidget-ColorPicker.lua @@ -5,8 +5,6 @@ local Type, Version = "ColorPicker", 23 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end -local IsLegion = select(4, GetBuildInfo()) >= 70000 - -- Lua APIs local pairs = pairs @@ -148,11 +146,7 @@ local function Constructor() local texture = frame:CreateTexture(nil, "BACKGROUND") texture:SetWidth(16) texture:SetHeight(16) - if IsLegion then - texture:SetColorTexture(1, 1, 1) - else - texture:SetTexture(1, 1, 1) - end + texture:SetColorTexture(1, 1, 1) texture:SetPoint("CENTER", colorSwatch) texture:Show() diff --git a/libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown-Items.lua b/libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown-Items.lua index 5ea840f..5748e4f 100644 --- a/libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown-Items.lua +++ b/libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown-Items.lua @@ -1,9 +1,7 @@ ---[[ $Id: AceGUIWidget-DropDown-Items.lua 1137 2016-05-15 10:57:36Z nevcairiel $ ]]-- +--[[ $Id: AceGUIWidget-DropDown-Items.lua 1167 2017-08-29 22:08:48Z funkydude $ ]]-- local AceGUI = LibStub("AceGUI-3.0") -local IsLegion = select(4, GetBuildInfo()) >= 70000 - -- Lua APIs local select, assert = select, assert @@ -325,7 +323,7 @@ end -- Does not close the pullout on click. do local widgetType = "Dropdown-Item-Toggle" - local widgetVersion = 3 + local widgetVersion = 4 local function UpdateToggle(self) if self.value then @@ -345,9 +343,9 @@ do if self.disabled then return end self.value = not self.value if self.value then - PlaySound("igMainMenuOptionCheckBoxOn") + PlaySound(856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON else - PlaySound("igMainMenuOptionCheckBoxOff") + PlaySound(857) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_OFF end UpdateToggle(self) self:Fire("OnValueChanged", self.value) @@ -457,11 +455,7 @@ do local line = self.frame:CreateTexture(nil, "OVERLAY") line:SetHeight(1) - if IsLegion then - line:SetColorTexture(.5, .5, .5) - else - line:SetTexture(.5, .5, .5) - end + line:SetColorTexture(.5, .5, .5) line:SetPoint("LEFT", self.frame, "LEFT", 10, 0) line:SetPoint("RIGHT", self.frame, "RIGHT", -10, 0) diff --git a/libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown.lua b/libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown.lua index 0dd3bff..cf0b0aa 100644 --- a/libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown.lua +++ b/libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown.lua @@ -1,4 +1,4 @@ ---[[ $Id: AceGUIWidget-DropDown.lua 1116 2014-10-12 08:15:46Z nevcairiel $ ]]-- +--[[ $Id: AceGUIWidget-DropDown.lua 1167 2017-08-29 22:08:48Z funkydude $ ]]-- local AceGUI = LibStub("AceGUI-3.0") -- Lua APIs @@ -356,7 +356,7 @@ end do local widgetType = "Dropdown" - local widgetVersion = 30 + local widgetVersion = 31 --[[ Static data ]]-- @@ -381,7 +381,7 @@ do local function Dropdown_TogglePullout(this) local self = this.obj - PlaySound("igMainMenuOptionCheckBoxOn") -- missleading name, but the Blizzard code uses this sound + PlaySound(856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON if self.open then self.open = nil self.pullout:Close() diff --git a/libs/AceGUI-3.0/widgets/AceGUIWidget-EditBox.lua b/libs/AceGUI-3.0/widgets/AceGUIWidget-EditBox.lua index d039026..29f7e00 100644 --- a/libs/AceGUI-3.0/widgets/AceGUIWidget-EditBox.lua +++ b/libs/AceGUI-3.0/widgets/AceGUIWidget-EditBox.lua @@ -1,7 +1,7 @@ --[[----------------------------------------------------------------------------- EditBox Widget -------------------------------------------------------------------------------]] -local Type, Version = "EditBox", 26 +local Type, Version = "EditBox", 28 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end @@ -73,7 +73,7 @@ local function EditBox_OnEnterPressed(frame) local value = frame:GetText() local cancel = self:Fire("OnEnterPressed", value) if not cancel then - PlaySound("igMainMenuOptionCheckBoxOn") + PlaySound(856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON HideButton(self) end end @@ -81,23 +81,21 @@ end local function EditBox_OnReceiveDrag(frame) local self = frame.obj local type, id, info = GetCursorInfo() + local name if type == "item" then - self:SetText(info) - self:Fire("OnEnterPressed", info) - ClearCursor() + name = info elseif type == "spell" then - local name = GetSpellInfo(id, info) - self:SetText(name) - self:Fire("OnEnterPressed", name) - ClearCursor() + name = GetSpellInfo(id, info) elseif type == "macro" then - local name = GetMacroInfo(id) + name = GetMacroInfo(id) + end + if name then self:SetText(name) self:Fire("OnEnterPressed", name) ClearCursor() + HideButton(self) + AceGUI:ClearFocus() end - HideButton(self) - AceGUI:ClearFocus() end local function EditBox_OnTextChanged(frame) diff --git a/libs/AceGUI-3.0/widgets/AceGUIWidget-InteractiveLabel.lua b/libs/AceGUI-3.0/widgets/AceGUIWidget-InteractiveLabel.lua index 9e06049..036efee 100644 --- a/libs/AceGUI-3.0/widgets/AceGUIWidget-InteractiveLabel.lua +++ b/libs/AceGUI-3.0/widgets/AceGUIWidget-InteractiveLabel.lua @@ -1,7 +1,7 @@ --[[----------------------------------------------------------------------------- InteractiveLabel Widget -------------------------------------------------------------------------------]] -local Type, Version = "InteractiveLabel", 20 +local Type, Version = "InteractiveLabel", 21 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end diff --git a/libs/AceGUI-3.0/widgets/AceGUIWidget-Label.lua b/libs/AceGUI-3.0/widgets/AceGUIWidget-Label.lua index 23897d5..75817a0 100644 --- a/libs/AceGUI-3.0/widgets/AceGUIWidget-Label.lua +++ b/libs/AceGUI-3.0/widgets/AceGUIWidget-Label.lua @@ -2,7 +2,7 @@ Label Widget Displays text and optionally an icon. -------------------------------------------------------------------------------]] -local Type, Version = "Label", 23 +local Type, Version = "Label", 24 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end @@ -78,6 +78,8 @@ local methods = { self:SetImageSize(16, 16) self:SetColor() self:SetFontObject() + self:SetJustifyH("LEFT") + self:SetJustifyV("TOP") -- reset the flag self.resizing = nil @@ -134,6 +136,14 @@ local methods = { self.image:SetHeight(height) UpdateImageAnchor(self) end, + + ["SetJustifyH"] = function(self, justifyH) + self.label:SetJustifyH(justifyH) + end, + + ["SetJustifyV"] = function(self, justifyV) + self.label:SetJustifyV(justifyV) + end, } --[[----------------------------------------------------------------------------- @@ -144,9 +154,6 @@ local function Constructor() frame:Hide() local label = frame:CreateFontString(nil, "BACKGROUND", "GameFontHighlightSmall") - label:SetJustifyH("LEFT") - label:SetJustifyV("TOP") - local image = frame:CreateTexture(nil, "BACKGROUND") -- create widget diff --git a/libs/AceGUI-3.0/widgets/AceGUIWidget-Slider.lua b/libs/AceGUI-3.0/widgets/AceGUIWidget-Slider.lua index 583f29d..20d0887 100644 --- a/libs/AceGUI-3.0/widgets/AceGUIWidget-Slider.lua +++ b/libs/AceGUI-3.0/widgets/AceGUIWidget-Slider.lua @@ -2,7 +2,7 @@ Slider Widget Graphical Slider, like, for Range values. -------------------------------------------------------------------------------]] -local Type, Version = "Slider", 21 +local Type, Version = "Slider", 22 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end @@ -108,7 +108,7 @@ local function EditBox_OnEnterPressed(frame) end if value then - PlaySound("igMainMenuOptionCheckBoxOn") + PlaySound(856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON self.slider:SetValue(value) self:Fire("OnMouseUp", value) end diff --git a/libs/AceLocale-3.0/AceLocale-3.0.xml b/libs/AceLocale-3.0/AceLocale-3.0.xml index e017af0..bf023f0 100644 --- a/libs/AceLocale-3.0/AceLocale-3.0.xml +++ b/libs/AceLocale-3.0/AceLocale-3.0.xml @@ -1,4 +1,4 @@ <Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/ ..\FrameXML\UI.xsd"> <Script file="AceLocale-3.0.lua"/> -</Ui> \ No newline at end of file +</Ui> diff --git a/libs/CallbackHandler-1.0/CallbackHandler-1.0.lua b/libs/CallbackHandler-1.0/CallbackHandler-1.0.lua index 2a64013..a8377fe 100644 --- a/libs/CallbackHandler-1.0/CallbackHandler-1.0.lua +++ b/libs/CallbackHandler-1.0/CallbackHandler-1.0.lua @@ -1,5 +1,5 @@ ---[[ $Id: CallbackHandler-1.0.lua 18 2014-10-16 02:52:20Z mikk $ ]] -local MAJOR, MINOR = "CallbackHandler-1.0", 6 +--[[ $Id: CallbackHandler-1.0.lua 1186 2018-07-21 14:19:18Z nevcairiel $ ]] +local MAJOR, MINOR = "CallbackHandler-1.0", 7 local CallbackHandler = LibStub:NewLibrary(MAJOR, MINOR) if not CallbackHandler then return end -- No upgrade needed @@ -22,41 +22,15 @@ 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 -- @@ -87,7 +61,7 @@ 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 diff --git a/libs/CallbackHandler-1.0/CallbackHandler-1.0.xml b/libs/CallbackHandler-1.0/CallbackHandler-1.0.xml index 876df83..c107f88 100644 --- a/libs/CallbackHandler-1.0/CallbackHandler-1.0.xml +++ b/libs/CallbackHandler-1.0/CallbackHandler-1.0.xml @@ -1,4 +1,4 @@ <Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/ ..\FrameXML\UI.xsd"> <Script file="CallbackHandler-1.0.lua"/> -</Ui> \ No newline at end of file +</Ui> diff --git a/libs/LibStub/LibStub.lua b/libs/LibStub/LibStub.lua index 7e9b5cd..0a41ac0 100644 --- a/libs/LibStub/LibStub.lua +++ b/libs/LibStub/LibStub.lua @@ -1,22 +1,13 @@ --- $Id: LibStub.lua 103 2014-10-16 03:02:50Z mikk $ --- LibStub is a simple versioning stub meant for use in Libraries. http://www.wowace.com/addons/libstub/ for more info --- LibStub is hereby placed in the Public Domain --- Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel, joshborke +-- LibStub is a simple versioning stub meant for use in Libraries. http://www.wowace.com/wiki/LibStub for more info +-- LibStub is hereby placed in the Public Domain Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel, joshborke local LIBSTUB_MAJOR, LIBSTUB_MINOR = "LibStub", 2 -- NEVER MAKE THIS AN SVN REVISION! IT NEEDS TO BE USABLE IN ALL REPOS! local LibStub = _G[LIBSTUB_MAJOR] --- Check to see is this version of the stub is obsolete if not LibStub or LibStub.minor < LIBSTUB_MINOR then LibStub = LibStub or {libs = {}, minors = {} } _G[LIBSTUB_MAJOR] = LibStub LibStub.minor = LIBSTUB_MINOR - -- LibStub:NewLibrary(major, minor) - -- major (string) - the major version of the library - -- minor (string or number ) - the minor version of the library - -- - -- returns nil if a newer or same version of the lib is already present - -- returns empty library object or old library object if upgrade is needed 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.") @@ -27,12 +18,6 @@ if not LibStub or LibStub.minor < LIBSTUB_MINOR then return self.libs[major], oldminor end - -- LibStub:GetLibrary(major, [silent]) - -- major (string) - the major version of the library - -- silent (boolean) - if true, library is optional, silently return nil if its not found - -- - -- throws an error if the library can not be found (except silent is set) - -- returns the library object if found 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) @@ -40,12 +25,6 @@ if not LibStub or LibStub.minor < LIBSTUB_MINOR then return self.libs[major], self.minors[major] end - -- LibStub:IterateLibraries() - -- - -- Returns an iterator for the currently registered libraries - function LibStub:IterateLibraries() - return pairs(self.libs) - end - + function LibStub:IterateLibraries() return pairs(self.libs) end setmetatable(LibStub, { __call = LibStub.GetLibrary }) end diff --git a/libs/LibStub/LibStub.toc b/libs/LibStub/LibStub.toc index c64a3b6..0277222 100644 --- a/libs/LibStub/LibStub.toc +++ b/libs/LibStub/LibStub.toc @@ -1,4 +1,4 @@ -## Interface: 70100 +## Interface: 80000 ## Title: Lib: LibStub ## Notes: Universal Library Stub ## Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel diff --git a/xanOrderHalls.lua b/xanOrderHalls.lua index 3f1568d..58ac38b 100644 --- a/xanOrderHalls.lua +++ b/xanOrderHalls.lua @@ -113,7 +113,8 @@ function XANORDH:getCurrentPlayerData(forceDisplay) end local iCount = 0 - local talentTrees = C_Garrison.GetTalentTrees(LE_GARRISON_TYPE_7_0, select(3, UnitClass("player"))) + local uiTextureKit, classAgnostic, talentTrees = C_Garrison.GetTalentTreeInfoForID(LE_GARRISON_TYPE_7_0, select(3, UnitClass("player"))); + dbplayer.info.talents = {} if (talentTrees) then local completeTalentID = C_Garrison.GetCompleteTalent(LE_GARRISON_TYPE_7_0) @@ -404,7 +405,7 @@ function XANORDH:displayList() end -->>>In Progress Missions - if v.info.missions.inProgress then + if v.info.missions and v.info.missions.inProgress then local missionCount = 0 local missionCompleted = 0 local ceilMissionTime = 0 @@ -459,7 +460,7 @@ function XANORDH:displayList() end -->>>Current Missions Available - if v.info.missions.currentMissions then + if v.info.missions and v.info.missions.currentMissions then local missionCount = 0 local rightXOffset = 0 diff --git a/xanOrderHalls.toc b/xanOrderHalls.toc index c4dc67e..52a4acb 100644 --- a/xanOrderHalls.toc +++ b/xanOrderHalls.toc @@ -1,8 +1,8 @@ -## Interface: 70100 +## Interface: 80000 ## Title: xanOrderHalls ## Notes: A small addon to display order hall info on multiple characters. ## Author: Xruptor -## Version: 1.0 +## Version: 1.1 ## OptionalDeps: tekDebug ## SavedVariables: XOH_DB