Commit 03f3a8c7 authored by Simpy's avatar Simpy 🐹

Merge branch 'development'

parents 82488361 daf83890
......@@ -10,6 +10,19 @@ local hooksecurefunc = hooksecurefunc
local backdropr, backdropg, backdropb, backdropa, borderr, borderg, borderb = 0, 0, 0, 1, 0, 0, 0
-- 8.2 restricted frame check
function E:PointsRestricted(frame)
if frame and not pcall(frame.GetPoint, frame) then
return true
end
end
function E:SafeGetPoint(frame)
if frame and frame.GetPoint and not E:PointsRestricted(frame) then
return frame:GetPoint()
end
end
-- ls, Azil, and Simpy made this to replace Blizzard's SetBackdrop API while the textures can't snap
E.PixelBorders = {"TOPLEFT", "TOPRIGHT", "BOTTOMLEFT", "BOTTOMRIGHT", "TOP", "BOTTOM", "LEFT", "RIGHT"}
function E:SetBackdrop(frame, giveBorder, bgFile, edgeSize, insetLeft, insetRight, insetTop, insetBottom)
......@@ -201,7 +214,7 @@ local function SetOutside(obj, anchor, xOffset, yOffset, anchor2)
anchor = anchor or obj:GetParent()
assert(anchor)
if obj:GetPoint() then
if E:PointsRestricted(obj) or obj:GetPoint() then
obj:ClearAllPoints()
end
......@@ -216,7 +229,7 @@ local function SetInside(obj, anchor, xOffset, yOffset, anchor2)
anchor = anchor or obj:GetParent()
assert(anchor)
if obj:GetPoint() then
if E:PointsRestricted(obj) or obj:GetPoint() then
obj:ClearAllPoints()
end
......@@ -413,8 +426,15 @@ local function FontTemplate(fs, font, fontSize, fontStyle)
end
fs:SetFont(font, fontSize, fontStyle)
fs:SetShadowColor(0, 0, 0, (fontStyle and fontStyle ~= 'NONE' and 0.2) or 1)
fs:SetShadowOffset(E.mult or 1, -(E.mult or 1))
if fontStyle == 'NONE' then
local s = E.mult or 1
fs:SetShadowOffset(s, -s/2)
fs:SetShadowColor(0, 0, 0, 1)
else
fs:SetShadowOffset(0, 0)
fs:SetShadowColor(0, 0, 0, 0)
end
E.texts[fs] = true
end
......
## Interface: 80200
## Author: Elv
## Version: 11.13
## Version: 11.14
## Title: |cfffe7b2cElvUI|r
## Notes: User Interface replacement AddOn for World of Warcraft.
## SavedVariables: ElvDB, ElvPrivateDB
......
......@@ -28,7 +28,7 @@
-- end
-- @class file
-- @name AceAddon-3.0.lua
-- @release $Id: AceAddon-3.0.lua 1184 2018-07-21 14:13:14Z nevcairiel $
-- @release $Id: AceAddon-3.0.lua 1202 2019-05-15 23:11:22Z nevcairiel $
local MAJOR, MINOR = "AceAddon-3.0", 12
local AceAddon, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
......
......@@ -9,7 +9,7 @@
-- make into AceComm.
-- @class file
-- @name AceComm-3.0
-- @release $Id: AceComm-3.0.lua 1174 2018-05-14 17:29:49Z h.leppkes@gmail.com $
-- @release $Id: AceComm-3.0.lua 1202 2019-05-15 23:11:22Z nevcairiel $
--[[ AceComm-3.0
......
......@@ -9,7 +9,7 @@
-- make into AceConsole.
-- @class file
-- @name AceConsole-3.0
-- @release $Id: AceConsole-3.0.lua 1143 2016-07-11 08:52:03Z nevcairiel $
-- @release $Id: AceConsole-3.0.lua 1202 2019-05-15 23:11:22Z nevcairiel $
local MAJOR,MINOR = "AceConsole-3.0", 7
local AceConsole, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
......
......@@ -9,7 +9,7 @@
-- make into AceEvent.
-- @class file
-- @name AceEvent-3.0
-- @release $Id: AceEvent-3.0.lua 1161 2017-08-12 14:30:16Z funkydude $
-- @release $Id: AceEvent-3.0.lua 1202 2019-05-15 23:11:22Z nevcairiel $
local CallbackHandler = LibStub("CallbackHandler-1.0")
local MAJOR, MINOR = "AceEvent-3.0", 4
......
......@@ -9,7 +9,7 @@
-- make into AceHook.
-- @class file
-- @name AceHook-3.0
-- @release $Id: AceHook-3.0.lua 1118 2014-10-12 08:21:54Z nevcairiel $
-- @release $Id: AceHook-3.0.lua 1202 2019-05-15 23:11:22Z nevcairiel $
local ACEHOOK_MAJOR, ACEHOOK_MINOR = "AceHook-3.0", 8
local AceHook, oldminor = LibStub:NewLibrary(ACEHOOK_MAJOR, ACEHOOK_MINOR)
......
--- **AceLocale-3.0** manages localization in addons, allowing for multiple locale to be registered with fallback to the base locale for untranslated strings.
-- @class file
-- @name AceLocale-3.0
-- @release $Id$
-- @release $Id: AceLocale-3.0.lua 1035 2011-07-09 03:20:13Z kaelten $
local MAJOR,MINOR = "AceLocale-3.0-ElvUI", 6
local AceLocale, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
......@@ -97,7 +97,7 @@ function AceLocale:NewLocale(application, locale, isDefault, silent)
end
if not app then
if silent == "raw" then
if silent=="raw" then
app = {}
else
app = setmetatable({}, silent and readmetasilent or readmeta)
......
......@@ -10,7 +10,7 @@
-- make into AceSerializer.
-- @class file
-- @name AceSerializer-3.0
-- @release $Id: AceSerializer-3.0.lua 1135 2015-09-19 20:39:16Z nevcairiel $
-- @release $Id: AceSerializer-3.0.lua 1202 2019-05-15 23:11:22Z nevcairiel $
local MAJOR,MINOR = "AceSerializer-3.0", 5
local AceSerializer, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
......
......@@ -15,7 +15,7 @@
-- make into AceTimer.
-- @class file
-- @name AceTimer-3.0
-- @release $Id: AceTimer-3.0.lua 1170 2018-03-29 17:38:58Z funkydude $
-- @release $Id: AceTimer-3.0.lua 1202 2019-05-15 23:11:22Z nevcairiel $
local MAJOR, MINOR = "AceTimer-3.0", 17 -- Bump minor on changes
local AceTimer, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
......
......@@ -121,7 +121,10 @@ function oUF:DisableBlizzard(unit)
elseif(unit:match('nameplate%d+$')) then
local frame = C_NamePlate.GetNamePlateForUnit(unit)
if(frame and frame.UnitFrame) then
frame.UnitFrame:HookScript('OnShow', insecureOnShow)
if(not frame.UnitFrame.isHooked) then
frame.UnitFrame:HookScript('OnShow', insecureOnShow)
frame.UnitFrame.isHooked = true
end
handleFrame(frame.UnitFrame, true)
end
......
......@@ -2550,8 +2550,9 @@ function B:Initialize()
_G.BankFrame:SetScale(0.0001)
_G.BankFrame:SetAlpha(0)
_G.BankFrame:Point("TOPLEFT")
_G.BankFrame:SetScript("OnShow", nil)
_G.BankFrame:ClearAllPoints()
_G.BankFrame:Point("TOPLEFT")
--Enable/Disable "Loot to Leftmost Bag"
SetInsertItemsLeftToRight(E.db.bags.reverseLoot)
......
......@@ -24,6 +24,7 @@ local Currencies = {
["HONORBOUND_SERVICE_MEDAL"] = {ID = 1716, NAME = GetCurrencyInfo(1716), ICON = format(iconString, select(3, GetCurrencyInfo(1716)))},
["7TH_LEGION_SERVICE_MEDAL"] = {ID = 1717, NAME = GetCurrencyInfo(1717), ICON = format(iconString, select(3, GetCurrencyInfo(1717)))},
["TITAN_RESIDUUM"] = {ID = 1718, NAME = GetCurrencyInfo(1718), ICON = format(iconString, select(3, GetCurrencyInfo(1718)))},
["PRISMATIC_MANAPEARL"] = {ID = 1721, NAME = GetCurrencyInfo(1721), ICON = format(iconString, select(3, GetCurrencyInfo(1721)))},
-- Other
["DARKMOON_PRIZE_TICKET"] = {ID = 515, NAME = GetCurrencyInfo(515), ICON = format(iconString, select(3, GetCurrencyInfo(515)))},
}
......@@ -76,6 +77,7 @@ local function OnEnter(self)
DT.tooltip:AddDoubleLine(Currencies.HONORBOUND_SERVICE_MEDAL.NAME, select(2, GetCurrencyInfo(Currencies.HONORBOUND_SERVICE_MEDAL.ID)), 1, 1, 1)
end
DT.tooltip:AddDoubleLine(Currencies.TITAN_RESIDUUM.NAME, select(2, GetCurrencyInfo(Currencies.TITAN_RESIDUUM.ID)), 1, 1, 1)
DT.tooltip:AddDoubleLine(Currencies.PRISMATIC_MANAPEARL.NAME, select(2, GetCurrencyInfo(Currencies.PRISMATIC_MANAPEARL.ID)), 1, 1, 1)
DT.tooltip:AddLine(' ')
DT.tooltip:AddLine(OTHER)
......
......@@ -538,6 +538,7 @@ local function LoadSkin()
S:HandleButton(_G.LFGListApplicationDialog.CancelButton)
S:HandleEditBox(_G.LFGListApplicationDialogDescription)
_G.LFGListInviteDialog:StripTextures()
_G.LFGListInviteDialog:SetTemplate("Transparent")
S:HandleButton(_G.LFGListInviteDialog.AcknowledgeButton)
S:HandleButton(_G.LFGListInviteDialog.AcceptButton)
......
......@@ -1236,7 +1236,10 @@ function ElvUF:DisableBlizzard(unit)
elseif (unit:match('nameplate%d+$')) then
local frame = C_NamePlate_GetNamePlateForUnit(unit)
if (frame and frame.UnitFrame) then
frame.UnitFrame:HookScript('OnShow', insecureOnShow)
if(not frame.UnitFrame.isHooked) then
frame.UnitFrame:HookScript('OnShow', insecureOnShow)
frame.UnitFrame.isHooked = true
end
HandleFrame(frame.UnitFrame, true)
end
......
......@@ -3,7 +3,7 @@ local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, Private
--Global Settings
G.general = {
UIScale = 0.64,
version = 11.13,
version = 11.14,
locale = 'auto',
eyefinity = false,
ignoreScalePopup = false,
......
......@@ -3,7 +3,7 @@
-- as well as associate it with a slash command.
-- @class file
-- @name AceConfig-3.0
-- @release $Id: AceConfig-3.0.lua 1161 2017-08-12 14:30:16Z funkydude $
-- @release $Id: AceConfig-3.0.lua 1202 2019-05-15 23:11:22Z nevcairiel $
--[[
AceConfig-3.0
......
--- 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 1161 2017-08-12 14:30:16Z funkydude $
-- @release $Id: AceConfigCmd-3.0.lua 1202 2019-05-15 23:11:22Z nevcairiel $
--[[
AceConfigCmd-3.0
......
--- 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 1197 2019-01-21 23:41:10Z nevcairiel $
-- @release $Id: AceConfigDialog-3.0.lua 1210 2019-06-25 23:45:43Z nevcairiel $
local LibStub = LibStub
local gui = LibStub("AceGUI-3.0")
local reg = LibStub("AceConfigRegistry-3.0-ElvUI")
local MAJOR, MINOR = "AceConfigDialog-3.0-ElvUI", 70
local MAJOR, MINOR = "AceConfigDialog-3.0-ElvUI", 72
local AceConfigDialog, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
if not AceConfigDialog then return end
......@@ -56,18 +56,18 @@ local width_multiplier = 170
--[[
Group Types
Tree - All Descendant Groups will all become nodes on the tree, direct child options will appear above the tree
- Descendant Groups with inline=true and thier children will not become nodes
- Descendant Groups with inline=true and thier children will not become nodes
Tab - Direct Child Groups will become tabs, direct child options will appear above the tab control
- Grandchild groups will default to inline unless specified otherwise
- Grandchild groups will default to inline unless specified otherwise
Select- Same as Tab but with entries in a dropdown rather than tabs
Inline Groups
- Will not become nodes of a select group, they will be effectivly part of thier parent group seperated by a border
- If declared on a direct child of a root node of a select group, they will appear above the group container control
- When a group is displayed inline, all descendants will also be inline members of the group
- Will not become nodes of a select group, they will be effectivly part of thier parent group seperated by a border
- If declared on a direct child of a root node of a select group, they will appear above the group container control
- When a group is displayed inline, all descendants will also be inline members of the group
]]
......@@ -505,6 +505,7 @@ local function OptionOnMouseOver(widget, event)
local path = user.path
local appName = user.appName
-- modified by ElvUI
if opt.descStyle and opt.descStyle ~= "tooltip" then return end
local name = GetOptionsMemberValue("name", opt, options, path, appName)
......@@ -858,6 +859,8 @@ end
local function ActivateSlider(widget, event, value)
local option = widget:GetUserData("option")
local min, max, step = option.min or (not option.softMin and 0 or nil), option.max or (not option.softMax and 100 or nil), option.step
-- checks added by elvui
if type(min) == 'function' then min = min() end
if type(max) == 'function' then max = max() end
......@@ -1081,6 +1084,10 @@ local function CreateControl(userControlType, fallbackControlType)
return control
end
local function sortTblAsStrings(x,y)
return tostring(x) < tostring(y) -- Support numbers as keys
end
--[[
options - root of the options table being fed
container - widget that controls will be placed in
......@@ -1214,6 +1221,7 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin
elseif v.type == "select" then
local values = GetOptionsMemberValue("values", v, options, path, appName)
local sorting = GetOptionsMemberValue("sorting", v, options, path, appName)
if v.style == "radio" then
local disabled = CheckOptionDisabled(v, options, path, appName)
local width = GetOptionsMemberValue("width",v,options,path,appName)
......@@ -1224,12 +1232,14 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin
control:PauseLayout()
local optionValue = GetOptionsMemberValue("get",v, options, path, appName)
local t = {}
for value, text in pairs(values) do
t[#t+1]=value
if not sorting then
sorting = {}
for value, text in pairs(values) do
sorting[#sorting+1]=value
end
tsort(sorting, sortTblAsStrings)
end
tsort(t)
for k, value in ipairs(t) do
for k, value in ipairs(sorting) do
local text = values[value]
local radio = gui:Create("CheckBox")
radio:SetLabel(text)
......@@ -1265,7 +1275,7 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin
itemType = nil
end
control:SetLabel(name)
control:SetList(values, nil, itemType, sortByValue)
control:SetList(values, sorting, itemType, sortByValue)
local value = GetOptionsMemberValue("get",v, options, path, appName)
if not values[value] then
value = nil
......@@ -1525,6 +1535,7 @@ local function TreeOnButtonEnter(widget, event, uniquevalue, button)
if type(desc) == "string" then
GameTooltip:SetOwner(button, "ANCHOR_CURSOR")
GameTooltip:ClearAllPoints()
if widget.type == "TabGroup" then
GameTooltip:SetPoint("BOTTOM",button,"TOP")
else
......
......@@ -8,10 +8,10 @@
-- :IterateOptionsTables() (and :GetOptionsTable() if only given one argument) return a function reference that the requesting config handling addon must call with valid "uiType", "uiName".
-- @class file
-- @name AceConfigRegistry-3.0
-- @release $Id: AceConfigRegistry-3.0.lua 1193 2018-08-02 12:24:37Z funkydude $
-- @release $Id: AceConfigRegistry-3.0.lua 1207 2019-06-23 12:08:33Z nevcairiel $
local CallbackHandler = LibStub("CallbackHandler-1.0")
local MAJOR, MINOR = "AceConfigRegistry-3.0-ElvUI", 18
local MAJOR, MINOR = "AceConfigRegistry-3.0-ElvUI", 20
local AceConfigRegistry = LibStub:NewLibrary(MAJOR, MINOR)
if not AceConfigRegistry then return end
......@@ -109,13 +109,20 @@ local basekeys={
}
local typedkeys={
header={},
header={
control=optstring,
dialogControl=optstring,
dropdownControl=optstring,
},
description={
image=optstringnumberfunc,
imageCoords=optmethodtable,
imageHeight=optnumber,
imageWidth=optnumber,
fontSize=optstringfunc,
control=optstring,
dialogControl=optstring,
dropdownControl=optstring,
},
group={
args=istable,
......@@ -132,6 +139,9 @@ local typedkeys={
imageCoords=optmethodtable,
imageHeight=optnumber,
imageWidth=optnumber,
control=optstring,
dialogControl=optstring,
dropdownControl=optstring,
},
input={
pattern=optstring,
......@@ -145,6 +155,9 @@ local typedkeys={
tristate=optbool,
image=optstringnumberfunc,
imageCoords=optmethodtable,
control=optstring,
dialogControl=optstring,
dropdownControl=optstring,
},
tristate={
},
......@@ -156,9 +169,13 @@ local typedkeys={
step=optnumber,
bigStep=optnumberfunc,
isPercent=optbool,
control=optstring,
dialogControl=optstring,
dropdownControl=optstring,
},
select={
values=ismethodtable,
sorting=optmethodtable,
style={
["nil"]=true,
["string"]={dropdown=true,radio=true},
......@@ -179,9 +196,14 @@ local typedkeys={
},
color={
hasAlpha=optmethodbool,
control=optstring,
dialogControl=optstring,
dropdownControl=optstring,
},
keybinding={
-- TODO
control=optstring,
dialogControl=optstring,
dropdownControl=optstring,
},
}
......
--- 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 1193 2018-08-02 12:24:37Z funkydude $
-- @release $Id: AceDBOptions-3.0.lua 1202 2019-05-15 23:11:22Z nevcairiel $
local ACEDBO_MAJOR, ACEDBO_MINOR = "AceDBOptions-3.0", 15
local AceDBOptions = LibStub:NewLibrary(ACEDBO_MAJOR, ACEDBO_MINOR)
......
......@@ -24,7 +24,7 @@
-- f:AddChild(btn)
-- @class file
-- @name AceGUI-3.0
-- @release $Id: AceGUI-3.0.lua 1193 2018-08-02 12:24:37Z funkydude $
-- @release $Id: AceGUI-3.0.lua 1202 2019-05-15 23:11:22Z nevcairiel $
local ACEGUI_MAJOR, ACEGUI_MINOR = "AceGUI-3.0", 36
local AceGUI, oldminor = LibStub:NewLibrary(ACEGUI_MAJOR, ACEGUI_MINOR)
......@@ -37,10 +37,6 @@ local error, assert = error, assert
local setmetatable, rawget = setmetatable, rawget
local math_max = math.max
local ipairs, wipe = ipairs, wipe
local max, min, ceil = max, min, ceil
local unpack = unpack
-- WoW APIs
local UIParent = UIParent
......
......@@ -2,7 +2,7 @@
TreeGroup Container
Container that uses a tree control to switch between groups.
-------------------------------------------------------------------------------]]
local Type, Version = "TreeGroup", 41
local Type, Version = "TreeGroup", 42
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
......@@ -209,6 +209,7 @@ local function Button_OnEnter(frame)
if self.enabletooltips then
GameTooltip:SetOwner(frame, "ANCHOR_NONE")
GameTooltip:ClearAllPoints()
GameTooltip:SetPoint("LEFT",frame,"RIGHT")
GameTooltip:SetText(frame.text:GetText() or "", 1, .82, 0, true)
......
--[[ $Id: AceGUIWidget-DropDown-Items.lua 1192 2018-07-30 18:03:51Z funkydude $ ]]--
--[[ $Id: AceGUIWidget-DropDown-Items.lua 1202 2019-05-15 23:11:22Z nevcairiel $ ]]--
local AceGUI = LibStub("AceGUI-3.0")
......
--[[ $Id: AceGUIWidget-DropDown.lua 1167 2017-08-29 22:08:48Z funkydude $ ]]--
--[[ $Id: AceGUIWidget-DropDown.lua 1209 2019-06-24 21:01:01Z nevcairiel $ ]]--
local AceGUI = LibStub("AceGUI-3.0")
-- Lua APIs
local min, max, floor = math.min, math.max, math.floor
local select, pairs, ipairs, type = select, pairs, ipairs, type
local tsort = table.sort
local select, pairs, ipairs, type, tostring = select, pairs, ipairs, type, tostring
local tonumber, tsort, error = tonumber, table.sort, error
-- WoW APIs
local PlaySound = PlaySound
......@@ -356,7 +356,7 @@ end
do
local widgetType = "Dropdown"
local widgetVersion = 31
local widgetVersion = 34
--[[ Static data ]]--
......@@ -592,6 +592,14 @@ do
-- exported
local sortlist = {}
local function sortTbl(x,y)
local num1, num2 = tonumber(x), tonumber(y)
if num1 and num2 then -- numeric comparison, either two numbers or numeric strings
return num1 < num2
else -- compare everything else tostring'ed
return tostring(x) < tostring(y)
end
end
-- these were added by ElvUI
local sortStr1, sortStr2 = "%((%d+)%)", "%[(%d+)]"
......@@ -627,7 +635,7 @@ do
for v in pairs(list) do
sortlist[#sortlist + 1] = v
end
tsort(sortlist)
tsort(sortlist, sortTbl)
for i, key in ipairs(sortlist) do
AddListItem(self, key, list[key], itemType)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment